(C++)
1.1.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, 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 EvaluatorType | GetEvaluatorType () const =0 |
Protected Member Functions | |
virtual float | Evaluate (const ContextType &context, 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 *, std::size_t > &nodeMapping, 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::curves::Curve< ContextType >, grail::utility::Aggregator< ContextType >, and grail::utility::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::curves::Curve< ContextType >, grail::utility::Consideration< ContextType >, grail::utility::SumAggregator< ContextType >, grail::utility::ProductAggregator< ContextType >, grail::utility::MinAggregator< ContextType >, grail::utility::MaxAggregator< ContextType >, and grail::utility::AverageAggregator< 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 |