socioverse.abc — the interfaces¶
A study is complete when it implements the first four; Core implements the rest.
EnvironmentProvider¶
socioverse.abc.environment ¶
EnvironmentProvider ABC — the dynamic environment E.
Implementations own the world state and expose the two time channels
- advance_to(t): SCHEDULED/exogenous change (numeric events + information broadcasts)
- apply(actions): ENDOGENOUS feedback E_{t+1} = f(E_t, B_t)
and the per-agent view assembly observe_batch() that materializes the 4 quadrants.
EnvironmentProvider ¶
Bases: ABC
reset
abstractmethod
¶
advance_to
abstractmethod
¶
Apply scheduled numeric events + activate information broadcasts whose at_step <= t and that haven't fired. Returns the events that fired (for logging).
apply
abstractmethod
¶
observe_batch
abstractmethod
¶
Assemble the 4-quadrant Observation per agent. Macro layers are shared verbatim; local layers are filtered by each agent's position/network.
Source code in socioverse/abc/environment.py
agent_state
abstractmethod
¶
PopulationProvider¶
socioverse.abc.population ¶
DecisionModel¶
socioverse.abc.decision ¶
DecisionModel ABC — computes behavior B_t.
decide_batch is the primary method: implementations are free to internally group/dedup agents (e.g. by archetype) before issuing LLM calls. This keeps the Chicago model's archetype-batched LLM strategy (one batch per phase) instead of ~N per-agent calls.
MetricCollector & TrajectoryStore¶
socioverse.abc.trajectory ¶
TrajectoryStore + MetricCollector ABCs (the longitudinal panel + metrics).
TrajectoryStore ¶
Simulator¶
socioverse.abc.simulator ¶
MessageBus¶
socioverse.abc.messaging ¶
MessageBus ABC — the inter-agent communication medium (scenario 2, HiSim).
Agent communication is mediated, NOT O(N^2) direct calls: a post/reply action
lands on the bus (a local-information channel); the next observation delivers it to
the author's network neighbours. A simple in-memory implementation lives in
engine/messaging.py; large-scale backends (DuckDB/Redis) can subclass this.