public class SimpleHashableStateFactory extends java.lang.Object implements HashableStateFactory
Stateinstances. It produces either a
IDSimpleHashableState. The general approach is that hash values are computed by iterating through each variable key in the order returned by
State.variableKeys()and the has code for values returned by
State.get(Object)are combined. Similarly, two states are evaluated as equal when the values returned by
State.get(Object)satisfy their implemented
This class also automatically provides special treatment for OO-MDP states (states that implement
OOState) by being object identifier independent
(the names of objects don't affect the state identity). However, you may disable identifier independence
by using the constructor
SimpleHashableStateFactory(boolean). If your domain is relational, it may be
important to be identifier *dependent* (that is, set the parameter in the constructor to false).
|Modifier and Type||Field and Description|
Whether state evaluations of OO-MDPs are object identifier independent (the names of objects don't matter).
|Constructor and Description|
Default constructor: object identifier independent and no hash code caching.
Initializes with no hash code caching.
|Modifier and Type||Method and Description|
protected boolean identifierIndependent
public SimpleHashableStateFactory(boolean identifierIndependent)
identifierIndependent- if true then state evaluations for
OOStates are object identifier independent; if false then dependent.
public HashableState hashState(State s)
States into a
s- the input
public boolean objectIdentifierIndependent()