File size: 3,106 Bytes
fc96e8c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# What's Simulated, What's Real, and What the Physical World Needs

The Chief Engineer's value is a **closed learning loop**: propose settings β†’
observe the outcome β†’ learn β†’ do better next time. To demo that loop without a
printer farm β€” and to keep it reproducible for judges β€” the *outcome* step runs
in a deterministic simulator. Everything else is real.

## Honest-claims table

| Component | Status | Notes |
|-----------|--------|-------|
| Environment-keyed retrieval (RAG) | **Real** | `core/ledger.py` β€” exact match + normalized env-distance |
| Chief Engineer reasoning (LLM) | **Real** | `core/chief_engineer.py` β€” real Ollama (gemma4), with deterministic fallback |
| Learned policy (parametric) | **Real** | `learn/policy.py` β€” offsets per (material, geometry, env-bucket), persisted |
| Spine safety veto | **Real** | `core/spine.py` β€” clamps unsafe settings; LLM proposes, code decides |
| Knowledge ingestion | **Real** | `ingest/` β€” slicer/firmware configs β†’ references; research β†’ lessons |
| **Print outcome** | **Simulated** | `sim/outcome.py` β€” physics-lite stand-in for the printer + sensors |
| Capability mesh (6 nodes) | **Context** | one node's logic is real; the others render as available capacity |
| Weight-level fine-tuning | **Framed frontier** | `ingest/modal_app.py` stub; the ledger becomes training data |

## The one simulated boundary

`sim/outcome.py` is the **only** stand-in for physical reality. It models the
same physics the seed lessons describe (cooling vs. overhang sag, humidity β†’
stringing, ABS warp, bed temp β†’ adhesion, and **build-plate position** β€” edges/
corners of a heated bed run cooler + draftier, so warp/adhesion suffer there,
worst for high-shrink materials) and returns an outcome + a 0–1 quality score.
It is deterministic, so the learning curve is reproducible.

Critically, this is **not the model grading its own work**. The Chief Engineer
proposes; this separate world returns an outcome the model never sees in
advance β€” exactly the role a printer and its sensors play.

## Swapping in the physical world

Replace `sim.outcome.simulate(settings, job, env)` with a real adapter that
returns the same `SimResult`. Three interfaces are needed:

1. **Actuation β€” stream settings to the printer.** Generate g-code from the
   proposed `PrintSettings` (the readout in `viewer.gcode_readout` is the seed
   of this) and stream over USB/serial (Marlin) or the Moonraker/Klipper API.
   *Frontier on the roadmap: node β†’ Ender serial control.*
2. **Sensing β€” read the environment.** A temp/humidity sensor (e.g. a BME280 on
   a Pi) feeds the `Environment` that today comes from the sliders.
3. **Outcome detection β€” judge the print.** A camera + a defect classifier
   (the **3D-ADAM** taxonomy already encoded in `ingest/distill.py`) maps an
   image to `outcome` + `quality`. This replaces the simulator's scoring.

Each is a clean substitution behind the existing types β€” the loop, the policy,
the ledger, and the UI do not change. That is the point of keeping the
simulated boundary this narrow.