Context builds the foundation of the AI system by providing access to all important modules (back-end class).
Derived Context<TValue, TStructure> using float as type for the objective values and Structure as type for the structural element (for the contained Sensor). It properly extends the Context<TValue, TStructure>.Evaluate and Context<TValue, TStructure>.MakeDecision methods for the specific types used.
In addition to Context<TValue, TStructure>, this derived class holds and provides additional information necessary for moving characters in 3D space.
Back-end class of AIMContext.
Public Fields | |
Vector3 | DecidedDirection = Vector3.zero |
The evaluated direction in world coordinates, as against Decision only contains a version of this field in local coordinates. More... | |
Vector3 | DecidedReceptorPosition = Vector3.zero |
The evaluated position in world coordinates, as against Decision only contains a version of this field in local coordinates. More... | |
Matrix4x4 | LocalToWorldMatrix = Matrix4x4.identity |
Matrix that transforms a point from local space into world space. More... | |
Matrix4x4 | WorldToLocalMatrix = Matrix4x4.identity |
Matrix that transforms a point from world space into local space. More... | |
float | DeltaTime |
The time which has been necessary to compute the latest frame. More... | |
Properties | |
override IProblem< float > | Problem [get] |
Holds objective values defining a MCO problem to be solved (read only). More... | |
override IDecision< float, Structure > | Decision [get] |
Container for storing the results from Evaluate. More... | |
Public Methods | |
override void | Evaluate () |
Processes the AI main loop for defining and solving the hold Problem writing the results into the Decision, therefore and for solving, the MakeDecision method gets called. More... | |
void | BuildContext () |
Sets up this Context instance based on the data which might have been already serialized through Unity. More... | |
float | GetEpsilonConstraint (int index) |
If the given objective index is valid, the corresponding epsilon-constraint is returned. More... | |
bool | IsObjectiveMinimized (int index) |
Determines whether the objective with the specified index is minimized when calling Evaluate. More... | |
bool | IsObjectiveNormalized (int index) |
Determines whether the objective with the specified index is normalized when calling Evaluate. More... | |
bool | IsObjectiveUnlimited (int index) |
Determines whether the objective with the specified index is unlimited. More... | |
void | SetEpsilonConstraint (int index, float value) |
If the given objective index is valid, the corresponding epsilon-constraint is set to the specified value . More... | |
void | SetObjectiveMinimized (int index, bool minimized) |
Allows to set whether the objective with the specified index is minimized when calling Evaluate. More... | |
void | SetObjectiveNormalized (int index, bool normalized) |
Allows to set whether the objective with the specified index is normalized when calling Evaluate. More... | |
void | SetObjectiveUnlimited (int index) |
Determines if the objective with the specified index is unlimited. More... | |
void | ClearObjectives () |
Removes all objectives including all values. More... | |
void | ClearValues () |
Removes all values but preserves the number of objectives. More... | |
void | Reset () |
Resets this instance to default values. More... | |
Protected Methods | |
override void | MakeDecision () |
This is the place for solving the given MCO Problem and collecting all information which are necessary for a complete Decision. More... | |