Abstract type of Evaluator representing a subset of game state.
More...
|
override void | GetDependentConsiderations (List< Consideration< ContextType >> considerations) |
|
void | CacheEvaluation (ContextType context) |
|
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...
|
|
|
sealed override EvaluatorType | EvaluatorType => EvaluatorType.CONSIDERATION |
|
|
abstract float | Evaluate (ContextType context) |
| Abstract method, which should be overriden by the user to return proper value representing desirable subset of game state. More...
|
|
sealed override 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...
|
|
sealed override 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 string | Name [get] |
|
abstract EvaluatorType | EvaluatorType [get] |
|
|
static void | CacheConsiderationEvaluations (Evaluator< ContextType > evaluator, ContextType context) |
|
Abstract type of Evaluator representing a subset of game state.
- Template Parameters
-
ContextType | Type of evaluated object. By default - ValueTuple(AIEntity, Blackboard). |
◆ 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.Evaluators.Evaluator< ContextType >.
◆ Evaluate() [1/2]
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]
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.Evaluators.Evaluator< ContextType >.
The documentation for this class was generated from the following file:
- GrailEvaluators/source/Consideration.cs