public abstract class DeterministicPlanner extends MDPSolver implements Planner
DeterministicPlanner.PlanningFailedException runtime exception.| Modifier and Type | Class and Description |
|---|---|
class |
DeterministicPlanner.PlanningFailedException
Exception class for indicating that a solution failed to be found by the planning algorithm.
|
| Modifier and Type | Field and Description |
|---|---|
protected StateConditionTest |
gc
This State condition test should return true for goal states and false for non-goal states.
|
protected java.util.Map<HashableState,Action> |
internalPolicy
Stores the action plan found by the valueFunction as a deterministic policy
|
actionTypes, debugCode, domain, gamma, hashingFactory, model, usingOptionModel| Constructor and Description |
|---|
DeterministicPlanner() |
| Modifier and Type | Method and Description |
|---|---|
void |
deterministicPlannerInit(SADomain domain,
StateConditionTest gc,
HashableStateFactory hashingFactory)
Initializes the valueFunction.
|
protected void |
encodePlanIntoPolicy(SearchNode lastVisitedNode)
Encodes a solution path found by the valueFunction into this class's internal policy structure.
|
boolean |
hasCachedPlanForState(State s)
Returns whether the valueFunction has a plan solution from the provided state.
|
protected boolean |
planContainsOption(SearchNode lastVisitedNode)
Returns true if a solution path uses an option in its solution.
|
protected boolean |
planHasDupilicateStates(SearchNode lastVisitedNode)
Returns true if a solution path visits the same state multiple times.
|
Action |
querySelectedActionForState(State s)
Returns the action suggested by the internal plan for the given state.
|
void |
resetSolver()
This method resets all solver results so that a solver can be restarted fresh
as if had never solved the MDP.
|
addActionType, applicableActions, getActionTypes, getDebugCode, getDomain, getGamma, getHashingFactory, getModel, setActionTypes, setDebugCode, setDomain, setGamma, setHashingFactory, setModel, solverInit, stateHash, toggleDebugPrintingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitplanFromStateaddActionType, getActionTypes, getDebugCode, getDomain, getGamma, getHashingFactory, getModel, setActionTypes, setDebugCode, setDomain, setGamma, setHashingFactory, setModel, solverInit, toggleDebugPrintingprotected StateConditionTest gc
protected java.util.Map<HashableState,Action> internalPolicy
public void deterministicPlannerInit(SADomain domain, StateConditionTest gc, HashableStateFactory hashingFactory)
domain - the domain in which to plan.gc - test for goal conditions that should return true for goal states and false for non-goal states.hashingFactory - the hashing factory to use for states.public void resetSolver()
MDPSolverInterfaceresetSolver in interface MDPSolverInterfaceresetSolver in class MDPSolverpublic boolean hasCachedPlanForState(State s)
s - the state to test whether a plan solution currently exists.public Action querySelectedActionForState(State s)
s - the state for which the suggested action is to be returned.protected void encodePlanIntoPolicy(SearchNode lastVisitedNode)
DeterministicPlanner.PlanningFailedException runtime exception is thrown.lastVisitedNode - the last search node in the solution path, which should contain the goal state.protected boolean planContainsOption(SearchNode lastVisitedNode)
lastVisitedNode - the last search node in the solution path, which should contain the goal state.protected boolean planHasDupilicateStates(SearchNode lastVisitedNode)
lastVisitedNode - the last search node in the solution path, which should contain the goal state.