public class StaticWeightedAStar extends AStar
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. 1. Pohl, Ira (1970). "First results on the effect of error in heuristic search". Machine Intelligence 5: 219-236.
DeterministicPlanner.PlanningFailedException
Modifier and Type | Field and Description |
---|---|
protected double |
epsilonP1
The > 1 epsilon parameter.
|
cumulatedRewardMap, heuristic, lastComputedCumR
gc, internalPolicy
actionTypes, debugCode, domain, gamma, hashingFactory, model, usingOptionModel
Constructor and Description |
---|
StaticWeightedAStar(SADomain domain,
StateConditionTest gc,
HashableStateFactory hashingFactory,
Heuristic heuristic,
double epsilon)
Initializes.
|
Modifier and Type | Method and Description |
---|---|
double |
computeF(PrioritizedSearchNode parentNode,
Action generatingAction,
HashableState successorState,
double r)
This method returns the f-score for a state given the parent search node, the generating action, the state that was produced.
|
insertIntoOpen, postPlanPrep, prePlanPrep, updateOpen
planFromState
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 double epsilonP1
public StaticWeightedAStar(SADomain domain, StateConditionTest gc, HashableStateFactory hashingFactory, Heuristic heuristic, double epsilon)
domain
- the domain in which to plangc
- should evaluate to true for goal states; false otherwisehashingFactory
- the state hashing factory to useheuristic
- the planning heuristic. Should return non-positive values.epsilon
- parameter > 1. The larger the value the more greedy.public double computeF(PrioritizedSearchNode parentNode, Action generatingAction, HashableState successorState, double r)
BestFirst
computeF
in class AStar
parentNode
- the parent search node (and its priority) that from which the next state was generated.generatingAction
- the action that was used to generate the next state.successorState
- the next state that was generatedr
- the reward received for the transition