public class WeightedGreedy extends AStar
DeterministicPlanner.PlanningFailedException| Modifier and Type | Field and Description |
|---|---|
protected double |
costWeight
The cost function weight.
|
cumulatedRewardMap, heuristic, lastComputedCumRgc, internalPolicyactions, debugCode, domain, gamma, hashingFactory, mapToStateIndex, rf, tf| Constructor and Description |
|---|
WeightedGreedy(Domain domain,
RewardFunction rf,
StateConditionTest gc,
HashableStateFactory hashingFactory,
Heuristic heuristic,
double costWeight)
Initializes the valueFunction.
|
| Modifier and Type | Method and Description |
|---|---|
double |
computeF(PrioritizedSearchNode parentNode,
GroundedAction generatingAction,
HashableState successorState)
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, updateOpenplanFromStatedeterministicPlannerInit, encodePlanIntoPolicy, hasCachedPlanForState, planContainsOption, planHasDupilicateStates, querySelectedActionForState, resetSolveraddNonDomainReferencedAction, 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, toggleDebugPrintingpublic WeightedGreedy(Domain domain, RewardFunction rf, StateConditionTest gc, HashableStateFactory hashingFactory, Heuristic heuristic, double costWeight)
domain - the domain in which to planrf - the reward function that represents costs as negative rewardgc - should evaluate to true for goal states; false otherwisehashingFactory - the state hashing factory to useheuristic - 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, HashableState successorState)
BestFirstcomputeF in class AStarparentNode - 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