![]() |
Grail (C++)
1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
The Evaluator class - base class being able to evaluate given context and output the result. More...
#include <Evaluator.hh>
Public Member Functions | |
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 data::EvaluatorType | GetEvaluatorType () const =0 |
Protected Member Functions | |
virtual float | Evaluate (const ContextType &context, data::UtilityEvaluatorSnapshot *const snapshot) const =0 |
Evaluate - Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator. More... | |
virtual void | DebugDump (const std::map< const void *, unsigned int > &nodeMapping, data::EvaluationDebugData &debugData) const =0 |
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... | |
The Evaluator class - base class being able to evaluate given context and output the result.
|
protectedpure virtual |
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.
nodeMapping | - Maps node pointers to node index. |
debugData | - Evaluation debug data which will be filled in this method |
Implemented in grail::evaluator::Curve< ContextType >, grail::evaluator::Aggregator< ContextType >, and grail::evaluator::Consideration< ContextType >.
|
protectedpure virtual |
Evaluate - Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator.
context | - Input data for evaluation |
snapshot | - Evaluator snapshot containing debug data describing whole evaluator tree. |
Implemented in grail::evaluator::Consideration< ContextType >, grail::evaluator::Curve< ContextType >, grail::evaluator::MaxAggregator< ContextType >, grail::evaluator::MinAggregator< ContextType >, grail::evaluator::AverageAggregator< ContextType >, grail::evaluator::ProductAggregator< ContextType >, and grail::evaluator::SumAggregator< ContextType >.
|
inline |
EvaluateContext - evaluates provided context and if provided snapshot is not empty, fills it with debug data describing this node.
context | - input data for evaluation |
snapshot | - evaluator snapshot containing debug data describing whole evaluator tree |