csli.util.search
Class MapState

java.lang.Object
  extended by csli.util.search.AbstractSearchState<MapState>
      extended by csli.util.search.MapState
All Implemented Interfaces:
SearchState<MapState>, Comparable<MapState>

public class MapState
extends AbstractSearchState<MapState>

An example SearchState implementation, in which each state represents a path to a particular location on the WorldMap. The score is the A* score, distance travelled thus far + heuristic distance to the goal. The goal, bounds, and nearest neighbor relations are determined by WorldMap.

Author:
jefe

Constructor Summary
MapState(MapState prev, csli.util.search.WorldMap.Location x, WorldMap world)
           
MapState(csli.util.search.WorldMap.Location x, WorldMap world)
           
 
Method Summary
 double getScore()
           
 Collection<MapState> getSuccessors()
           
 boolean isGoalState()
           
 boolean isOutOfBounds()
           
 String toPathString()
           
 String toString()
           
 
Methods inherited from class csli.util.search.AbstractSearchState
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapState

public MapState(csli.util.search.WorldMap.Location x,
                WorldMap world)

MapState

public MapState(MapState prev,
                csli.util.search.WorldMap.Location x,
                WorldMap world)
Method Detail

getSuccessors

public Collection<MapState> getSuccessors()

getScore

public double getScore()

isGoalState

public boolean isGoalState()

isOutOfBounds

public boolean isOutOfBounds()

toPathString

public String toPathString()

toString

public String toString()
Overrides:
toString in class Object