The Consideration class - Abstract type of Evaluator representing a subset of game state.
More...
#include <Consideration.hh>
|
| Consideration (const Consideration< ContextType > &)=default |
|
| Consideration (Consideration< ContextType > &&)=default |
|
Consideration & | operator= (const Consideration< ContextType > &)=default |
|
Consideration & | operator= (Consideration< ContextType > &&)=default |
|
virtual data::EvaluatorType | GetEvaluatorType () const override final |
|
virtual std::string | GetDisplayName () const |
|
virtual void | GetDependentConsiderations (std::vector< Consideration< ContextType > * > &considerations) override |
|
float | EvaluateContext (const ContextType &context, data::UtilityEvaluatorSnapshot *const snapshot) const |
| EvaluateContext - evaluates provided context and if provided snapshot is not empty, fills it with debug data describing this node. More...
|
|
|
virtual float | Evaluate (const ContextType &context) const =0 |
| Evaluate - Abstract method, which should be overriden by the user to return proper value representing desirable subset of game state. More...
|
|
virtual void | DebugDump (const std::map< const void *, unsigned int > &, data::EvaluationDebugData &debugData) const override final |
| DebugDump - Called from EvaluateContext, which generates additional debug data for each evaluator. Should be overriden in each derived evaluator to better reflect debug tree topology. More...
|
|
virtual float | Evaluate (const ContextType &context, data::UtilityEvaluatorSnapshot *const snapshot) const override final |
| Evaluate - Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator. More...
|
|
|
template<typename FunctionContextType > |
void | CacheConsiderationEvaluations (std::shared_ptr< Evaluator< FunctionContextType >> evaluator, FunctionContextType context) |
|
template<typename ContextType>
class grail::evaluator::Consideration< ContextType >
The Consideration class - Abstract type of Evaluator representing a subset of game state.
- Template Parameters
-
ContextType | - Type of evaluated object. By default - ValueTuple(AIEntity, Blackboard). |
◆ DebugDump()
template<typename ContextType >
|
inlinefinaloverrideprotectedvirtual |
DebugDump - Called from EvaluateContext, which generates additional debug data for each evaluator. Should be overriden in each derived evaluator to better reflect debug tree topology.
- Parameters
-
nodeMapping | - Maps node pointers to node index. |
debugData | - Evaluation debug data which will be filled in this method |
Implements grail::evaluator::Evaluator< ContextType >.
◆ Evaluate() [1/2]
template<typename ContextType >
Evaluate - Abstract method, which should be overriden by the user to return proper value representing desirable subset of game state.
- Parameters
-
context | - Object from which user can calculate desirable subset of game state. |
- Returns
- Value representing subset of game state.
◆ Evaluate() [2/2]
template<typename ContextType >
|
inlinefinaloverrideprotectedvirtual |
Evaluate - Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator.
- Parameters
-
context | - Input data for evaluation. |
snapshot | - Evaluator snapshot containing debug data describing whole evaluator tree. |
- Returns
- Numerical evaluation of provided context.
Implements grail::evaluator::Evaluator< ContextType >.
The documentation for this class was generated from the following file: