|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--wworld.Percept
Specifies the object containing various percepts. The percepts include extended percepts, natural language percepts and image percepts.
Constructor Summary | |
Percept(int clientNo)
Constructor. |
Method Summary | |
void |
createAgentImage(int imageX,
int imageY,
int agentFacing)
|
void |
createGoldImage(int imageX,
int imageY)
|
void |
createObstacleImage(int imageX,
int imageY)
|
void |
createPitImage(int imageX,
int imageY)
|
void |
createWumpusImage(int imageX,
int imageY,
int wumpusFacing)
|
java.lang.String |
getHint()
|
int |
getImageHeight()
Returns the height of the image being sent to the agent. |
int[][][] |
getImagePixels()
Returns the array containing pixel values of the image being sent as a percept to the client. |
int |
getImageWidth()
Returns the width of the image being sent to the agent. |
boolean |
isBreeze()
Returns true if the agent feels a breeze. |
boolean |
isBump()
Returns true if the agent bumped into a wall in the previous step. |
boolean |
isGlitter()
Returns true if the agent senses a glitter. |
boolean |
isScream()
Returns true if the agent hears a wumpus die. |
boolean |
isStench()
Returns true if the agent smells the wumpus. |
void |
perceive(Environment env,
GridPoint gp,
int orientation,
java.util.Vector allAgents,
TransferPercept tp)
Used to set the percepts for each agent depending on their position and orientation in the grid. |
void |
readImage(java.io.FileInputStream is,
int imageX,
int imageY)
Reads the image from a file given that the file contains an image in ascii PPM format. |
void |
setBumpedLastTime()
Used to indicate that in the last step, the agent tried to walk into a wall or an obstacle. |
void |
setWumpusDiedLastTime()
Used to indicate that in the last step, the agent shot a wumpus. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Percept(int clientNo)
Method Detail |
public void perceive(Environment env, GridPoint gp, int orientation, java.util.Vector allAgents, TransferPercept tp)
public void createWumpusImage(int imageX, int imageY, int wumpusFacing)
public void createAgentImage(int imageX, int imageY, int agentFacing)
public void createGoldImage(int imageX, int imageY)
public void createPitImage(int imageX, int imageY)
public void createObstacleImage(int imageX, int imageY)
public int[][][] getImagePixels()
public int getImageHeight()
public int getImageWidth()
public void readImage(java.io.FileInputStream is, int imageX, int imageY)
public void setBumpedLastTime()
public void setWumpusDiedLastTime()
public boolean isBreeze()
public boolean isStench()
public boolean isGlitter()
public boolean isBump()
public boolean isScream()
public java.lang.String getHint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |