![]() |
Grail (C#)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Base class being able to evaluate given context and output the result. More...

Public Member Functions | |
| float | EvaluateContext (ContextType context, in UtilityEvaluatorSnapshot snapshot) |
| Evaluates provided context and if provided snapshot is not empty, fills it with debug data describing this node. More... | |
| abstract void | GetDependentConsiderations (List< Consideration< ContextType >> considerations) |
Static Public Member Functions | |
| static void | CacheConsiderationEvaluations (Evaluator< ContextType > evaluator, ContextType context) |
Protected Member Functions | |
| abstract float | Evaluate (ContextType context, in UtilityEvaluatorSnapshot snapshot) |
| Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator. More... | |
| abstract void | DebugDump (IReadOnlyDictionary< object, int > nodeMapping, ref EvaluationDebugData debugData) |
| 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... | |
Properties | |
| abstract EvaluatorType | EvaluatorType [get] |
Base class being able to evaluate given context and output the result.
| ContextType |
|
protectedpure virtual |
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.Evaluators.Curves.Curve< ContextType >, Grail.Evaluators.Consideration< ContextType >, and Grail.Evaluators.Aggregators.Aggregator< ContextType >.
|
protectedpure virtual |
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.Evaluators.Consideration< ContextType >, Grail.Evaluators.Curves.Curve< ContextType >, Grail.Evaluators.Aggregators.AverageAggregator< ContextType >, Grail.Evaluators.Aggregators.MaxAggregator< ContextType >, Grail.Evaluators.Aggregators.MinAggregator< ContextType >, Grail.Evaluators.Aggregators.ProductAggregator< ContextType >, and Grail.Evaluators.Aggregators.SumAggregator< ContextType >.
|
inline |
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. |