public class IDAStar extends DeterministicPlanner
If a terminal function is provided via the setter method defined for OO-MDPs, then the BestFirst search algorithm will not expand any nodes that are terminal states, as if there were no actions that could be executed from that state. Note that terminal states are not necessarily the same as goal states, since there could be a fail condition from which the agent cannot act, but that is not explicitly represented in the transition dynamics.
|Modifier and Type||Field and Description|
The heuristic to use
The comparator to use for checking which nodes to expand first.
actionTypes, debugCode, domain, gamma, hashingFactory, model, usingOptionModel
|Constructor and Description|
|Modifier and Type||Method and Description|
Recursive method to perform A* up to a f-score depth
Returns true if the search node has not be visited previously on the current search path.
Returns true if the search node wraps a goal state.
Plans and returns a
deterministicPlannerInit, encodePlanIntoPolicy, hasCachedPlanForState, planContainsOption, planHasDupilicateStates, querySelectedActionForState, resetSolver
addActionType, applicableActions, getActionTypes, getDebugCode, getDomain, getGamma, getHashingFactory, getModel, setActionTypes, setDebugCode, setDomain, setGamma, setHashingFactory, setModel, solverInit, stateHash, toggleDebugPrinting
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addActionType, getActionTypes, getDebugCode, getDomain, getGamma, getHashingFactory, getModel, setActionTypes, setDebugCode, setDomain, setGamma, setHashingFactory, setModel, solverInit, toggleDebugPrinting
protected Heuristic heuristic
protected PrioritizedSearchNode.PSNComparator nodeComparator
public IDAStar(SADomain domain, StateConditionTest gc, HashableStateFactory hashingFactory, Heuristic heuristic)
domain- the domain in which to plan
gc- should evaluate to true for goal states; false otherwise
hashingFactory- the state hashing factory to use
heuristic- the planning heuristic. Should return non-positive values.
public SDPlannerPolicy planFromState(State initialState)
SDPlannerPolicy. If a
Stateis not in the solution path of this planner, then the
SDPlannerPolicywill throw a runtime exception. If you want a policy that will dynamically replan for unknown states, you should create your own
initialState- the initial state of the planning problem
protected PrioritizedSearchNode FLimtedDFS(PrioritizedSearchNode lastNode, double minR, double cumulatedReward)
lastNode- the node to expand
minR- the minimum cumulative reward at which to stop the search (in other terms the maximum cost)
cumulatedReward- the amount of reward accumulated at this node
protected boolean planEndNode(SearchNode node)
node- the node to check
protected boolean lastStateOnPathIsNew(PrioritizedSearchNode psn)
psn- the search node to check.