swarmsim.sensors.Sensor#
Abstract Sensor class.
- class swarmsim.sensors.Sensor.Sensor(agent=None, parent=None, static_position=None, n_possible_states=0, draw=True, seed=None, **kwargs)[source]#
Base Sensor class for the agent. This class should not be instantiated directly.
Sensors should typically have a parent that is assigned to them that must be of subclass ‘Agent’ If a parent is not included, a static position is accepted in the form (x, y)
- Attributes:
- position
Methods
as_config_dict
draw
get_state
set_agent
set_parent
set_seed
state_pretty
step
Classes
|
Base Sensor class for the agent. |