1 #ifndef GRAIL_CONSIDERATION_H
2 #define GRAIL_CONSIDERATION_H
4 #include "../GrailCore/AIEntity.hh"
5 #include "../GrailCore/Blackboard.hh"
6 #include "Evaluator.hh"
13 template <
typename ContextType>
31 virtual EvaluatorType GetEvaluatorType()
const override final {
return EvaluatorType::CONSIDERATION; }
33 virtual std::string GetDisplayName()
const {
return "unnamed_consideration"; }
41 virtual float Evaluate(
const ContextType& context)
const = 0;
45 debugData.SetMetadata(GetDisplayName());
60 using DefaultConsideration = Consideration<const AIEntity*>;
61 using EntityBlackboardPair = std::pair<const AIEntity*, Blackboard>;
62 using UtilityConsideration = Consideration<EntityBlackboardPair>;
The EvaluationDebugData class - debug data describing singular evaluator.
Definition: EvaluationDebugData.h:20
The UtilityEvaluatorSnapshot class - debug snapshot of whole evaluator tree assigned to evaluated obj...
Definition: UtilityEvaluatorSnapshot.h:22
The Consideration class - Abstract type of Evaluator representing a subset of game state.
Definition: Consideration.hh:19
virtual float Evaluate(const ContextType &context, UtilityEvaluatorSnapshot *const snapshot) const override final
Evaluate - Called from EvaluateContext which also evaluates context, but without automatically fillin...
Definition: Consideration.hh:54
virtual float Evaluate(const ContextType &context) const =0
Evaluate - Abstract method, which should be overriden by the user to return proper value representing...
virtual void DebugDump(const std::map< const void *, std::size_t > &, EvaluationDebugData &debugData) const override final
DebugDump - Called from EvaluateContext, which generates additional debug data for each evaluator....
Definition: Consideration.hh:43
The Evaluator class - base class being able to evaluate given context and output the result.
Definition: Evaluator.hh:21