Core¶
Engine¶
policy_arena.core.engine
¶
Scenario¶
policy_arena.core.scenario
¶
Scenario configuration — plain dataclass for Phase 1.
Scenario(world_class, world_params=dict(), steps=100, seed=None)
dataclass
¶
Full specification for a simulation run.
In Phase 1 this is constructed programmatically. YAML config loading added in Phase 2.
Types¶
policy_arena.core.types
¶
Shared types used across the simulation engine.
Plain dataclasses — no Pydantic until Phase 2 config layer.
Action
¶
Bases: Enum
Discrete action space for matrix games.
Observation(my_history=list(), opponent_history=list(), round_number=0, extra=dict())
dataclass
¶
What an agent sees before making a decision.
For PD: history of past rounds with each opponent.
Extensible via extra for game-specific observations.
RoundResult(action, opponent_action, payoff, round_number)
dataclass
¶
Outcome of a single round for one agent.