public class WeightedGreedy extends AStar
|Modifier and Type||Field and Description|
The cost function weight.
cumulatedRewardMap, heuristic, lastComputedCumR
|Constructor and Description|
Initializes the planner.
|Modifier and Type||Method and Description|
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
deterministicPlannerInit, encodePlanIntoPolicy, hasCachedPlanForState, planContainsOption, planHasDupilicateStates, querySelectedActionForState, resetPlannerResults
addNonDomainReferencedAction, getActions, getAllGroundedActions, getDebugCode, getDomain, getGamma, getHashingFactory, getRf, getRF, getTf, getTF, plannerInit, setActions, setDebugCode, setDomain, setGamma, setRf, setTf, stateHash, toggleDebugPrinting, translateAction
public WeightedGreedy(Domain domain, RewardFunction rf, StateConditionTest gc, StateHashFactory hashingFactory, Heuristic heuristic, double costWeight)
domain- the domain in which to plan
rf- the reward function that represents costs as negative reward
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.
costWeight- a fraction 0 <= w <= 1. When w = 0, the search is fully greedy. When w = 1, the search is optimal and equivalent to A*.
public double computeF(PrioritizedSearchNode parentNode, GroundedAction generatingAction, StateHashTuple successorState)
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 generated