Polarith AI
1.8
AIMFilter< T > Class Template Referenceabstract

Description

AIMFilter<T> forwards the data of the percepts, holding by an AIMPerceiver<T>, to the behaviours of an agent.

Components inheriting from this abstract base class take AIMPerceiver<T> components having a matching percept type T as input. With these, the purpose of a filter is to provide access to percept data for AIMPerceptBehaviour<T> components to sample an agent's world (environment), whereby the data might simply be passed through or, like the component name suggests, filtered to fulfil the needs of the specific agent. For example, it would increase the performance to use a tree structure, e.g. a quadtree or octree, for obtaining percepts which might be relevant for an agent (and its behaviours) because they are close enough to be recognized. This would save the behaviours of an agent numerous of unnecessary percept iterations within the movement AI pipeline.

There can only be one concrete AIMFilter<T> component attached to a GameObject at a time.

Template Parameters
TType of the percept holding extracted data, needs to implement IPercept<T> and to provide a constructor.
Type Constraints
T :IPercept<GameObject> 
T :new() 
Inheritance diagram for AIMFilter< T >:
IEvaluationPreparer

Public Fields

readonly T Self = new T()
 Percept data of the agent itself (read only). More...
 

Protected Fields

AIMContext aimContext
 Reference to the associated AIMContext component. More...
 

Properties

abstract AIMPerceiver< T > Perceiver [get]
 Reference to the input component of the extracted percept data (read only). More...
 
bool Enabled [get, set]
 Determines whether this component is enabled. More...
 

Public Methods

abstract void GetPercepts (IList< string > environments, IList< T > percepts)
 Obtains the extracted percepts of type T belonging to the specified environments . More...
 
virtual void PrepareEvaluation ()
 Needs to be called before Context.Evaluate gets called within the main thread. More...
 

Protected Methods

virtual void Awake ()
 Awake is called when the script instance is being loaded. More...
 
virtual void OnDestroy ()
 This method is called when the MonoBehaviour will be destroyed. More...
 
Imprint