public class LimitedMemoryDFS extends DFS
DeterministicPlanner.PlanningFailedException| Modifier and Type | Field and Description |
|---|---|
protected java.util.LinkedList<HashableState> |
memoryQueue
A queue for storing the most recently expanded nodes.
|
protected int |
memorySize
the size of the memory; that is, the number of recently expanded search nodes the valueFunction will remember.
|
protected java.util.Map<HashableState,java.lang.Integer> |
memoryStateDepth
Stores the depth at which each state in the memory was explored.
|
maintainClosed, maxDepth, numVisted, optionsFirst, randgc, internalPolicyactions, debugCode, domain, gamma, hashingFactory, mapToStateIndex, rf, tf| Constructor and Description |
|---|
LimitedMemoryDFS(Domain domain,
StateConditionTest gc,
HashableStateFactory hashingFactory,
int maxDepth,
boolean maintainClosed,
boolean optionsFirst,
int memorySize)
Constructor for memory limited DFS
|
| Modifier and Type | Method and Description |
|---|---|
protected SearchNode |
dfs(SearchNode n,
int depth,
java.util.Set<HashableState> statesOnPath)
Runs DFS from a given search node, keeping track of its current depth.
|
SDPlannerPolicy |
planFromState(State initialState)
Plans and returns a
SDPlannerPolicy. |
DFSInit, getNumVisited, numOptionsInGAs, resetSolver, setOptionsFirst, shuffleGroundedActions, sortActionsWithOptionsFirstdeterministicPlannerInit, encodePlanIntoPolicy, hasCachedPlanForState, planContainsOption, planHasDupilicateStates, querySelectedActionForStateaddNonDomainReferencedAction, getActions, getAllGroundedActions, getDebugCode, getDomain, getGamma, getHashingFactory, getRf, getRF, getTf, getTF, setActions, setDebugCode, setDomain, setGamma, setHashingFactory, setRf, setTf, solverInit, stateHash, toggleDebugPrinting, translateActionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddNonDomainReferencedAction, getActions, getDebugCode, getDomain, getGamma, getHashingFactory, getRf, getRF, getTf, getTF, setActions, setDebugCode, setDomain, setGamma, setHashingFactory, setRf, setTf, solverInit, toggleDebugPrintingprotected int memorySize
protected java.util.LinkedList<HashableState> memoryQueue
protected java.util.Map<HashableState,java.lang.Integer> memoryStateDepth
public LimitedMemoryDFS(Domain domain, StateConditionTest gc, HashableStateFactory hashingFactory, int maxDepth, boolean maintainClosed, boolean optionsFirst, int memorySize)
domain - the domain in which to plangc - indicates the goal stateshashingFactory - the state hashing factory to usemaxDepth - depth limit of DFS. -1 specifies no limit.maintainClosed - whether to maintain a closed list or notoptionsFirst - whether to explore paths generated by options first.memorySize - the number of most recently expanded nodes to remember.public SDPlannerPolicy planFromState(State initialState)
SDPlannerPolicy. If
a State is not in the solution path of this planner, then
the SDPlannerPolicy will throw
a runtime exception. If you want a policy that will dynamically replan for unknown states,
you should create your own DDPlannerPolicy.planFromState in interface PlannerplanFromState in class DFSinitialState - the initial state of the planning problemSDPlannerPolicy.protected SearchNode dfs(SearchNode n, int depth, java.util.Set<HashableState> statesOnPath)