Files
SirRoboGarage/ChimeraBot_garage/README.md
T

45 lines
2.0 KiB
Markdown

# ChimeraBot
ChimeraBot is an **exact behavioral copy of DevControlBot** at bootstrap: same
run loop, same radar (commanded before `go()`), same TFIL survival movement,
same ELM gun, same full-**black** team colours (white = not programmed,
black = programmed and running). The fork exists to host **CHIMERA**
experiments; see [`../docs/chimera-spec.md`](../docs/chimera-spec.md).
The faithful-copy reference is `DevControlBot_garage/DevControlBot/`: any
divergence from that source is a bug until an experiment deliberately changes it.
Sources live in `src/` (`ChimeraBot.nim`, `.json`, `.nimble`, `.sh`,
`ChimeraBot/modules/`); unit tests in `tests/`; `out/` is reserved and builds
stay throwaway (`mktemp -d`).
## Run
```sh
cd ChimeraBot_garage/src && nimble runBot # release build + run
cd ChimeraBot_garage/src && nimble test # unit tests
```
`SERVER_URL` / `SERVER_SECRET` come from the environment; an optional `.env`
beside the `.nimble` is loaded without ever overriding a preexisting variable.
## CHIMERA modules (M3.5 + M4)
`src/ChimeraBot/chimera/` holds the CHIMERA libraries —
`physics.nim` (server-math mirror), `ledger.nim` (intent ledger), `dsl.nim` (the
v0.2 kernel library, **12 kernels**: the M2 set plus `STATIC_CORNER`, the STATIC
corner-park mode, and adaptive/heat-gated v0.2 params), `hedge.nim` (Hedge
posterior), `oracle.nim` (G1 harness), `observer.nim` (observation sidecar) and
`twinsim.nim` (offline counterfactual rollout, M4).
`observer.nim` is wired into `ChimeraBot.nim` as an **observation-only** sidecar:
it folds the scan stream into the ledger + Hedge and writes JSONL telemetry to
`/tmp/chimera_twin` — it never issues a command, so the bot's behaviour is
byte-identical with or without it. `twinsim.nim` is **offline analysis only** at
M4 (nothing is wired into commands); it replays that telemetry and rolls the
posterior mixture forward under a candidate plan.
Benchmarks: `tests/bench_g4.nim` (live identification, G4) and
`tests/bench_g5.nim` (offline twin-vs-persistence rollout, G5). Both write only
to `/tmp`.