Polarith AI
1.8
AIMPerceiver< T > Class Template Referenceabstract

Description

This class and AIMFilter<T> are working together in order to provide the percept data collected by an AIMEnvironment to the agent behaviours.

Components inheriting from this abstract base class use AIMEnvironment components as input and extract all data necessary for the given percept type T . These extracted data can then be used by (multiple) agents with corresponding AIMPerceptBehaviour<T> components for sampling the AI world. Concerning an agent, an appropriate derived AIMFilter<T> component needs to be used in order to access the extracted percept data.

For each specified environment, there is a corresponding entry within the Percepts dictionary holding all extracted percepts belonging to the specific environment which can be accessed by the associated AIMEnvironment.Label. Furthermore, if an environment is considered AIMEnvironment.Static, the percept data gets only extracted once. This would be optimal for never changing scene parts like fixed walls in order to increase performance.

There can only be one concrete AIMPerceiver<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 AIMPerceiver< T >:

Public Fields

readonly IDictionary< string, IList< T > > Percepts = new Dictionary<string, IList<T>>()
 Extracted percept data corresponding to every specified environment which can be accessed by its AIMEnvironment.Label (read only). More...
 
List< AIMEnvironmentEnvironments = new List<AIMEnvironment>()
 All environment components which should be considered for the extraction of the percept data. More...
 

Public Methods

virtual void Update ()
 Updates this perceiver instance. More...
 
void PerceiveStatic ()
 Forces the system to re-perceive static environments. More...
 

Protected Methods

abstract void PerceiveEnvironment (AIMEnvironment environment, IList< T > percepts)
 Extracts all percept data relevant for the given percept type T . More...
 
virtual void StartPerceiving ()
 This method is called before any environments are being updated in a loop by PerceiveEnvironment(AIMEnvironment, IList<T>). More...
 
Imprint