Spaces:
Running on Zero
Running on Zero
deploy: update docs/reference/SIMULATION.md
Browse files- docs/reference/SIMULATION.md +51 -0
docs/reference/SIMULATION.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# What's Simulated, What's Real, and What the Physical World Needs
|
| 2 |
+
|
| 3 |
+
The Chief Engineer's value is a **closed learning loop**: propose settings β
|
| 4 |
+
observe the outcome β learn β do better next time. To demo that loop without a
|
| 5 |
+
printer farm β and to keep it reproducible for judges β the *outcome* step runs
|
| 6 |
+
in a deterministic simulator. Everything else is real.
|
| 7 |
+
|
| 8 |
+
## Honest-claims table
|
| 9 |
+
|
| 10 |
+
| Component | Status | Notes |
|
| 11 |
+
|-----------|--------|-------|
|
| 12 |
+
| Environment-keyed retrieval (RAG) | **Real** | `core/ledger.py` β exact match + normalized env-distance |
|
| 13 |
+
| Chief Engineer reasoning (LLM) | **Real** | `core/chief_engineer.py` β real Ollama (gemma4), with deterministic fallback |
|
| 14 |
+
| Learned policy (parametric) | **Real** | `learn/policy.py` β offsets per (material, geometry, env-bucket), persisted |
|
| 15 |
+
| Spine safety veto | **Real** | `core/spine.py` β clamps unsafe settings; LLM proposes, code decides |
|
| 16 |
+
| Knowledge ingestion | **Real** | `ingest/` β slicer/firmware configs β references; research β lessons |
|
| 17 |
+
| **Print outcome** | **Simulated** | `sim/outcome.py` β physics-lite stand-in for the printer + sensors |
|
| 18 |
+
| Capability mesh (6 nodes) | **Context** | one node's logic is real; the others render as available capacity |
|
| 19 |
+
| Weight-level fine-tuning | **Framed frontier** | `ingest/modal_app.py` stub; the ledger becomes training data |
|
| 20 |
+
|
| 21 |
+
## The one simulated boundary
|
| 22 |
+
|
| 23 |
+
`sim/outcome.py` is the **only** stand-in for physical reality. It models the
|
| 24 |
+
same physics the seed lessons describe (cooling vs. overhang sag, humidity β
|
| 25 |
+
stringing, ABS warp, bed temp β adhesion, and **build-plate position** β edges/
|
| 26 |
+
corners of a heated bed run cooler + draftier, so warp/adhesion suffer there,
|
| 27 |
+
worst for high-shrink materials) and returns an outcome + a 0β1 quality score.
|
| 28 |
+
It is deterministic, so the learning curve is reproducible.
|
| 29 |
+
|
| 30 |
+
Critically, this is **not the model grading its own work**. The Chief Engineer
|
| 31 |
+
proposes; this separate world returns an outcome the model never sees in
|
| 32 |
+
advance β exactly the role a printer and its sensors play.
|
| 33 |
+
|
| 34 |
+
## Swapping in the physical world
|
| 35 |
+
|
| 36 |
+
Replace `sim.outcome.simulate(settings, job, env)` with a real adapter that
|
| 37 |
+
returns the same `SimResult`. Three interfaces are needed:
|
| 38 |
+
|
| 39 |
+
1. **Actuation β stream settings to the printer.** Generate g-code from the
|
| 40 |
+
proposed `PrintSettings` (the readout in `viewer.gcode_readout` is the seed
|
| 41 |
+
of this) and stream over USB/serial (Marlin) or the Moonraker/Klipper API.
|
| 42 |
+
*Frontier on the roadmap: node β Ender serial control.*
|
| 43 |
+
2. **Sensing β read the environment.** A temp/humidity sensor (e.g. a BME280 on
|
| 44 |
+
a Pi) feeds the `Environment` that today comes from the sliders.
|
| 45 |
+
3. **Outcome detection β judge the print.** A camera + a defect classifier
|
| 46 |
+
(the **3D-ADAM** taxonomy already encoded in `ingest/distill.py`) maps an
|
| 47 |
+
image to `outcome` + `quality`. This replaces the simulator's scoring.
|
| 48 |
+
|
| 49 |
+
Each is a clean substitution behind the existing types β the loop, the policy,
|
| 50 |
+
the ledger, and the UI do not change. That is the point of keeping the
|
| 51 |
+
simulated boundary this narrow.
|