simvx.core.ai.sensor

Sensors: turn world / context state into percepts on a Blackboard.

A Sensor reads the current AIContext (the agent, the world, the blackboard) and writes what it perceives back onto the blackboard. A Perception runs a list of sensors each tick. Both classical and LLM brains share this perception layer, so swapping deciders never touches sensing.

Module Contents

Classes

Sensor

Reads the context and writes percepts to ctx.blackboard.

Perception

An ordered collection of sensors run together each tick.

API

class simvx.core.ai.sensor.Sensor[source]

Bases: abc.ABC

Reads the context and writes percepts to ctx.blackboard.

abstractmethod sense(ctx: simvx.core.ai.brain.AIContext) None[source]
__slots__

()

class simvx.core.ai.sensor.Perception(sensors: list[simvx.core.ai.sensor.Sensor] | tuple[simvx.core.ai.sensor.Sensor, ...] = ())[source]

An ordered collection of sensors run together each tick.

Initialization

add(sensor: simvx.core.ai.sensor.Sensor) simvx.core.ai.sensor.Sensor[source]
sense(ctx: simvx.core.ai.brain.AIContext) None[source]