public class LimitedMemoryDFS extends DFS
DeterministicPlanner.PlanningFailedException
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedList<StateHashTuple> |
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 planner will remember.
|
protected java.util.Map<StateHashTuple,java.lang.Integer> |
memoryStateDepth
Stores the depth at which each state in the memory was explored.
|
maintainClosed, maxDepth, numVisted, optionsFirst, rand
gc, internalPolicy
actions, containsParameterizedActions, debugCode, domain, gamma, hashingFactory, mapToStateIndex, rf, tf
Constructor and Description |
---|
LimitedMemoryDFS(Domain domain,
StateConditionTest gc,
StateHashFactory 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<StateHashTuple> statesOnPath)
Runs DFS from a given search node, keeping track of its current depth.
|
void |
planFromState(State initialState)
This method will cause the planner to begin planning from the specified initial state
|
DFSInit, getNumVisited, numOptionsInGAs, resetPlannerResults, setOptionsFirst, shuffleGroundedActions, sortActionsWithOptionsFirst
deterministicPlannerInit, encodePlanIntoPolicy, hasCachedPlanForState, planContainsOption, planHasDupilicateStates, querySelectedActionForState
addNonDomainReferencedAction, getActions, getAllGroundedActions, getDebugCode, getDomain, getGamma, getHashingFactory, getRf, getRF, getTf, getTF, plannerInit, setActions, setDebugCode, setDomain, setGamma, setRf, setTf, stateHash, toggleDebugPrinting, translateAction
protected int memorySize
protected java.util.LinkedList<StateHashTuple> memoryQueue
protected java.util.Map<StateHashTuple,java.lang.Integer> memoryStateDepth
public LimitedMemoryDFS(Domain domain, StateConditionTest gc, StateHashFactory 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 void planFromState(State initialState)
OOMDPPlanner
planFromState
in class DFS
initialState
- the initial state of the planning problemprotected SearchNode dfs(SearchNode n, int depth, java.util.Set<StateHashTuple> statesOnPath)