Assignment Search Framework
|
Public Member Functions | |
NonGoalHeuristic (const GoalTestFunction< state_t > *g=0, double min_cost=0) | |
virtual | ~NonGoalHeuristic () |
void | setGoalTestFunction (const GoalTestFunction< state_t > *g) |
void | setMinimumActionCost (double min_cost) |
![]() | |
Heuristic () | |
virtual | ~Heuristic () |
virtual void | prepareToCompute () |
double | getHValue (const state_t &state) |
double | getLastHValue () const |
bool | isHValueStored () const |
Protected Member Functions | |
virtual double | computeHValue (const state_t &state) const |
Protected Attributes | |
const GoalTestFunction< state_t > * | goal_test |
The stored goal test function. More... | |
double | min_action_cost |
The minimum cost of any action. More... | |
Defines a heuristic that returns 0 for any goal state, and the minimum action cost for any other state.
NonGoalHeuristic< state_t >::NonGoalHeuristic | ( | const GoalTestFunction< state_t > * | g = 0 , |
double | min_cost = 0 |
||
) |
Constructs a non-goal heuristic for the given goal test function and minimum action cost.
g | The goal test function. Default is set to none. |
min_cost | The minimum action cost. |
|
virtual |
Destructor for a non-goal heuristic. Destructor is empty.
|
protectedvirtual |
Calculates the heuristic value of the given state. Does not store the heuristic value.
If the heuristic value is negative, the heuristic function is indicating unsolvability.
This is the main function to be overloaded.
state | The state whose heuristic value is to be calculated. |
Implements Heuristic< state_t >.
|
inline |
Sets the goal test function to the new given function.
g | The new goal test function. |
void NonGoalHeuristic< state_t >::setMinimumActionCost | ( | double | min_cost | ) |
Sets the minimum action cost to the new minimum cost.
min_cost | The new minimum cost. |
|
protected |
The stored goal test function.
|
protected |
The minimum cost of any action.