|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectagent.Agent
vacworld.VacAgent
Constructor Summary | |
VacAgent()
|
Method Summary | |
boolean |
adjacentTo(int x1,
int y1,
int x2,
int y2)
|
int |
distance(int x1,
int y1,
int x2,
int y2)
Return the Manhattan distance between two squares. |
void |
fillCheck(int ox,
int oy)
After discovering a new obstacle, check to see if any squares become unreachable, so that they may be marked as obstacle as well. |
int |
getMaxUnknownColY(int[][] map,
int dx)
|
int |
getMaxUnknownRowX(int[][] map,
int dy)
|
int |
getMaxUnknownX(int[][] map)
|
int |
getMaxUnknownY(int[][] map)
|
int |
getMinUnknownColY(int[][] map,
int dx)
|
int |
getMinUnknownRowX(int[][] map,
int dy)
|
int |
getMinUnknownX(int[][] map)
|
int |
getMinUnknownY(int[][] map)
|
boolean |
obstacleToLeft()
|
void |
printAgentMap()
|
void |
see(Percept p)
Provide a Percept to the agent. |
Action |
selectAction()
Have the agent select its next action to perform. |
boolean |
unreachable(int x,
int y)
Can the given square be reached. |
void |
updateDesSquare()
Based on the agent's desired heading (as determined by it's point in a spiral path) and its knowledge of the world, update which square the agent next wants to explore. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VacAgent()
Method Detail |
public void see(Percept p)
Agent
see
in class Agent
public Action selectAction()
Agent
selectAction
in class Agent
public void fillCheck(int ox, int oy)
public boolean unreachable(int x, int y)
public int distance(int x1, int y1, int x2, int y2)
public void updateDesSquare()
public int getMinUnknownY(int[][] map)
public int getMinUnknownX(int[][] map)
public int getMaxUnknownY(int[][] map)
public int getMaxUnknownX(int[][] map)
public int getMinUnknownRowX(int[][] map, int dy)
public int getMaxUnknownRowX(int[][] map, int dy)
public int getMinUnknownColY(int[][] map, int dx)
public int getMaxUnknownColY(int[][] map, int dx)
public boolean adjacentTo(int x1, int y1, int x2, int y2)
public boolean obstacleToLeft()
public void printAgentMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |