How lochheadr92-creator/simulation-3 works
This repository implements a deterministic simulation: seeded scenarios produce proposals, a kernel settles each tick into immutable world state, and stream tooling records, resumes, replays, and presents runs. The world package adds a broader simulation domain—decision-making, ecology, resources, social behavior, and observation—with viewer components. The excerpts establish the kernel and stream relationships; most world modules were not sampled, so their internal wiring is intentionally not inferred.
Main entry points: run.py Run orchestration · engine.py Tick engine · run_file.py Append-only run file · settlement.py Tick settlement
Components 24
Simulation kernel
- Tick engine
kernel/engine.py - Proposal expansion
kernel/proposals.py - Tick settlement
kernel/settlement.py - Immutable state
kernel/state.py - Tick outcomes
kernel/outcomes.py - Canonical identity
kernel/canonical.py - Diagnostics
kernel/diagnostics.py
Run lifecycle
- Seeded scenario
stream/scenario.py - Run orchestration
stream/run.py - Append-only run file
stream/run_file.py - Run recovery
stream/recover.py - Run replay
stream/replay.py
World simulation
- World runner
world/run.py - World decisions
world/decide.py - World processes
world/process.py - Ecology
world/ecology.py - Resource activities
world/foraging.py - Social behavior
world/social.py - World observation
world/observe.py - World storage
world/storage.py
Views and inspection
- Run viewer
stream/viewer.py - World view
viewer/world_view.py - Interactive viewer
world/viewer.js
Other components
- Simulation user
Connections 21
- Run orchestration → Seeded scenario: generates inputs
stream/run.py - Run orchestration → Tick engine: runs ticks
stream/run.py - Run orchestration → Append-only run file: writes run
stream/run.py - Run orchestration → Run recovery: uses recovery
stream/run.py - Run orchestration → Run replay: uses replay
stream/run.py - Run orchestration → Run viewer: uses viewer
stream/run.py - Tick engine → Tick settlement: settles tick
kernel/engine.py - Tick engine → Tick outcomes: builds record
kernel/engine.py - Tick engine → Diagnostics: publishes to
kernel/engine.py - Tick settlement → Proposal expansion: expands proposals
kernel/settlement.py - Tick settlement → Immutable state: commits state
kernel/settlement.py - Seeded scenario → Proposal expansion: creates proposals
stream/scenario.py - Append-only run file → Canonical identity: uses identity
stream/run_file.py - Run recovery → Append-only run file: reads run
stream/recover.py - Run replay → Append-only run file: reads run
stream/replay.py - Run replay → Tick engine: replays through
stream/replay.py - Run viewer → Append-only run file: reads run
stream/viewer.py - World storage → World observation: uses observation
world/storage.py - Simulation user → Run orchestration: starts simulation
- Simulation user → World view: inspects world
- Simulation user → Interactive viewer: views simulation