Bardo.AgentManager.Sensor behaviour (Bardo v0.1.0)
View SourceDefines generic sensor behavior.
A sensor is a process that takes input from the environment, converts it into a signal, and then forwards this signal to the cortex neurons to which it is connected.
Summary
Callbacks
Callback to initialize the sensor module state.
Callback to process percept data and generate output signals.
Callback to sense input from the environment.
Optional callback for cleanup when terminating.
Functions
Initializes the sensor process.
Initializes the sensor setting it to its initial state.
Sends a perception from the environment to the sensor.
Spawns a Sensor process belonging to the exoself process that spawned it and calls init to initialize.
Terminates the sensor.
Syncs the sensor with the cortex.
Callbacks
Callback to initialize the sensor module state.
@callback percept( atom(), {percept :: [float()], agent_id :: tuple(), vl :: non_neg_integer(), params :: any(), mod_state :: any()} ) :: {[float()], any()}
Callback to process percept data and generate output signals.
@callback sense( atom(), {agent_id :: tuple(), percept :: [float()], params :: any(), vl :: non_neg_integer(), sensor :: pid() | tuple(), op_mode :: atom(), mod_state :: any()} ) :: any()
Callback to sense input from the environment.
Optional callback for cleanup when terminating.
Functions
Initializes the sensor process.
@spec init_phase2( pid(), pid(), tuple(), tuple(), [pid()], pid(), pid(), {atom(), atom()}, integer(), any(), atom() ) :: :ok
Initializes the sensor setting it to its initial state.
Sends a perception from the environment to the sensor.
For use in tests and simulations.
Spawns a Sensor process belonging to the exoself process that spawned it and calls init to initialize.
Terminates the sensor.
Syncs the sensor with the cortex.