aima.search.map
Class AdaptableHeuristicFunction

java.lang.Object
  extended by aima.search.map.AdaptableHeuristicFunction
All Implemented Interfaces:
HeuristicFunction, java.lang.Cloneable

public abstract class AdaptableHeuristicFunction
extends java.lang.Object
implements HeuristicFunction, java.lang.Cloneable

This class extends heuristic functions in two ways: It maintains a goal and a map to estimate distance to goal for states in route planning problems, and it provides a method to adapt to different goals.


Field Summary
protected  java.lang.Object goal
          The Current Goal.
protected  Map map
          The map to be used for distance to goal estimates.
 
Constructor Summary
AdaptableHeuristicFunction()
           
 
Method Summary
 AdaptableHeuristicFunction getAdaptation(java.lang.Object goal, Map map)
          Creates a clone and stores goal and map in the corresponding attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface aima.search.framework.HeuristicFunction
getHeuristicValue
 

Field Detail

goal

protected java.lang.Object goal
The Current Goal.


map

protected Map map
The map to be used for distance to goal estimates.

Constructor Detail

AdaptableHeuristicFunction

public AdaptableHeuristicFunction()
Method Detail

getAdaptation

public AdaptableHeuristicFunction getAdaptation(java.lang.Object goal,
                                                Map map)
Creates a clone and stores goal and map in the corresponding attributes. This method MUST be called before using the heuristic!