# shazamifius/simulateur-d-emergence-d-eterministe architecture

> Architecture diagram of the GitHub repository shazamifius/simulateur-d-emergence-d-eterministe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shazamifius/simulateur-d-emergence-d-eterministe
- Repository: https://github.com/shazamifius/simulateur-d-emergence-d-eterministe

## Overview

SED is a deterministic 3D cellular simulation with an interactive Rust application, headless execution, and a Python agent that explores parameter settings through the application's command API. The main runtime path is user or agent input → application controls → world cycles → emergent cell state and reported metrics. Snapshots, replay, and CSV export are documented capabilities, but their implementation details are not visible in the sampled excerpts; the graph therefore shows them as application-owned features without asserting their internal wiring.

Main entry points: [`src/simulation/world.rs`](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/world.rs) (World cycles), [`src/main.rs`](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs) (Command API), [`agent_explorateur.py`](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/agent_explorateur.py) (Exploration agent), [`src/simulation/chunk.rs`](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/chunk.rs) (Chunk storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["Rust application<br/>[main.rs]"]
  node_ui["3D UI and editing<br/>[main.rs]"]
  node_headless["Headless runner<br/>[main.rs]"]
  node_api["Command API<br/>[main.rs]"]
  node_scenario["Scenario input<br/>[default.json]"]
end

subgraph group_engine["Simulation engine"]
  node_world["World cycles<br/>[world.rs]"]
  node_laws["Physical and neural laws<br/>[laws.rs]"]
  node_params["Global parameters<br/>[params.rs]"]
  node_cells["Cell state<br/>[cell.rs]"]
  node_chunks["Chunk storage<br/>[chunk.rs]"]
end

subgraph group_analysis["Exploration and outputs"]
  node_agent["Exploration agent"]
  node_scoring["Run scoring"]
  node_outputs["Snapshots, replay, CSV<br/>[main.rs]"]
end

node_user(("User"))
node_command_client(("Command client"))
node_result_files["Output files"]

node_user -->|"edits and controls"| node_ui
node_ui -->|"updates state"| node_app
node_app -->|"advances cycles"| node_world
node_headless -->|"runs cycles"| node_world
node_scenario -->|"loads scenario"| node_headless
node_command_client -->|"sends commands"| node_api
node_agent -->|"sends commands"| node_api
node_api -->|"resets and steps"| node_world
node_world -->|"evaluates rules"| node_laws
node_world -->|"reads parameters"| node_params
node_world -->|"updates chunks"| node_chunks
node_chunks -->|"stores cells"| node_cells
node_world -->|"updates cell state"| node_cells
node_agent -->|"scores runs"| node_scoring
node_agent -->|"requests run data"| node_api
node_app -->|"records and restores"| node_outputs
node_outputs -->|"reads and writes"| node_result_files
node_headless -->|"exports results"| node_result_files

click node_app "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs"
click node_ui "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs"
click node_headless "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs"
click node_api "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs"
click node_scenario "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/scenarios/default.json"
click node_world "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/world.rs"
click node_laws "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/laws.rs"
click node_params "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/params.rs"
click node_cells "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/cell.rs"
click node_chunks "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/chunk.rs"
click node_agent "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/agent_explorateur.py"
click node_scoring "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/agent_explorateur.py"
click node_outputs "https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_ui,node_headless,node_api,node_scenario,node_user,node_command_client toneBlue
class node_world,node_laws,node_params,node_cells,node_chunks toneAmber
class node_agent,node_scoring,node_outputs toneMint
class node_result_files toneIndigo
```

## Components

### Application

- [Rust application](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs): `src/main.rs`
- [3D UI and editing](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs): `src/main.rs`
- [Headless runner](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs): `src/main.rs`
- [Command API](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs): `src/main.rs`
- [Scenario input](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/scenarios/default.json): `scenarios/default.json`

### Simulation engine

- [World cycles](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/world.rs): `src/simulation/world.rs`
- [Physical and neural laws](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/laws.rs): `src/simulation/laws.rs`
- [Global parameters](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/params.rs): `src/simulation/params.rs`
- [Cell state](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/cell.rs): `src/simulation/cell.rs`
- [Chunk storage](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/simulation/chunk.rs): `src/simulation/chunk.rs`

### Exploration and outputs

- [Exploration agent](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/agent_explorateur.py): `agent_explorateur.py`
- [Run scoring](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/agent_explorateur.py): `agent_explorateur.py`
- [Snapshots, replay, CSV](https://github.com/shazamifius/simulateur-d-emergence-d-eterministe/blob/main/src/main.rs): `src/main.rs`

### Other components

- **User**
- **Command client**
- **Output files**

## Connections

- User → 3D UI and editing: edits and controls
- 3D UI and editing → Rust application: updates state
- Rust application → World cycles: advances cycles
- Headless runner → World cycles: runs cycles
- Scenario input → Headless runner: loads scenario
- Command client → Command API: sends commands
- Exploration agent → Command API: sends commands
- Command API → World cycles: resets and steps
- World cycles → Physical and neural laws: evaluates rules
- World cycles → Global parameters: reads parameters
- World cycles → Chunk storage: updates chunks
- Chunk storage → Cell state: stores cells
- World cycles → Cell state: updates cell state
- Exploration agent → Run scoring: scores runs
- Exploration agent → Command API: requests run data
- Rust application → Snapshots, replay, CSV: records and restores
- Snapshots, replay, CSV → Output files: reads and writes
- Headless runner → Output files: exports results
