#include <Goal.hh>
Represents a planner goal, used by PlannerReasoner. A single planning problem may have multiple Goals defined.
◆ GetHeuristic()
PlannerHeuristic grail::planner::Goal::GetHeuristic |
( |
| ) |
const |
|
virtual |
- Returns
- the heuristic used to make the planning algorithm more efficient. For more information, consult the planner's documentation.
◆ IsReached()
virtual bool grail::planner::Goal::IsReached |
( |
const AIEntity & |
entity | ) |
const |
|
pure virtual |
Determines if the goal has been satisfied for the provided AIEntity.
- Parameters
-
entity | - the AIEntity object to test the achievement of the goal for. |
- Returns
- true if the goal has been reached and false otherwise.
◆ OnChosen()
void grail::planner::Goal::OnChosen |
( |
const AIEntity & |
goalPursuer | ) |
|
|
virtual |
Called after the Goal is set by the reasoner. Put your custom logic, if needed. Te base implementation is empty.
- Parameters
-
goalPursuer | - the entity that has chosen this goal |
◆ OnReached()
void grail::planner::Goal::OnReached |
( |
const AIEntity & |
goalPursuer | ) |
const |
|
virtual |
◆ OnReapplied()
void grail::planner::Goal::OnReapplied |
( |
const AIEntity & |
goalPursuer | ) |
|
|
virtual |
Called if the current plan failed to achieve this goal but it got chosen once again
- Parameters
-
goalPursuer | - the entity that has chosen this goal |
◆ SetPlanSpaceConditions()
virtual void grail::planner::Goal::SetPlanSpaceConditions |
( |
class Planner & |
planner, |
|
|
const ObjectIndexBinding & |
objectIndexBinding |
|
) |
| const |
|
pure virtual |
In this method, all plan-space goal conditions should be set.
- Parameters
-
planner | - the planner to be provided with goal conditions. Use Planner::pushCondition method. |
The documentation for this class was generated from the following files:
- GrailPlanners/Goal.hh
- GrailPlanners/Goal.cpp