ai.worlds.wumpus
Class DefaultWumpusLogic
java.lang.Object
ai.worlds.wumpus.WumpusLogic
ai.worlds.wumpus.DefaultWumpusLogic
- public class DefaultWumpusLogic
- extends WumpusLogic
A generic wumpus logic unit.
This code must be completed to perform logical reasoning.
- Author:
- Jill Zimmerman -- jill.zimmerman@goucher.edu
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultWumpusLogic
public DefaultWumpusLogic(int x,
int y)
makeKB
public void makeKB(HornKnowledgeBase kb)
- Make a knowledge base.
- Specified by:
makeKB
in class WumpusLogic
- Parameters:
kb
- is the knowledge base that will be constructed.
closestMove
public Location closestMove(java.util.Vector moves)
- Find the closest move from a list.
- Specified by:
closestMove
in class WumpusLogic
- Parameters:
moves
- is a list of locations to which the agent can move.
- Returns:
- the move that is closest to the agent's current location.
nextMove
public Location nextMove()
- Determine the next location the agent will visit.
- Specified by:
nextMove
in class WumpusLogic
- Returns:
- the location that the agent will move to next.
pathTo
public java.util.Vector pathTo(Location loc,
Location heading)
- Determine the sequence of actions which will take the agent to the given location.
- Specified by:
pathTo
in class WumpusLogic
- Parameters:
loc
- is the location we wish to travel to.heading
- is the agent's current heading.
- Returns:
- the sequence of actions which will take the agent to the given location.