![]() |
Grail (C#)
1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Defines objects transforming one value into the other. More...
Public Member Functions | |
Curve (Evaluator< ContextType > childEvaluator) | |
Constructor. More... | |
abstract float | Sample (float argument) |
Transforms argument into output value depending on the type of Curve. More... | |
![]() | |
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 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... | |
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... | |
Additional Inherited Members | |
![]() | |
abstract EvaluatorType | EvaluatorType [get] |
Defines objects transforming one value into the other.
ContextType | Type of evaluated object. By default - ValueTuple(AIEntity, Blackboard). |
|
inline |
Constructor.
childEvaluator | Evaluator which output will be transformed by this curve. |
|
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.
nodeMapping | Maps node pointers to node index. |
debugData | Evaluation debug data which will be filled in this method. |
Implements Grail.Evaluators.Evaluator< ContextType >.
|
inlineprotectedvirtual |
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. |
Implements Grail.Evaluators.Evaluator< ContextType >.
|
pure virtual |
Transforms argument into output value depending on the type of Curve.
argument | Value of a curve argument belonging to its domain. |
Implemented in Grail.Evaluators.Curves.DoubleSidedBound< ContextType >, Grail.Evaluators.Curves.UpperBound< ContextType >, Grail.Evaluators.Curves.StaircaseFunction< ContextType >, Grail.Evaluators.Curves.LinearFunction< ContextType >, Grail.Evaluators.Curves.PowerFunction< ContextType >, Grail.Evaluators.Curves.LowerBound< ContextType >, Grail.Evaluators.Curves.BezierSpline< ContextType >, Grail.Evaluators.Curves.SigmoidFunction< ContextType >, Grail.Evaluators.Curves.UnitStepFunction< ContextType >, Grail.Evaluators.Curves.ExponentialFunction< ContextType >, Grail.Evaluators.Curves.LinearlyInterpolatedCurve< ContextType >, and Grail.Evaluators.Curves.ConstantFunction< ContextType >.