domain_sensors behaviour (faber_neuroevolution v1.2.4)
View SourceDomain Sensor Provider behaviour.
Domains implement this behaviour to declare what sensors they provide and how to read sensor values from the domain state.
Example Implementation
A domain bridge module implementing this behaviour:
-module(my_domain_bridge). -behaviour(domain_sensors).
sensor_spec() -> [#{name => vision_food, dimension => 8, range => {0.0, 1.0}, level => l0, category => ecological, description => "Distance to food in 8 directions"}].
read_sensors(DomainState) -> #{vision_food => calculate_vision(DomainState)}.
Summary
Types
Callbacks
-callback read_sensors(DomainState :: term()) -> sensor_readings().
-callback sensor_spec() -> [sensor_definition()].