Grail (C#)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Evaluators.Aggregators.Aggregator< ContextType > Class Template Reference

Base class for an Evaluator aggregating multiple other Evaluators' scores into one output. More...

Inheritance diagram for Grail.Evaluators.Aggregators.Aggregator< ContextType >:
Collaboration diagram for Grail.Evaluators.Aggregators.Aggregator< ContextType >:

Public Member Functions

 Aggregator (IEnumerable< Evaluator< ContextType >> childEvaluators)
 Constructor. More...
 
override void GetDependentConsiderations (List< Consideration< ContextType >> considerations)
 
- Public Member Functions inherited from Grail.Evaluators.Evaluator< ContextType >
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...
 

Protected Member Functions

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...
 
- Protected Member Functions inherited from Grail.Evaluators.Evaluator< ContextType >
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...
 

Protected Attributes

readonly List< Evaluator< ContextType > > childEvaluators = new List<Evaluator<ContextType>>()
 

Additional Inherited Members

- Static Public Member Functions inherited from Grail.Evaluators.Evaluator< ContextType >
static void CacheConsiderationEvaluations (Evaluator< ContextType > evaluator, ContextType context)
 
- Properties inherited from Grail.Evaluators.Evaluator< ContextType >
abstract EvaluatorType EvaluatorType [get]
 

Detailed Description

Base class for an Evaluator aggregating multiple other Evaluators' scores into one output.

Template Parameters
ContextTypeType of evaluated object. By default - ValueTuple(AIEntity, Blackboard).

Constructor & Destructor Documentation

◆ Aggregator()

Grail.Evaluators.Aggregators.Aggregator< ContextType >.Aggregator ( IEnumerable< Evaluator< ContextType >>  childEvaluators)
inline

Constructor.

Parameters
childEvaluatorsAll evaluators which scores should be aggregated during evaluation of this node.

Member Function Documentation

◆ DebugDump()

sealed override void Grail.Evaluators.Aggregators.Aggregator< ContextType >.DebugDump ( IReadOnlyDictionary< object, int >  nodeMapping,
ref EvaluationDebugData  debugData 
)
inlineprotectedvirtual

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
nodeMappingMaps node pointers to node index.
debugDataEvaluation debug data which will be filled in this method.

Implements Grail.Evaluators.Evaluator< ContextType >.


The documentation for this class was generated from the following file: