Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Judge the default look blind and darken the automatic floor (Part of #53)

Nguyen Xuan An2915cc2ac424
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c52dbe1..35b5ff50 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased
+- Darken the automatic floor and measure the default look with a blind pairwise judge (part of issue #53). `bench/agent-modeling/default-judge.mjs` draws the six cold recipes under two defaults from the three-quarter view and the recipe camera (what `scene_look` draws), shows a Sonnet judge both in a seeded random order and reports wins with an exact binomial p. The current default beats no floor 18 of 18 (p 0.0000076, 9 of 9 in each position); the control, one image against itself, picks "first" 17 of 18, so a tie goes to the first. The floor colour goes from 0.6, 0.6, 0.58 to 0.22, 0.22, 0.21 because the judge named a floor too close to the backdrop: it beats the old floor 18 of 18, while 0.38 won 13 of 18 (p 0.096) and was dropped. Only recipes that get the automatic floor change; the judge spend was $4.50, above its $4 plan. Core did not change.
+
- Fix the automatic floor skipping a lone flat object (part of issue #53). A lone part never counts as the recipe's own floor, so a gear lying flat, which spans its whole scene and is the lowest geometry, now gets a floor and a contact shadow (before, `agentGroundPlacement` returned null for it). The surface judge on the six cold recipes goes from 0 before the floor, to 6 with the first rule, to 7 with this fix (gear 0 to 1; one call per task, so direction only). A flat object with a hub on it is still read as a plate. Core did not change.
- Let the path tracer stop converged pixels, draw normal and roughness maps on box-projected materials, and finish a 1080p still (part of issue #129, which stays open). `noiseThreshold` (0 to 1, default 0.03, 0 draws every sample) stops a pixel once the standard error of its mean luminance is under that share of the mean plus 0.05, checked from 16 samples on and after every 8 more; the decision reads only the pixel's own samples, so bands and thread counts still give the same bytes, and `report.averageSamples` says what was used. Shadow rays no longer interpolate the surface they hit unless it is a cutout (pixels unchanged, 1.23 to 1.36 times faster per thread on the demo room). Box-projected parts are traced with the UVs of their projection (`boxProjectedGeometry`, with `columnLengths` now exported from `src/export-box-uv.js`), so their colour, normal and metallic-roughness maps are all read (before, a box-projected colour map read one texel); `report.ignored` no longer lists them. Render jobs may set `maxSeconds` up to 600 (was 240; the deadline is `maxSeconds` plus 60 s): the 1920 by 1080, 64 sample still of `tests/fixtures/demo-room.recipe.json` took 246.4 s in the tracer (30.7 samples per pixel on average, 8 threads, 257 s per job), 6 s past the old limit. Measured, and not all good: at 24 fixed samples with the filter `brick-graph` is 0.0024 and `character` 0.0048 worse than at 64; adaptive sampling costs `spot-area` 0.0658 to 0.0900 against Cycles at the default threshold; drawing one light at the first hit was tried and dropped (twice as fast, 66 percent more error). `brick-graph` did not improve against the same tracer at 64 samples (0.1370 to 0.1373); the darker floor of `character` and `outdoor-hdri` was narrowed but not found. `bench/reference/run.mjs` takes `--noise-threshold` and records `averageSamples`. Core did not change.
diff --git a/bench/agent-modeling/README.md b/bench/agent-modeling/README.md
index e595c9f7..ba46d9b3 100644
--- a/bench/agent-modeling/README.md
+++ b/bench/agent-modeling/README.md
@@ -230,6 +230,23 @@ Same six cold recipes, drawn from the same fixed cameras, judged by `surface-jud
Every note names the same gap: the three-quarter view shows a surface and a shadow, the front and side views (orthographic at floor height) show an edge-on floor and a flat grey backdrop. The cameras were not raised: the benchmark cameras are not what an agent sees in the preview, so raising them would not show that the floor reads to an agent. The gear's three-quarter view, opened by hand, shows the floor but only a faint shadow, and a floor colour close to the backdrop. Read the 0 to 6 to 7 as direction (inferred from one judge call per task), not as a measured lift of one point.
+### A judge that can see a default change: blind pairwise (2026-11-01, issue #53)
+
+`default-judge.mjs` draws the six stored cold recipes (`cold-recipes/`, copied from the Haiku run `2026-11-01-01-36-haiku-look-after`; the `environment`, `effects` and `shadow` fields are dropped because they hold only normalized defaults, so the engine's current defaults apply) under two defaults, from two cameras: the fixed three-quarter view and the recipe's own camera at 768 x 512, which is what `scene_look` draws (the preview calls `renderer.render` with `scene.camera`; the harness now does the same for a view with no camera of its own). One Sonnet call per task and repeat sees both views as "first" and "second" renders in a seeded order (repeat 0 random, repeat 1 swapped, repeat 2 random) and answers which looks more like a finished, believable render. Three repeats, 18 calls, exact two-sided binomial p against 0.5 on side B's wins. `results/2026-11-01-default-judge-*.json`.
+
+| Comparison (A against B) | Wins A | Wins B | p |
+| --- | --- | --- | --- |
+| no floor against current default (floor 0.6) | 0 | 18 | 0.0000076 |
+| current default against floor 0.38 | 5 | 13 | 0.096 |
+| current default against floor 0.22 | 0 | 18 | 0.0000076 |
+| control: no floor against itself | picked first 17, second 1 | | 0.00014 |
+
+- **#53's done condition, measured.** The current default beats the old one in 18 of 18 calls, 9 of 9 when shown first and 9 of 9 when shown second, so position cannot explain it. The cold recipes were not changed; only the engine default differs.
+- **The control shows a position bias on ties.** Shown the same image twice, the judge picks "first" 17 times in 18 and says in its notes that it is choosing arbitrarily. A tie therefore goes to "first". That does not touch the 18 of 18 above, which won from both positions, but a result close to 9 of 18 would not be informative, and 13 of 18 (the 0.38 floor) is not significant.
+- **What the judge complained of.** Notes name a darker, more contrasty ground, a stronger and better-defined cast shadow, and tonal separation between object, floor and backdrop. The floor was close to the backdrop in luminance, so the shadow had nothing to read against.
+- **Kept: floor colour 0.6, 0.6, 0.58 to 0.22, 0.22, 0.21** (`src/agent-ground.js`), a free default (no schema). A darker floor beats the current one 18 of 18. The other candidate, 0.38, did not clear significance. Not tried: a default-on soft occlusion (it changes every recipe, so it would move the `npm run reference` scenes that get no floor) and a lighting-level contact shadow (the floor is lit mostly by the environment map, which casts no shadow, so a stronger shadow needs a lighting change for every scene).
+- **Limits.** Six objects, one agent model (Haiku), one judge model and a judge that likes contrast; the pairwise verdict says the render looks more grounded, not that it is closer to a photograph. The judge spend was above the $4 plan: $4.50 (the default 25k token system prompt of a headless session was cached on about one call in four at $0.10 each; the 0.007 dollar calls are the cached ones).
+
## Clip layers (2026-10-31)
`robot-walk-wave` asks for a character that walks and waves at once through `motion.layers`. The check `assetWalkAndWave` reloads the exported recipe, plays each layer alone (keeping its own speed, offset and loop) and compares part matrices at two times: the legs must match Walking and move, the right arm must leave Walking, the left arm must keep walking. Cold Sonnet, no skill, `results/2026-10-31-11-40-sonnet-walk-wave-cold-fixed-grader.json`: 1 of 1, 7 tool calls (2 errors), $0.31. A first run, with a check that compared against Walking at speed 1 only, failed on a recipe the agent had correct (it set per-layer speeds); the check was fixed and that recipe grades as a pass. One run is not a rate.
diff --git a/bench/agent-modeling/cold-recipes/chair.recipe.json b/bench/agent-modeling/cold-recipes/chair.recipe.json
new file mode 100644
index 00000000..e4da847a
--- /dev/null
+++ b/bench/agent-modeling/cold-recipes/chair.recipe.json
@@ -0,0 +1,329 @@
+{
+ "format": "67js.scene",
+ "schemaVersion": 1,
+ "geometries": [
+ {
+ "id": "cube",
+ "type": "box",
+ "bevel": 0
+ }
+ ],
+ "nodes": [
+ {
+ "id": "seat",
+ "geometry": "cube",
+ "translation": [
+ 0,
+ 0.435,
+ 0
+ ],
+ "scale": [
+ 0.45,
+ 0.03,
+ 0.45
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "leg-front-left",
+ "geometry": "cube",
+ "translation": [
+ -0.205,
+ 0.21,
+ 0.205
+ ],
+ "scale": [
+ 0.04,
+ 0.42,
+ 0.04
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "leg-front-right",
+ "geometry": "cube",
+ "translation": [
+ 0.205,
+ 0.21,
+ 0.205
+ ],
+ "scale": [
+ 0.04,
+ 0.42,
+ 0.04
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "post-rear-left",
+ "geometry": "cube",
+ "translation": [
+ -0.205,
+ 0.45,
+ -0.205
+ ],
+ "scale": [
+ 0.04,
+ 0.9,
+ 0.04
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "post-rear-right",
+ "geometry": "cube",
+ "translation": [
+ 0.205,
+ 0.45,
+ -0.205
+ ],
+ "scale": [
+ 0.04,
+ 0.9,
+ 0.04
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "slat-low",
+ "geometry": "cube",
+ "translation": [
+ 0,
+ 0.6,
+ -0.205
+ ],
+ "scale": [
+ 0.37,
+ 0.06,
+ 0.02
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "slat-mid",
+ "geometry": "cube",
+ "translation": [
+ 0,
+ 0.7,
+ -0.205
+ ],
+ "scale": [
+ 0.37,
+ 0.06,
+ 0.02
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "slat-high",
+ "geometry": "cube",
+ "translation": [
+ 0,
+ 0.8,
+ -0.205
+ ],
+ "scale": [
+ 0.37,
+ 0.06,
+ 0.02
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ }
+ ],
+ "materials": [
+ {
+ "id": "default",
+ "tag": "surface",
+ "color": [
+ 0.5,
+ 0.5,
+ 0.5
+ ],
+ "metallic": 0,
+ "roughness": 0.5,
+ "emission": 0,
+ "opacity": 1,
+ "alphaMode": "opaque",
+ "doubleSided": false
+ }
+ ],
+ "camera": {
+ "eye": [
+ 4,
+ 3,
+ 5
+ ],
+ "target": [
+ 0,
+ 0,
+ 0
+ ],
+ "up": [
+ 0,
+ 1,
+ 0
+ ],
+ "fov": 45,
+ "near": 0.1,
+ "far": 1000
+ },
+ "environment": {
+ "world": false,
+ "setup": "daylight",
+ "environmentIntensity": 1,
+ "environmentRotation": 0,
+ "lightDirection": [
+ -3,
+ 6,
+ 4
+ ],
+ "keyColor": [
+ 3,
+ 2.8,
+ 2.5
+ ],
+ "keyIntensity": 1,
+ "fillIntensity": 0,
+ "ambientIntensity": 1,
+ "daylight": 1,
+ "pointLights": [],
+ "skyTop": [
+ 0.2,
+ 0.38,
+ 0.52
+ ],
+ "skyBottom": [
+ 0.62,
+ 0.7,
+ 0.67
+ ],
+ "fogColor": [
+ 0.35,
+ 0.43,
+ 0.43
+ ],
+ "fogDensity": 0.006,
+ "volumeFog": {
+ "density": 0,
+ "minimum": [
+ -100,
+ 0,
+ -100
+ ],
+ "maximum": [
+ 100,
+ 20,
+ 100
+ ],
+ "color": [
+ 0.8,
+ 0.85,
+ 0.9
+ ],
+ "ambient": [
+ 0.03,
+ 0.035,
+ 0.04
+ ],
+ "drift": [
+ 0.03,
+ 0,
+ 0
+ ],
+ "steps": 16,
+ "anisotropy": 0.3,
+ "noiseAmount": 0.5,
+ "noiseScale": 0.3,
+ "maxDistance": 100
+ }
+ },
+ "effects": {
+ "depthOfField": {
+ "blur": 0,
+ "focusDistance": 5
+ },
+ "motionBlur": {
+ "shutter": 0
+ },
+ "saturation": 1,
+ "contrast": 1,
+ "temperature": 0,
+ "vignette": 0,
+ "grain": 0,
+ "ambientOcclusion": 0,
+ "ambientOcclusionRadius": 0.5,
+ "bloom": {
+ "strength": 0.12,
+ "threshold": 1,
+ "radius": 1
+ },
+ "exposure": 0.8
+ },
+ "shadow": {
+ "target": [
+ 0,
+ 1,
+ 0
+ ],
+ "extent": 3.5,
+ "distance": 8,
+ "near": 0.1,
+ "far": 15
+ }
+}
\ No newline at end of file
diff --git a/bench/agent-modeling/cold-recipes/crate.recipe.json b/bench/agent-modeling/cold-recipes/crate.recipe.json
new file mode 100644
index 00000000..81be74e0
--- /dev/null
+++ b/bench/agent-modeling/cold-recipes/crate.recipe.json
@@ -0,0 +1,327 @@
+{
+ "format": "67js.scene",
+ "schemaVersion": 1,
+ "geometries": [
+ {
+ "id": "crateBody",
+ "type": "mesh",
+ "base": {
+ "type": "box",
+ "bevel": 0
+ },
+ "edits": [
+ {
+ "op": "boolean",
+ "operation": "difference",
+ "name": "panelPosZ",
+ "cutter": {
+ "type": "box",
+ "bevel": 0
+ },
+ "translation": [
+ 0,
+ 0,
+ 0.5
+ ],
+ "scale": [
+ 0.8667,
+ 0.8667,
+ 0.0667
+ ]
+ },
+ {
+ "op": "boolean",
+ "operation": "difference",
+ "name": "panelNegZ",
+ "cutter": {
+ "type": "box",
+ "bevel": 0
+ },
+ "translation": [
+ 0,
+ 0,
+ -0.5
+ ],
+ "scale": [
+ 0.8667,
+ 0.8667,
+ 0.0667
+ ]
+ },
+ {
+ "op": "boolean",
+ "operation": "difference",
+ "name": "panelPosX",
+ "cutter": {
+ "type": "box",
+ "bevel": 0
+ },
+ "translation": [
+ 0.5,
+ 0,
+ 0
+ ],
+ "scale": [
+ 0.0667,
+ 0.8667,
+ 0.8667
+ ]
+ },
+ {
+ "op": "boolean",
+ "operation": "difference",
+ "name": "panelNegX",
+ "cutter": {
+ "type": "box",
+ "bevel": 0
+ },
+ "translation": [
+ -0.5,
+ 0,
+ 0
+ ],
+ "scale": [
+ 0.0667,
+ 0.8667,
+ 0.8667
+ ]
+ }
+ ]
+ },
+ {
+ "id": "crateLid",
+ "type": "mesh",
+ "base": {
+ "type": "box",
+ "bevel": 0
+ }
+ }
+ ],
+ "materials": [
+ {
+ "id": "wood",
+ "tag": "surface",
+ "color": [
+ 0.45,
+ 0.28,
+ 0.14
+ ],
+ "metallic": 0,
+ "roughness": 0.8,
+ "emission": 0,
+ "pattern": {
+ "type": "wood",
+ "colors": [
+ [
+ 0.3,
+ 0.18,
+ 0.08
+ ],
+ [
+ 0.55,
+ 0.36,
+ 0.2
+ ]
+ ],
+ "size": 0.6,
+ "count": 12,
+ "bump": 0.4,
+ "seed": 1,
+ "axis": "y",
+ "resolution": 512
+ },
+ "opacity": 1,
+ "alphaMode": "opaque",
+ "doubleSided": false
+ }
+ ],
+ "nodes": [
+ {
+ "id": "crate",
+ "translation": [
+ 0,
+ 0.3,
+ 0
+ ],
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ],
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ },
+ {
+ "id": "body",
+ "geometry": "crateBody",
+ "material": "wood",
+ "parent": "crate",
+ "scale": [
+ 0.6,
+ 0.6,
+ 0.6
+ ],
+ "translation": [
+ 0,
+ 0,
+ 0
+ ],
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "lid",
+ "geometry": "crateLid",
+ "material": "wood",
+ "parent": "crate",
+ "translation": [
+ 0,
+ 0.315,
+ 0
+ ],
+ "scale": [
+ 0.5,
+ 0.03,
+ 0.5
+ ],
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ }
+ ],
+ "camera": {
+ "eye": [
+ 1.4,
+ 1,
+ 1.6
+ ],
+ "target": [
+ 0,
+ 0.3,
+ 0
+ ],
+ "up": [
+ 0,
+ 1,
+ 0
+ ],
+ "fov": 40,
+ "near": 0.1,
+ "far": 1000
+ },
+ "environment": {
+ "world": false,
+ "setup": "daylight",
+ "environmentIntensity": 1,
+ "environmentRotation": 0,
+ "lightDirection": [
+ -3,
+ 6,
+ 4
+ ],
+ "keyColor": [
+ 3,
+ 2.8,
+ 2.5
+ ],
+ "keyIntensity": 1,
+ "fillIntensity": 0,
+ "ambientIntensity": 1,
+ "daylight": 1,
+ "pointLights": [],
+ "skyTop": [
+ 0.2,
+ 0.38,
+ 0.52
+ ],
+ "skyBottom": [
+ 0.62,
+ 0.7,
+ 0.67
+ ],
+ "fogColor": [
+ 0.35,
+ 0.43,
+ 0.43
+ ],
+ "fogDensity": 0.006,
+ "volumeFog": {
+ "density": 0,
+ "minimum": [
+ -100,
+ 0,
+ -100
+ ],
+ "maximum": [
+ 100,
+ 20,
+ 100
+ ],
+ "color": [
+ 0.8,
+ 0.85,
+ 0.9
+ ],
+ "ambient": [
+ 0.03,
+ 0.035,
+ 0.04
+ ],
+ "drift": [
+ 0.03,
+ 0,
+ 0
+ ],
+ "steps": 16,
+ "anisotropy": 0.3,
+ "noiseAmount": 0.5,
+ "noiseScale": 0.3,
+ "maxDistance": 100
+ }
+ },
+ "effects": {
+ "depthOfField": {
+ "blur": 0,
+ "focusDistance": 5
+ },
+ "motionBlur": {
+ "shutter": 0
+ },
+ "saturation": 1,
+ "contrast": 1,
+ "temperature": 0,
+ "vignette": 0,
+ "grain": 0,
+ "ambientOcclusion": 0,
+ "ambientOcclusionRadius": 0.5,
+ "bloom": {
+ "strength": 0.12,
+ "threshold": 1,
+ "radius": 1
+ },
+ "exposure": 0.8
+ },
+ "shadow": {
+ "target": [
+ 0,
+ 1,
+ 0
+ ],
+ "extent": 3.5,
+ "distance": 8,
+ "near": 0.1,
+ "far": 15
+ }
+}
\ No newline at end of file
diff --git a/bench/agent-modeling/cold-recipes/gear.recipe.json b/bench/agent-modeling/cold-recipes/gear.recipe.json
new file mode 100644
index 00000000..8063d694
--- /dev/null
+++ b/bench/agent-modeling/cold-recipes/gear.recipe.json
@@ -0,0 +1,519 @@
+{
+ "format": "67js.scene",
+ "schemaVersion": 1,
+ "geometries": [
+ {
+ "id": "gear-body",
+ "type": "extrude",
+ "contour": [
+ [
+ 0.085,
+ 0
+ ],
+ [
+ 0.099452,
+ 0.010453
+ ],
+ [
+ 0.097815,
+ 0.020791
+ ],
+ [
+ 0.08084,
+ 0.026267
+ ],
+ [
+ 0.077652,
+ 0.034573
+ ],
+ [
+ 0.073613,
+ 0.0425
+ ],
+ [
+ 0.080902,
+ 0.058779
+ ],
+ [
+ 0.074314,
+ 0.066913
+ ],
+ [
+ 0.056876,
+ 0.063167
+ ],
+ [
+ 0.049962,
+ 0.068767
+ ],
+ [
+ 0.0425,
+ 0.073613
+ ],
+ [
+ 0.040674,
+ 0.091355
+ ],
+ [
+ 0.030902,
+ 0.095106
+ ],
+ [
+ 0.017672,
+ 0.083143
+ ],
+ [
+ 0.008885,
+ 0.084534
+ ],
+ [
+ 0,
+ 0.085
+ ],
+ [
+ -0.010453,
+ 0.099452
+ ],
+ [
+ -0.020791,
+ 0.097815
+ ],
+ [
+ -0.026267,
+ 0.08084
+ ],
+ [
+ -0.034573,
+ 0.077652
+ ],
+ [
+ -0.0425,
+ 0.073613
+ ],
+ [
+ -0.058779,
+ 0.080902
+ ],
+ [
+ -0.066913,
+ 0.074314
+ ],
+ [
+ -0.063167,
+ 0.056876
+ ],
+ [
+ -0.068767,
+ 0.049962
+ ],
+ [
+ -0.073613,
+ 0.0425
+ ],
+ [
+ -0.091355,
+ 0.040674
+ ],
+ [
+ -0.095106,
+ 0.030902
+ ],
+ [
+ -0.083143,
+ 0.017672
+ ],
+ [
+ -0.084534,
+ 0.008885
+ ],
+ [
+ -0.085,
+ 0
+ ],
+ [
+ -0.099452,
+ -0.010453
+ ],
+ [
+ -0.097815,
+ -0.020791
+ ],
+ [
+ -0.08084,
+ -0.026267
+ ],
+ [
+ -0.077652,
+ -0.034573
+ ],
+ [
+ -0.073613,
+ -0.0425
+ ],
+ [
+ -0.080902,
+ -0.058779
+ ],
+ [
+ -0.074314,
+ -0.066913
+ ],
+ [
+ -0.056876,
+ -0.063167
+ ],
+ [
+ -0.049962,
+ -0.068767
+ ],
+ [
+ -0.0425,
+ -0.073613
+ ],
+ [
+ -0.040674,
+ -0.091355
+ ],
+ [
+ -0.030902,
+ -0.095106
+ ],
+ [
+ -0.017672,
+ -0.083143
+ ],
+ [
+ -0.008885,
+ -0.084534
+ ],
+ [
+ 0,
+ -0.085
+ ],
+ [
+ 0.010453,
+ -0.099452
+ ],
+ [
+ 0.020791,
+ -0.097815
+ ],
+ [
+ 0.026267,
+ -0.08084
+ ],
+ [
+ 0.034573,
+ -0.077652
+ ],
+ [
+ 0.0425,
+ -0.073613
+ ],
+ [
+ 0.058779,
+ -0.080902
+ ],
+ [
+ 0.066913,
+ -0.074314
+ ],
+ [
+ 0.063167,
+ -0.056876
+ ],
+ [
+ 0.068767,
+ -0.049962
+ ],
+ [
+ 0.073613,
+ -0.0425
+ ],
+ [
+ 0.091355,
+ -0.040674
+ ],
+ [
+ 0.095106,
+ -0.030902
+ ],
+ [
+ 0.083143,
+ -0.017672
+ ],
+ [
+ 0.084534,
+ -0.008885
+ ]
+ ],
+ "holes": [
+ [
+ [
+ 0.02,
+ 0
+ ],
+ [
+ 0.019319,
+ 0.005176
+ ],
+ [
+ 0.017321,
+ 0.01
+ ],
+ [
+ 0.014142,
+ 0.014142
+ ],
+ [
+ 0.01,
+ 0.017321
+ ],
+ [
+ 0.005176,
+ 0.019319
+ ],
+ [
+ 0,
+ 0.02
+ ],
+ [
+ -0.005176,
+ 0.019319
+ ],
+ [
+ -0.01,
+ 0.017321
+ ],
+ [
+ -0.014142,
+ 0.014142
+ ],
+ [
+ -0.017321,
+ 0.01
+ ],
+ [
+ -0.019319,
+ 0.005176
+ ],
+ [
+ -0.02,
+ 0
+ ],
+ [
+ -0.019319,
+ -0.005176
+ ],
+ [
+ -0.017321,
+ -0.01
+ ],
+ [
+ -0.014142,
+ -0.014142
+ ],
+ [
+ -0.01,
+ -0.017321
+ ],
+ [
+ -0.005176,
+ -0.019319
+ ],
+ [
+ 0,
+ -0.02
+ ],
+ [
+ 0.005176,
+ -0.019319
+ ],
+ [
+ 0.01,
+ -0.017321
+ ],
+ [
+ 0.014142,
+ -0.014142
+ ],
+ [
+ 0.017321,
+ -0.01
+ ],
+ [
+ 0.019319,
+ -0.005176
+ ]
+ ]
+ ],
+ "depth": 0.02,
+ "steps": 1,
+ "bevel": 0
+ }
+ ],
+ "nodes": [
+ {
+ "id": "gear",
+ "geometry": "gear-body",
+ "translation": [
+ 0,
+ 0,
+ 0
+ ],
+ "rotation": [
+ -0.7071067811865475,
+ 0,
+ 0,
+ 0.7071067811865475
+ ],
+ "material": "default",
+ "parent": null,
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ }
+ ],
+ "materials": [
+ {
+ "id": "default",
+ "tag": "surface",
+ "color": [
+ 0.5,
+ 0.5,
+ 0.5
+ ],
+ "metallic": 0,
+ "roughness": 0.5,
+ "emission": 0,
+ "opacity": 1,
+ "alphaMode": "opaque",
+ "doubleSided": false
+ }
+ ],
+ "camera": {
+ "eye": [
+ 4,
+ 3,
+ 5
+ ],
+ "target": [
+ 0,
+ 0,
+ 0
+ ],
+ "up": [
+ 0,
+ 1,
+ 0
+ ],
+ "fov": 45,
+ "near": 0.1,
+ "far": 1000
+ },
+ "environment": {
+ "world": false,
+ "setup": "daylight",
+ "environmentIntensity": 1,
+ "environmentRotation": 0,
+ "lightDirection": [
+ -3,
+ 6,
+ 4
+ ],
+ "keyColor": [
+ 3,
+ 2.8,
+ 2.5
+ ],
+ "keyIntensity": 1,
+ "fillIntensity": 0,
+ "ambientIntensity": 1,
+ "daylight": 1,
+ "pointLights": [],
+ "skyTop": [
+ 0.2,
+ 0.38,
+ 0.52
+ ],
+ "skyBottom": [
+ 0.62,
+ 0.7,
+ 0.67
+ ],
+ "fogColor": [
+ 0.35,
+ 0.43,
+ 0.43
+ ],
+ "fogDensity": 0.006,
+ "volumeFog": {
+ "density": 0,
+ "minimum": [
+ -100,
+ 0,
+ -100
+ ],
+ "maximum": [
+ 100,
+ 20,
+ 100
+ ],
+ "color": [
+ 0.8,
+ 0.85,
+ 0.9
+ ],
+ "ambient": [
+ 0.03,
+ 0.035,
+ 0.04
+ ],
+ "drift": [
+ 0.03,
+ 0,
+ 0
+ ],
+ "steps": 16,
+ "anisotropy": 0.3,
+ "noiseAmount": 0.5,
+ "noiseScale": 0.3,
+ "maxDistance": 100
+ }
+ },
+ "effects": {
+ "depthOfField": {
+ "blur": 0,
+ "focusDistance": 5
+ },
+ "motionBlur": {
+ "shutter": 0
+ },
+ "saturation": 1,
+ "contrast": 1,
+ "temperature": 0,
+ "vignette": 0,
+ "grain": 0,
+ "ambientOcclusion": 0,
+ "ambientOcclusionRadius": 0.5,
+ "bloom": {
+ "strength": 0.12,
+ "threshold": 1,
+ "radius": 1
+ },
+ "exposure": 0.8
+ },
+ "shadow": {
+ "target": [
+ 0,
+ 1,
+ 0
+ ],
+ "extent": 3.5,
+ "distance": 8,
+ "near": 0.1,
+ "far": 15
+ }
+}
\ No newline at end of file
diff --git a/bench/agent-modeling/cold-recipes/mug.recipe.json b/bench/agent-modeling/cold-recipes/mug.recipe.json
new file mode 100644
index 00000000..58f055c9
--- /dev/null
+++ b/bench/agent-modeling/cold-recipes/mug.recipe.json
@@ -0,0 +1,249 @@
+{
+ "format": "67js.scene",
+ "schemaVersion": 1,
+ "geometries": [
+ {
+ "id": "mug",
+ "type": "mesh",
+ "base": {
+ "type": "lathe",
+ "profile": [
+ [
+ 0,
+ 0
+ ],
+ [
+ 0.04,
+ 0
+ ],
+ [
+ 0.04,
+ 0.1
+ ],
+ [
+ 0.035,
+ 0.1
+ ],
+ [
+ 0.035,
+ 0.005
+ ],
+ [
+ 0,
+ 0.005
+ ]
+ ],
+ "segments": 64
+ },
+ "edits": [
+ {
+ "op": "boolean",
+ "operation": "union",
+ "cutter": {
+ "type": "tube",
+ "closed": true,
+ "path": [
+ [
+ 0.039,
+ 0.085,
+ 0
+ ],
+ [
+ 0.055,
+ 0.085,
+ 0
+ ],
+ [
+ 0.066,
+ 0.075,
+ 0
+ ],
+ [
+ 0.066,
+ 0.025,
+ 0
+ ],
+ [
+ 0.055,
+ 0.015,
+ 0
+ ],
+ [
+ 0.039,
+ 0.015,
+ 0
+ ]
+ ],
+ "radius": 0.0035,
+ "radialSegments": 12,
+ "segments": 48
+ }
+ }
+ ]
+ }
+ ],
+ "materials": [
+ {
+ "id": "glaze",
+ "tag": "surface",
+ "color": [
+ 0.8,
+ 0.8,
+ 0.78
+ ],
+ "metallic": 0,
+ "roughness": 0.4,
+ "emission": 0,
+ "opacity": 1,
+ "alphaMode": "opaque",
+ "doubleSided": false
+ }
+ ],
+ "nodes": [
+ {
+ "id": "mug",
+ "geometry": "mug",
+ "material": "glaze",
+ "parent": null,
+ "translation": [
+ 0,
+ 0,
+ 0
+ ],
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ],
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ }
+ ],
+ "camera": {
+ "eye": [
+ 0.25,
+ 0.15,
+ 0.3
+ ],
+ "target": [
+ 0.02,
+ 0.05,
+ 0
+ ],
+ "up": [
+ 0,
+ 1,
+ 0
+ ],
+ "fov": 35,
+ "near": 0.1,
+ "far": 1000
+ },
+ "environment": {
+ "world": false,
+ "setup": "daylight",
+ "environmentIntensity": 1,
+ "environmentRotation": 0,
+ "lightDirection": [
+ -3,
+ 6,
+ 4
+ ],
+ "keyColor": [
+ 3,
+ 2.8,
+ 2.5
+ ],
+ "keyIntensity": 1,
+ "fillIntensity": 0,
+ "ambientIntensity": 1,
+ "daylight": 1,
+ "pointLights": [],
+ "skyTop": [
+ 0.2,
+ 0.38,
+ 0.52
+ ],
+ "skyBottom": [
+ 0.62,
+ 0.7,
+ 0.67
+ ],
+ "fogColor": [
+ 0.35,
+ 0.43,
+ 0.43
+ ],
+ "fogDensity": 0.006,
+ "volumeFog": {
+ "density": 0,
+ "minimum": [
+ -100,
+ 0,
+ -100
+ ],
+ "maximum": [
+ 100,
+ 20,
+ 100
+ ],
+ "color": [
+ 0.8,
+ 0.85,
+ 0.9
+ ],
+ "ambient": [
+ 0.03,
+ 0.035,
+ 0.04
+ ],
+ "drift": [
+ 0.03,
+ 0,
+ 0
+ ],
+ "steps": 16,
+ "anisotropy": 0.3,
+ "noiseAmount": 0.5,
+ "noiseScale": 0.3,
+ "maxDistance": 100
+ }
+ },
+ "effects": {
+ "depthOfField": {
+ "blur": 0,
+ "focusDistance": 5
+ },
+ "motionBlur": {
+ "shutter": 0
+ },
+ "saturation": 1,
+ "contrast": 1,
+ "temperature": 0,
+ "vignette": 0,
+ "grain": 0,
+ "ambientOcclusion": 0,
+ "ambientOcclusionRadius": 0.5,
+ "bloom": {
+ "strength": 0.12,
+ "threshold": 1,
+ "radius": 1
+ },
+ "exposure": 0.8
+ },
+ "shadow": {
+ "target": [
+ 0,
+ 1,
+ 0
+ ],
+ "extent": 3.5,
+ "distance": 8,
+ "near": 0.1,
+ "far": 15
+ }
+}
\ No newline at end of file
diff --git a/bench/agent-modeling/cold-recipes/soap.recipe.json b/bench/agent-modeling/cold-recipes/soap.recipe.json
new file mode 100644
index 00000000..229b3278
--- /dev/null
+++ b/bench/agent-modeling/cold-recipes/soap.recipe.json
@@ -0,0 +1,228 @@
+{
+ "format": "67js.scene",
+ "schemaVersion": 1,
+ "geometries": [
+ {
+ "id": "soap-geo",
+ "type": "mesh",
+ "base": {
+ "type": "box",
+ "bevel": 0
+ },
+ "edits": [
+ {
+ "op": "set_position",
+ "position": {
+ "vec": [
+ {
+ "mul": [
+ {
+ "x": {
+ "attr": "position"
+ }
+ },
+ 0.09
+ ]
+ },
+ {
+ "mul": [
+ {
+ "y": {
+ "attr": "position"
+ }
+ },
+ 0.03
+ ]
+ },
+ {
+ "mul": [
+ {
+ "z": {
+ "attr": "position"
+ }
+ },
+ 0.06
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "op": "bevel",
+ "edges": {
+ "all": true
+ },
+ "width": 0.01,
+ "segments": 4,
+ "profile": 0.5,
+ "name": "round"
+ }
+ ],
+ "smoothAngle": 60
+ }
+ ],
+ "nodes": [
+ {
+ "id": "soap",
+ "geometry": "soap-geo",
+ "translation": [
+ 0,
+ 0.015,
+ 0
+ ],
+ "material": "default",
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ],
+ "scale": [
+ 1,
+ 1,
+ 1
+ ]
+ }
+ ],
+ "camera": {
+ "eye": [
+ 0.12,
+ 0.09,
+ 0.14
+ ],
+ "target": [
+ 0,
+ 0.01,
+ 0
+ ],
+ "up": [
+ 0,
+ 1,
+ 0
+ ],
+ "fov": 35,
+ "near": 0.1,
+ "far": 1000
+ },
+ "materials": [
+ {
+ "id": "default",
+ "tag": "surface",
+ "color": [
+ 0.5,
+ 0.5,
+ 0.5
+ ],
+ "metallic": 0,
+ "roughness": 0.5,
+ "emission": 0,
+ "opacity": 1,
+ "alphaMode": "opaque",
+ "doubleSided": false
+ }
+ ],
+ "environment": {
+ "world": false,
+ "setup": "daylight",
+ "environmentIntensity": 1,
+ "environmentRotation": 0,
+ "lightDirection": [
+ -3,
+ 6,
+ 4
+ ],
+ "keyColor": [
+ 3,
+ 2.8,
+ 2.5
+ ],
+ "keyIntensity": 1,
+ "fillIntensity": 0,
+ "ambientIntensity": 1,
+ "daylight": 1,
+ "pointLights": [],
+ "skyTop": [
+ 0.2,
+ 0.38,
+ 0.52
+ ],
+ "skyBottom": [
+ 0.62,
+ 0.7,
+ 0.67
+ ],
+ "fogColor": [
+ 0.35,
+ 0.43,
+ 0.43
+ ],
+ "fogDensity": 0.006,
+ "volumeFog": {
+ "density": 0,
+ "minimum": [
+ -100,
+ 0,
+ -100
+ ],
+ "maximum": [
+ 100,
+ 20,
+ 100
+ ],
+ "color": [
+ 0.8,
+ 0.85,
+ 0.9
+ ],
+ "ambient": [
+ 0.03,
+ 0.035,
+ 0.04
+ ],
+ "drift": [
+ 0.03,
+ 0,
+ 0
+ ],
+ "steps": 16,
+ "anisotropy": 0.3,
+ "noiseAmount": 0.5,
+ "noiseScale": 0.3,
+ "maxDistance": 100
+ }
+ },
+ "effects": {
+ "depthOfField": {
+ "blur": 0,
+ "focusDistance": 5
+ },
+ "motionBlur": {
+ "shutter": 0
+ },
+ "saturation": 1,
+ "contrast": 1,
+ "temperature": 0,
+ "vignette": 0,
+ "grain": 0,
+ "ambientOcclusion": 0,
+ "ambientOcclusionRadius": 0.5,
+ "bloom": {
+ "strength": 0.12,
+ "threshold": 1,
+ "radius": 1
+ },
+ "exposure": 0.8
+ },
+ "shadow": {
+ "target": [
+ 0,
+ 1,
+ 0
+ ],
+ "extent": 3.5,
+ "distance": 8,
+ "near": 0.1,
+ "far": 15
+ }
+}
\ No newline at end of file
diff --git a/bench/agent-modeling/cold-recipes/table.recipe.json b/bench/agent-modeling/cold-recipes/table.recipe.json
new file mode 100644
index 00000000..70f14e22
--- /dev/null
+++ b/bench/agent-modeling/cold-recipes/table.recipe.json
@@ -0,0 +1,263 @@
+{
+ "format": "67js.scene",
+ "schemaVersion": 1,
+ "geometries": [
+ {
+ "id": "unit-box",
+ "type": "box",
+ "bevel": 0
+ }
+ ],
+ "materials": [
+ {
+ "id": "wood",
+ "tag": "surface",
+ "color": [
+ 0.45,
+ 0.28,
+ 0.14
+ ],
+ "metallic": 0,
+ "roughness": 0.6,
+ "emission": 0,
+ "opacity": 1,
+ "alphaMode": "opaque",
+ "doubleSided": false
+ }
+ ],
+ "nodes": [
+ {
+ "id": "table-top",
+ "geometry": "unit-box",
+ "material": "wood",
+ "translation": [
+ 0,
+ 0.73,
+ 0
+ ],
+ "scale": [
+ 1.2,
+ 0.04,
+ 0.75
+ ],
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "leg-front-left",
+ "geometry": "unit-box",
+ "material": "wood",
+ "translation": [
+ -0.525,
+ 0.365,
+ 0.35
+ ],
+ "scale": [
+ 0.05,
+ 0.73,
+ 0.05
+ ],
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "leg-front-right",
+ "geometry": "unit-box",
+ "material": "wood",
+ "translation": [
+ 0.525,
+ 0.365,
+ 0.35
+ ],
+ "scale": [
+ 0.05,
+ 0.73,
+ 0.05
+ ],
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "leg-back-left",
+ "geometry": "unit-box",
+ "material": "wood",
+ "translation": [
+ -0.525,
+ 0.365,
+ -0.35
+ ],
+ "scale": [
+ 0.05,
+ 0.73,
+ 0.05
+ ],
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ },
+ {
+ "id": "leg-back-right",
+ "geometry": "unit-box",
+ "material": "wood",
+ "translation": [
+ 0.525,
+ 0.365,
+ -0.35
+ ],
+ "scale": [
+ 0.05,
+ 0.73,
+ 0.05
+ ],
+ "parent": null,
+ "rotation": [
+ 0,
+ 0,
+ 0,
+ 1
+ ]
+ }
+ ],
+ "camera": {
+ "eye": [
+ 1.6,
+ 1.2,
+ 1.8
+ ],
+ "target": [
+ 0,
+ 0.4,
+ 0
+ ],
+ "up": [
+ 0,
+ 1,
+ 0
+ ],
+ "fov": 40,
+ "near": 0.1,
+ "far": 1000
+ },
+ "environment": {
+ "world": false,
+ "setup": "daylight",
+ "environmentIntensity": 1,
+ "environmentRotation": 0,
+ "lightDirection": [
+ -3,
+ 6,
+ 4
+ ],
+ "keyColor": [
+ 3,
+ 2.8,
+ 2.5
+ ],
+ "keyIntensity": 1,
+ "fillIntensity": 0,
+ "ambientIntensity": 1,
+ "daylight": 1,
+ "pointLights": [],
+ "skyTop": [
+ 0.2,
+ 0.38,
+ 0.52
+ ],
+ "skyBottom": [
+ 0.62,
+ 0.7,
+ 0.67
+ ],
+ "fogColor": [
+ 0.35,
+ 0.43,
+ 0.43
+ ],
+ "fogDensity": 0.006,
+ "volumeFog": {
+ "density": 0,
+ "minimum": [
+ -100,
+ 0,
+ -100
+ ],
+ "maximum": [
+ 100,
+ 20,
+ 100
+ ],
+ "color": [
+ 0.8,
+ 0.85,
+ 0.9
+ ],
+ "ambient": [
+ 0.03,
+ 0.035,
+ 0.04
+ ],
+ "drift": [
+ 0.03,
+ 0,
+ 0
+ ],
+ "steps": 16,
+ "anisotropy": 0.3,
+ "noiseAmount": 0.5,
+ "noiseScale": 0.3,
+ "maxDistance": 100
+ }
+ },
+ "effects": {
+ "depthOfField": {
+ "blur": 0,
+ "focusDistance": 5
+ },
+ "motionBlur": {
+ "shutter": 0
+ },
+ "saturation": 1,
+ "contrast": 1,
+ "temperature": 0,
+ "vignette": 0,
+ "grain": 0,
+ "ambientOcclusion": 0,
+ "ambientOcclusionRadius": 0.5,
+ "bloom": {
+ "strength": 0.12,
+ "threshold": 1,
+ "radius": 1
+ },
+ "exposure": 0.8
+ },
+ "shadow": {
+ "target": [
+ 0,
+ 1,
+ 0
+ ],
+ "extent": 3.5,
+ "distance": 8,
+ "near": 0.1,
+ "far": 15
+ }
+}
\ No newline at end of file
diff --git a/bench/agent-modeling/default-judge.mjs b/bench/agent-modeling/default-judge.mjs
new file mode 100644
index 00000000..df5ddb9a
--- /dev/null
+++ b/bench/agent-modeling/default-judge.mjs
@@ -0,0 +1,179 @@
+// Blind pairwise judge of the engine's default look. A recipe that sets no lighting is drawn under two defaults and a
+// vision judge, shown the two renders as "first" and "second" in a seeded random order, says which looks more like a
+// finished, believable render. Wins per side and an exact binomial p against 0.5 tell whether the judge sees the change.
+// The `sonnet-vision` judge cannot: it compares with a reference drawn under the same defaults.
+//
+// node bench/agent-modeling/default-judge.mjs render --label <name> [--no-floor] [--directory <directory>]
+// Draws the stored cold recipes (bench/agent-modeling/cold-recipes) from two cameras: the fixed three-quarter view
+// and the recipe camera, which is what `scene_look` draws, at the preview size 768 x 512.
+// node bench/agent-modeling/default-judge.mjs judge --claude <path> --model <name> --a <label> --b <label> [--control]
+// One judge call per task and repeat. Order is a function of --seed, task and repeat, so a result can be re-scored.
+// --control shows label a against itself: any preference for "first" or "second" is position bias.
+// The stored recipes hold every normalized default, including `environment`, `effects` and `shadow`, which agents never
+// set. Those three fields are dropped here so the engine's current defaults apply.
+import { spawnSync } from 'node:child_process';
+import { mkdir, readFile, writeFile } from 'node:fs/promises';
+import { join, resolve } from 'node:path';
+import { parseArgs } from 'node:util';
+import { boundsOfGeometries, lookCameras } from './look-cameras.mjs';
+import { withLookPage, worldGeometriesOf } from './look.mjs';
+
+const repository = resolve(import.meta.dirname, '../..');
+const COLD_TASKS = ['crate', 'mug', 'table', 'soap', 'chair', 'gear'];
+const PREVIEW_SIZE = { width: 768, height: 512 };
+const THREE_QUARTER_SIZE = { width: 512, height: 512 };
+const THREE_QUARTER = 'three-quarter';
+const PREVIEW = 'preview';
+const VIEW_ORDER = [THREE_QUARTER, PREVIEW];
+const REPEATS = 3;
+const DEFAULT_SEED = 53;
+
+// A short system prompt: the default one is about 25k tokens and made most calls cost ten times more.
+const JUDGE_ROLE = 'You compare two rendered images and answer in the format asked.';
+
+export const JUDGE_QUESTION = `You see renders of one 3D object drawn by two different renderers, in two camera views. For each view you get a "first" and a "second" render, in that order.
+Which renderer gives the images that look more like a finished, believable render of a real object (grounding, shadows, lighting, depth), not a preview of floating geometry?
+Ignore the shape of the object; it is the same in both. Judge only the image as a whole, in both views together.
+Give one short sentence naming what decided it, then as the very last line exactly: WINNER: first or WINNER: second`;
+
+export function seededRandom(seed) {
+ let state = seed >>> 0;
+ return () => {
+ state = (state + 0x6d2b79f5) >>> 0;
+ let mixed = state;
+ mixed = Math.imul(mixed ^ (mixed >>> 15), mixed | 1);
+ mixed ^= mixed + Math.imul(mixed ^ (mixed >>> 7), mixed | 61);
+ return ((mixed ^ (mixed >>> 14)) >>> 0) / 4294967296;
+ };
+}
+
+/** Which side is shown first: repeat 0 is random, repeat 1 swaps it, repeat 2 is random again. */
+export function firstSideOf(seed, taskIndex, repeat) {
+ const random = seededRandom(seed * 1000 + taskIndex);
+ const base = random() < 0.5;
+ const later = random() < 0.5;
+ if (repeat === 0) return base ? 'a' : 'b';
+ if (repeat === 1) return base ? 'b' : 'a';
+ return later ? 'a' : 'b';
+}
+
+/** Exact two-sided binomial p against 0.5 for `wins` out of `trials`. */
+export function binomialP(wins, trials) {
+ if (trials === 0) return 1;
+ const probabilityOf = count => {
+ let logChoose = 0;
+ for (let step = 1; step <= count; step++) logChoose += Math.log((trials - count + step) / step);
+ return Math.exp(logChoose + trials * Math.log(0.5));
+ };
+ const observed = probabilityOf(wins);
+ let total = 0;
+ for (let count = 0; count <= trials; count++) {
+ const probability = probabilityOf(count);
+ if (probability <= observed * (1 + 1e-9)) total += probability;
+ }
+ return Math.min(1, total);
+}
+
+async function loadColdRecipe(taskId, { noFloor }) {
+ const recipe = JSON.parse(await readFile(join(import.meta.dirname, 'cold-recipes', `${taskId}.recipe.json`), 'utf8'));
+ const { environment, effects, shadow, physics, ...cold } = recipe;
+ return noFloor ? { ...cold, environment: { ground: false } } : cold;
+}
+
+async function renderVariant({ label, noFloor, directory }) {
+ await mkdir(directory, { recursive: true });
+ const recipes = [];
+ const threeQuarterViews = [];
+ for (const taskId of COLD_TASKS) {
+ const recipe = await loadColdRecipe(taskId, { noFloor });
+ recipes.push(recipe);
+ const bounds = boundsOfGeometries(await worldGeometriesOf(recipe));
+ threeQuarterViews.push(lookCameras(bounds).filter(({ name }) => name === THREE_QUARTER));
+ }
+ const draw = async (page, recipe, views, name) => {
+ const images = await page.evaluate(([sceneRecipe, cameraViews]) => window.renderLookViews(sceneRecipe, cameraViews), [recipe, views]);
+ await writeFile(join(directory, name), Buffer.from(images[0].image, 'base64'));
+ };
+ await withLookPage(async page => {
+ for (const [index, taskId] of COLD_TASKS.entries()) await draw(page, recipes[index], threeQuarterViews[index], `${taskId}-${THREE_QUARTER}.png`);
+ }, THREE_QUARTER_SIZE);
+ await withLookPage(async page => {
+ for (const [index, taskId] of COLD_TASKS.entries()) await draw(page, recipes[index], [{ name: PREVIEW }], `${taskId}-${PREVIEW}.png`);
+ }, PREVIEW_SIZE);
+ console.log(`${label}: ${COLD_TASKS.length * VIEW_ORDER.length} images`);
+}
+
+function imageBlock(bytes) {
+ return { type: 'image', source: { type: 'base64', media_type: 'image/png', data: bytes.toString('base64') } };
+}
+
+function askJudge({ claude, model, firstDirectory, secondDirectory, taskId }) {
+ return readImages({ firstDirectory, secondDirectory, taskId }).then(images => {
+ const content = [{ type: 'text', text: JUDGE_QUESTION }];
+ for (const view of VIEW_ORDER) {
+ content.push({ type: 'text', text: `View "${view}", first render:` }, imageBlock(images[view].first));
+ content.push({ type: 'text', text: `View "${view}", second render:` }, imageBlock(images[view].second));
+ }
+ const message = JSON.stringify({ type: 'user', message: { role: 'user', content } });
+ const result = spawnSync(claude, ['-p', '--model', model, '--input-format', 'stream-json', '--output-format', 'stream-json', '--verbose',
+ '--tools', '', '--system-prompt', JUDGE_ROLE, '--strict-mcp-config', '--no-session-persistence', '--max-budget-usd', '0.2'],
+ { input: `${message}\n`, encoding: 'utf8', timeout: 300000, maxBuffer: 64 * 1024 * 1024 });
+ const final = result.stdout.split('\n').filter(Boolean).map(line => JSON.parse(line)).find(event => event.type === 'result');
+ const text = String(final?.result ?? '');
+ const match = /WINNER:\s*(first|second)/i.exec(text);
+ return { answer: match ? match[1].toLowerCase() : null, costUsd: final?.total_cost_usd ?? 0, note: text.split('\n').find(line => line.trim()) };
+ });
+}
+
+async function readImages({ firstDirectory, secondDirectory, taskId }) {
+ const images = {};
+ for (const view of VIEW_ORDER) {
+ images[view] = {
+ first: await readFile(join(firstDirectory, `${taskId}-${view}.png`)),
+ second: await readFile(join(secondDirectory, `${taskId}-${view}.png`)),
+ };
+ }
+ return images;
+}
+
+async function judgeVariants({ claude, model, a, b, control, seed, directory, label }) {
+ const records = [];
+ for (const [taskIndex, taskId] of COLD_TASKS.entries()) {
+ for (let repeat = 0; repeat < REPEATS; repeat++) {
+ const firstSide = firstSideOf(seed, taskIndex, repeat);
+ const sideLabels = { a, b: control ? a : b };
+ const firstLabel = sideLabels[firstSide];
+ const secondLabel = sideLabels[firstSide === 'a' ? 'b' : 'a'];
+ const verdict = await askJudge({ claude, model, taskId, firstDirectory: join(directory, firstLabel), secondDirectory: join(directory, secondLabel) });
+ const winnerSide = verdict.answer === null ? null : verdict.answer === 'first' ? firstSide : (firstSide === 'a' ? 'b' : 'a');
+ records.push({ task: taskId, repeat, firstSide, answer: verdict.answer, winnerSide, costUsd: verdict.costUsd, note: verdict.note });
+ }
+ }
+ const decided = records.filter(record => record.answer !== null);
+ const summary = { trials: decided.length, costUsd: Number(records.reduce((sum, record) => sum + record.costUsd, 0).toFixed(4)) };
+ if (control) {
+ const pickedFirst = decided.filter(record => record.answer === 'first').length;
+ Object.assign(summary, { pickedFirst, pickedSecond: decided.length - pickedFirst, pBias: binomialP(pickedFirst, decided.length) });
+ } else {
+ const bWins = decided.filter(record => record.winnerSide === 'b').length;
+ Object.assign(summary, { winsA: decided.length - bWins, winsB: bWins, pValue: binomialP(bWins, decided.length) });
+ }
+ return { label, model, seed, a, b: control ? `${a} (control)` : b, summary, records };
+}
+
+if (import.meta.url === `file:///${process.argv[1].replaceAll('\\', '/')}`) {
+ const [command, ...rest] = process.argv.slice(2);
+ const { values } = parseArgs({ args: rest, options: {
+ claude: { type: 'string' }, model: { type: 'string', default: 'sonnet' }, label: { type: 'string' }, a: { type: 'string' }, b: { type: 'string' },
+ seed: { type: 'string', default: String(DEFAULT_SEED) }, directory: { type: 'string', default: join(repository, 'artifacts', 'agent-modeling', 'default-judge') },
+ control: { type: 'boolean', default: false }, 'no-floor': { type: 'boolean', default: false },
+ } });
+ if (command === 'render') {
+ await renderVariant({ label: values.label, noFloor: values['no-floor'], directory: join(values.directory, values.label) });
+ } else if (command === 'judge') {
+ const result = await judgeVariants({ claude: values.claude, model: values.model, a: values.a, b: values.b, control: values.control, seed: Number(values.seed), directory: values.directory, label: values.label ?? `${values.a}-vs-${values.b}` });
+ console.log(JSON.stringify(result, null, 2));
+ } else {
+ throw new Error('Use the render or judge command.');
+ }
+}
diff --git a/bench/agent-modeling/look-harness.js b/bench/agent-modeling/look-harness.js
index 20573e37..9b662f9c 100644
--- a/bench/agent-modeling/look-harness.js
+++ b/bench/agent-modeling/look-harness.js
@@ -21,7 +21,9 @@ async function renderLookViews(recipe, views) {
});
const images = [];
try {
- for (const { name, camera } of views) {
+ for (const { name, camera: viewCamera } of views) {
+ // A view with no camera of its own is drawn from the recipe camera, the one the MCP preview uses.
+ const camera = viewCamera ?? scene.camera;
renderer.resize();
renderer.updateParts(scene.parts);
renderer.render({ ...camera, environment, effects, exposure: effects.exposure, time: 0 });
diff --git a/bench/agent-modeling/look.mjs b/bench/agent-modeling/look.mjs
index 7eb6b9d3..f3982512 100644
--- a/bench/agent-modeling/look.mjs
+++ b/bench/agent-modeling/look.mjs
@@ -60,14 +60,15 @@ export async function scoreSilhouette(taskId, recipe) {
return { views: overlap, mean: roundScore(values.reduce((sum, value) => sum + value, 0) / values.length) };
}
-async function withLookPage(callback) {
+/** Opens the look harness in headless Chrome. The viewport is the size of every image drawn in the callback. */
+export async function withLookPage(callback, viewport = { width: IMAGE_SIZE, height: IMAGE_SIZE }) {
const { chromium } = await import('playwright');
const { createServer } = await import('vite');
const server = await createServer({ root: repository, server: { host: '127.0.0.1', port: 0 }, logLevel: 'silent' });
await server.listen();
const browser = await chromium.launch({ executablePath: CHROME, headless: true, args: SWIFTSHADER_ARGUMENTS });
try {
- const page = await browser.newPage({ viewport: { width: IMAGE_SIZE, height: IMAGE_SIZE } });
+ const page = await browser.newPage({ viewport });
const errors = [];
page.on('pageerror', error => errors.push(error.message));
await page.goto(`http://127.0.0.1:${server.httpServer.address().port}/bench/agent-modeling/look-harness.html`);
diff --git a/bench/agent-modeling/results/2026-11-01-default-judge-control.json b/bench/agent-modeling/results/2026-11-01-default-judge-control.json
new file mode 100644
index 00000000..79c6176f
--- /dev/null
+++ b/bench/agent-modeling/results/2026-11-01-default-judge-control.json
@@ -0,0 +1,178 @@
+{
+ "label": "control-nofloor",
+ "model": "sonnet",
+ "seed": 53,
+ "a": "nofloor",
+ "b": "nofloor (control)",
+ "summary": {
+ "trials": 18,
+ "costUsd": 0.6904,
+ "pickedFirst": 17,
+ "pickedSecond": 1,
+ "pBias": 0.0001449584960937499
+ },
+ "records": [
+ {
+ "task": "crate",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.10119,
+ "note": "The two renders look identical in both views, with the same flat lighting, no ground shadow and no contact grounding, so nothing separates them; I'm picking arbitrarily."
+ },
+ {
+ "task": "crate",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0069356,
+ "note": "The two renders look identical in both views, with the same lighting, no ground shadow and the same floating look, so nothing separates them and the pick is arbitrary."
+ },
+ {
+ "task": "crate",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.0068896,
+ "note": "The two renderers' images look identical in both views, with the same flat lighting, no ground shadow, and no grounding, so nothing separates them."
+ },
+ {
+ "task": "mug",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10115199999999999,
+ "note": "The two renders look identical in both views, with the same flat shading, no ground shadow, and a floating mug on a plain gray background, so neither is more believable than the other."
+ },
+ {
+ "task": "mug",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.0069476,
+ "note": "The two renders look identical in both views, with the same flat gradient shading, no cast shadow and no ground contact, so neither has an edge in grounding or lighting."
+ },
+ {
+ "task": "mug",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.006943599999999999,
+ "note": "The two renders look identical in both views, with the same flat shading, no ground shadow and no grounding, so nothing separates them and the pick is arbitrary."
+ },
+ {
+ "task": "table",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.101206,
+ "note": "The two renders look identical in both views, with the same flat shading, no shadows, no ground contact, and the same floating table. Nothing separates them, so the pick is arbitrary."
+ },
+ {
+ "task": "table",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.0071456,
+ "note": "The two renders look identical in both views: same flat shading, no shadows, no grounding, and the same lighting, so neither one is more believable than the other. With nothing to separate them, I'm picking the second one arbitrarily."
+ },
+ {
+ "task": "table",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0069216,
+ "note": "The two renders look identical in both views, with the same flat shading, no cast shadows, no grounding and no depth cues, so neither is more believable than the other."
+ },
+ {
+ "task": "soap",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.101274,
+ "note": "The two renders look identical in both views, with the same floating object, the same faint contact edge and no distinguishable difference in shadows or lighting, so nothing separates them and the pick is arbitrary."
+ },
+ {
+ "task": "soap",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0069996,
+ "note": "The two renders look identical in both views, with the same lighting, the same faint contact shadow, and the same floating-looking shading, so neither renderer is more believable than the other."
+ },
+ {
+ "task": "soap",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0068996000000000005,
+ "note": "The two renders look identical in both views, with the same floating object, the same faint soft shading and no cast shadow or ground contact, so nothing separates them."
+ },
+ {
+ "task": "chair",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.101106,
+ "note": "Both renderers produce identical images in both views, with the same flat lighting, no shadows, no ground contact and a floating chair, so nothing separates them."
+ },
+ {
+ "task": "chair",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0069056000000000005,
+ "note": "The two renderers look identical in both views, with the same flat lighting, no cast shadow, and no ground contact, so neither is more believable than the other."
+ },
+ {
+ "task": "chair",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0069416,
+ "note": "Both renderers' images look identical in each view: the same flat shading, no ground shadow, and the chair floating on a plain gray background, so nothing separates them."
+ },
+ {
+ "task": "gear",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10110000000000001,
+ "note": "The two renders look identical in both views, with the same flat shading, no cast shadow or grounding, and the same floating look, so nothing separates them."
+ },
+ {
+ "task": "gear",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.0069356,
+ "note": "The two renders look identical in both views, with the same flat lighting, no cast shadow, and no grounding, so nothing separates them and the pick is arbitrary."
+ },
+ {
+ "task": "gear",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.0069496,
+ "note": "The two renders look identical in both views, with the same flat lighting, no cast shadow and no grounding, so nothing separates them and the pick is arbitrary."
+ }
+ ]
+}
diff --git a/bench/agent-modeling/results/2026-11-01-default-judge-default-vs-dark.json b/bench/agent-modeling/results/2026-11-01-default-judge-default-vs-dark.json
new file mode 100644
index 00000000..741d8145
--- /dev/null
+++ b/bench/agent-modeling/results/2026-11-01-default-judge-default-vs-dark.json
@@ -0,0 +1,178 @@
+{
+ "label": "default-vs-dark",
+ "model": "sonnet",
+ "seed": 53,
+ "a": "default",
+ "b": "dark",
+ "summary": {
+ "trials": 18,
+ "costUsd": 1.2621,
+ "winsA": 0,
+ "winsB": 18,
+ "pValue": 0.000007629394531250002
+ },
+ "records": [
+ {
+ "task": "crate",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.101326,
+ "note": "The second renderer reads as more grounded: its darker, bluer-grey floor and deeper shadow contrast sit the crate in the scene, while the first looks washed out, with a pale floor and a faint shadow."
+ },
+ {
+ "task": "crate",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.102548,
+ "note": "The first render's darker ground and stronger, more defined shadow ground the crate better, while the second looks washed out with a faint shadow."
+ },
+ {
+ "task": "crate",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.007097600000000001,
+ "note": "The second render's darker, bluer shadow and slightly deeper-toned ground give the crate stronger contrast and a better sense of grounding, while the first looks washed out with a pale ground and faint shadow."
+ },
+ {
+ "task": "mug",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10117799999999999,
+ "note": "The first render has a darker, more contrasty ground and a stronger, better-defined cast shadow that grounds the mug, while the second looks washed out with a faint shadow."
+ },
+ {
+ "task": "mug",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.101236,
+ "note": "The second renderer wins because its darker, more saturated ground and stronger, deeper contact shadow ground the mug better, while the first looks washed out with the mug blending into the pale floor."
+ },
+ {
+ "task": "mug",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.007125600000000001,
+ "note": "The second render has a darker, more contrasty ground and a stronger, better-defined cast shadow, so the mug looks grounded on a surface, while the first is washed out with a faint shadow that blends into the pale background."
+ },
+ {
+ "task": "table",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.101354,
+ "note": "The first renderer wins: its darker, more saturated ground and deep blue-grey shadows ground the table and give it more contrast and depth, while the second's washed-out pale floor and faint shadows make the table look like it is floating."
+ },
+ {
+ "task": "table",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.101614,
+ "note": "The two renderers produce identical geometry, shadows and framing, so the deciding factor is the ground and background tone. The second render's darker, more saturated blue-grey ground gives stronger contrast with the tan table and makes the shadow read as grounded on a surface, while the first looks washed out and flat."
+ },
+ {
+ "task": "table",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.007085600000000001,
+ "note": "The first renderer wins because its darker, bluer-grey ground and deeper shadows ground the table better, while the second's washed-out pale floor and faint shadows leave it looking more like floating geometry."
+ },
+ {
+ "task": "soap",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.101384,
+ "note": "The second renderer looks more grounded: it has a darker, more defined contact shadow, stronger light-to-shade contrast on the object's faces, and a clearer bluish cast shadow, while the first looks washed out and flat against its background."
+ },
+ {
+ "task": "soap",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10133,
+ "note": "The first renderer looks more grounded: it has a clearer, darker contact shadow and stronger tonal contrast that anchors the object to the floor, whereas the second looks washed out and flat with a faint shadow."
+ },
+ {
+ "task": "soap",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.007115600000000001,
+ "note": "The first renderer gives a darker background, a more defined contact shadow beneath the object, and stronger shading contrast, which grounds it on the surface, while the second looks washed out with a faint shadow and flat lighting."
+ },
+ {
+ "task": "chair",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.101296,
+ "note": "The second render grounds the chair better: its darker, more contrasty ground and shadow make the chair read as sitting on a surface, while the first has a washed-out ground that nearly matches the chair and shadow."
+ },
+ {
+ "task": "chair",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10124,
+ "note": "The first render has stronger grounding: darker, more defined contact shadows, a more shaded floor with a gradient, and clearer face shading on the chair, while the second looks flatter and washed out."
+ },
+ {
+ "task": "chair",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.008431600000000001,
+ "note": "The first renderer looks more believable: its ground has a tonal falloff and darker, more contrasty shadows, so the chair reads as sitting on the surface, while the second is washed out, flat and low in contrast against the chair."
+ },
+ {
+ "task": "gear",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10237600000000001,
+ "note": "The first renderer looks more grounded: it shows a soft contact shadow beside the gear and slight shading on the ground, while the second is flatter with almost no shadow."
+ },
+ {
+ "task": "gear",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.101302,
+ "note": "The second renderer looks more grounded: its darker backdrop gives the gear more contrast and a visible soft contact shadow at the right edge, while the first looks flatter and washed out with the object blending into the background."
+ },
+ {
+ "task": "gear",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.0070756000000000005,
+ "note": "The second renderer wins: its darker backdrop gives the gear more contrast, and it shows a soft contact shadow under and beside the object that grounds it, while the first looks flatter and washed out against its background."
+ }
+ ]
+}
diff --git a/bench/agent-modeling/results/2026-11-01-default-judge-default-vs-mid.json b/bench/agent-modeling/results/2026-11-01-default-judge-default-vs-mid.json
new file mode 100644
index 00000000..4212f31d
--- /dev/null
+++ b/bench/agent-modeling/results/2026-11-01-default-judge-default-vs-mid.json
@@ -0,0 +1,178 @@
+{
+ "label": "default-vs-mid",
+ "model": "sonnet",
+ "seed": 53,
+ "a": "default",
+ "b": "mid",
+ "summary": {
+ "trials": 18,
+ "costUsd": 1.2631,
+ "winsA": 5,
+ "winsB": 13,
+ "pValue": 0.09625244140625
+ },
+ "records": [
+ {
+ "task": "crate",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.10251400000000001,
+ "note": "The second render has a darker, more contrasty shadow and a slightly dimmer ground, so the crate sits on the floor more convincingly than in the washed-out first render."
+ },
+ {
+ "task": "crate",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "second",
+ "winnerSide": "a",
+ "costUsd": 0.101476,
+ "note": "The two renders are nearly identical in object, shadow, and lighting; the second has a slightly lighter, less gray ground with a softer, bluer shadow that reads as a bit more natural ambient fill, while the first ground looks a little flatter and dimmer."
+ },
+ {
+ "task": "crate",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.0070036000000000005,
+ "note": "The second renderer wins because its cooler, slightly darker ground and deeper blue shadow give the crate stronger contrast and grounding, while the first looks washed out and flatter."
+ },
+ {
+ "task": "mug",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10126,
+ "note": "The two renderers look nearly identical, but the first has a slightly darker, more saturated shadow and a grayer background that gives a bit more contrast and grounding, while the second is washed out and flatter."
+ },
+ {
+ "task": "mug",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.102392,
+ "note": "The second render grounds the mug better: its shadow is darker and its greyer floor gives more contrast against the mug, while the first looks washed out."
+ },
+ {
+ "task": "mug",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.007035600000000001,
+ "note": "The second render grounds the mug better: its darker, bluer-grey ground and stronger, more defined cast shadow give more contrast and depth than the washed-out, low-contrast first render."
+ },
+ {
+ "task": "table",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10141399999999999,
+ "note": "The two renderers are nearly identical in geometry, shading and shadow shape; the first has a darker, more saturated background and ground with a stronger, higher-contrast shadow that grounds the table better, while the second looks washed out and flatter."
+ },
+ {
+ "task": "table",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.101634,
+ "note": "The two renders are nearly identical in geometry, shadow shape and lighting, so the decider is tone: the first has a lighter, softer ground and a shadow that reads as a gentle cast shadow, while the second is grayer and darker, which flattens the scene and makes the shadow look heavier and less natural."
+ },
+ {
+ "task": "table",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0079536,
+ "note": "The first render has a darker floor and a stronger shadow contrast, which grounds the table better than the paler, washed-out second render."
+ },
+ {
+ "task": "soap",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.10118200000000001,
+ "note": "The second renderer gives a slightly darker background and a more defined contact shadow beneath the object, which grounds it better and adds depth, while the first looks flatter and more washed out."
+ },
+ {
+ "task": "soap",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.101276,
+ "note": "The first render has stronger contrast and a more defined contact shadow, with crisper edge shading, so the box looks grounded; the second is flatter and washed out, so the box looks more like floating geometry."
+ },
+ {
+ "task": "soap",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0070516,
+ "note": "The first render has crisper contact shadows, stronger edge definition and more tonal contrast between the top and side faces, which grounds the object on the floor, while the second looks flatter and more washed out."
+ },
+ {
+ "task": "chair",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "first",
+ "winnerSide": "a",
+ "costUsd": 0.10129200000000001,
+ "note": "The first render has softer, more visible contact shading under the seat and legs and a brighter, better-lit chair that reads as grounded, while the second looks flatter and darker with the legs washing into the floor."
+ },
+ {
+ "task": "chair",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "second",
+ "winnerSide": "a",
+ "costUsd": 0.101448,
+ "note": "The second renderer looks more finished: its shadow is crisper, its surfaces are shaded with clearer separation between the slats, seat and legs, and the chair sits more firmly on the ground, while the first looks flatter and its back slats and legs blend together."
+ },
+ {
+ "task": "chair",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "second",
+ "winnerSide": "a",
+ "costUsd": 0.0071416,
+ "note": "The second render looks more finished, with cleaner edges, a crisper contact shadow under the legs, and smoother shading on the chair and floor, while the first has slightly muddier shading and artifacts near the backrest slats."
+ },
+ {
+ "task": "gear",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.102848,
+ "note": "The first render has slightly stronger shading contrast and a more visible soft contact shadow on the ground, which grounds the gear better than the brighter, flatter second render."
+ },
+ {
+ "task": "gear",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.101116,
+ "note": "The second render has a slightly darker, more contrasty background and a more visible soft shadow beside the gear, which grounds the object a bit better than the first."
+ },
+ {
+ "task": "gear",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.0071016,
+ "note": "The second render looks more grounded: its darker, more contrasted background and ground plane give the gear a slightly stronger soft shadow and side-face shading, so it reads as sitting on a surface rather than floating."
+ }
+ ]
+}
diff --git a/bench/agent-modeling/results/2026-11-01-default-judge-nofloor-vs-default.json b/bench/agent-modeling/results/2026-11-01-default-judge-nofloor-vs-default.json
new file mode 100644
index 00000000..95a59433
--- /dev/null
+++ b/bench/agent-modeling/results/2026-11-01-default-judge-nofloor-vs-default.json
@@ -0,0 +1,178 @@
+{
+ "label": "nofloor-vs-default",
+ "model": "sonnet",
+ "seed": 53,
+ "a": "nofloor",
+ "b": "default",
+ "summary": {
+ "trials": 18,
+ "costUsd": 1.2825,
+ "winsA": 0,
+ "winsB": 18,
+ "pValue": 0.000007629394531250002
+ },
+ "records": [
+ {
+ "task": "crate",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.1087169,
+ "note": "The second renderer wins because it grounds the crate with a visible floor and a cast shadow, while the first leaves it floating on a flat backdrop."
+ },
+ {
+ "task": "crate",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.1026716,
+ "note": "The first renderer wins because its crate sits on a ground plane with a visible cast shadow, which grounds it, while the second shows the crate floating on a flat grey background with no shadow or floor."
+ },
+ {
+ "task": "crate",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.007241,
+ "note": "The second renderer wins because the crate sits on a ground plane and casts a soft shadow, which grounds it in the scene, while the first leaves it floating against a flat backdrop."
+ },
+ {
+ "task": "mug",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.10264960000000001,
+ "note": "The first renderer wins because it shows a soft cast shadow on a ground plane that grounds the mug, while the second leaves the mug floating on a flat grey background with no shadow or floor."
+ },
+ {
+ "task": "mug",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.1025876,
+ "note": "The second renderer wins because the mug casts a soft contact shadow onto a ground plane with a horizon, so it sits on a surface instead of floating in a flat void."
+ },
+ {
+ "task": "mug",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.0072510000000000005,
+ "note": "The second renderer wins because it grounds the mug with a visible cast shadow and a ground plane with a horizon, while the first leaves it floating on a flat gray backdrop."
+ },
+ {
+ "task": "table",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.1025836,
+ "note": "The first renderer wins because it has a ground plane with a cast shadow that grounds the table, while the second shows the table floating in a flat gray void with no shadow."
+ },
+ {
+ "task": "table",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.1026296,
+ "note": "The second renderer wins because the table casts a soft ground shadow and sits on a lit floor, which grounds it, while the first has no shadow and floats on a flat backdrop."
+ },
+ {
+ "task": "table",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.007254999999999999,
+ "note": "The first renderer wins because it has a ground plane with a cast shadow that anchors the table, while the second leaves the table floating on a flat backdrop with no shadow or floor."
+ },
+ {
+ "task": "soap",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.1028176,
+ "note": "The second renderer wins because it shows a soft contact shadow and ambient occlusion under the object plus a gradient floor, so the box sits on a surface, while the first leaves it floating on a flat grey backdrop with no cast shadow."
+ },
+ {
+ "task": "soap",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.1027396,
+ "note": "The first render has a soft contact shadow and a bluish ambient bounce under the object that make it sit on a ground plane, while the second has only a faint dark edge on a flat backdrop, so the object seems to float."
+ },
+ {
+ "task": "soap",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.0073690000000000005,
+ "note": "The first renderer wins: its soft contact shadow and ambient bounce on a floor that blends into the background ground the object, while the second looks like a floating object on a flat gray backdrop with only a faint edge line."
+ },
+ {
+ "task": "chair",
+ "repeat": 0,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.1026576,
+ "note": "The second renderer looks more finished because the chair sits on a ground plane with a cast shadow, so it is grounded, whereas the first shows a chair floating on a flat background with no shadow."
+ },
+ {
+ "task": "chair",
+ "repeat": 1,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.1025916,
+ "note": "The first renderer wins because it adds a ground plane with a cast shadow under the chair, so the chair is grounded in a space instead of floating on a flat backdrop."
+ },
+ {
+ "task": "chair",
+ "repeat": 2,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.007294999999999999,
+ "note": "The first renderer wins because the chair sits on a ground disc and casts a soft shadow, so it is grounded, while the second shows the chair floating on a flat background with no shadow or floor."
+ },
+ {
+ "task": "gear",
+ "repeat": 0,
+ "firstSide": "b",
+ "answer": "first",
+ "winnerSide": "b",
+ "costUsd": 0.1032056,
+ "note": "The first renderer wins: its pale, softly graded background and a faint contact shadow beside the gear's edge ground the object, while the second shows a flat gray void with no shadow, so the gear looks like it floats."
+ },
+ {
+ "task": "gear",
+ "repeat": 1,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.10273560000000001,
+ "note": "The second renderer wins: its pale background with a soft contact shadow and a ground plane that shows in the preview view grounds the gear, while the first renderer leaves it floating on a flat grey void with no shadow."
+ },
+ {
+ "task": "gear",
+ "repeat": 2,
+ "firstSide": "a",
+ "answer": "second",
+ "winnerSide": "b",
+ "costUsd": 0.007493,
+ "note": "The second renderer looks more grounded: it has a soft contact shadow, a visible ground plane that fills the preview view, and a lighter, ambient-lit backdrop, while the first leaves the gear floating on a flat gray background with no shadow."
+ }
+ ]
+}
diff --git a/docs/parity.md b/docs/parity.md
index cd7fdd99..0d7634be 100644
--- a/docs/parity.md
+++ b/docs/parity.md
@@ -192,7 +192,7 @@ To move to a new Blender release, run `node scripts/parity-manual-snapshot.mjs`.
| Rendering > Cameras | partial | Perspective, orthographic views, focal length, animated paths, depth of field from depth and camera motion blur, both repeatable per frame. Object motion blur and bokeh shapes are missing. | [camera-path](../tests/camera-path.test.js), [camera](../tests/camera.test.js), [render-passes](../tests/render-passes.test.js) | #54 |
| Rendering > Lights > Light Objects | partial | One directional light with a shadow, 8 point lights, 8 spot lights and 4 rectangular area lights. Point and spot lights can cast shadows from one 24-tile atlas (a point light takes 6 tiles, a spot light 1). Area lights use a representative point and cast no shadow. The directional shadow is a single map, or up to four cascades through `addons/cascaded-shadows` (`shadowCascades` on the renderer and `environment.shadowCascades` in recipes, three by themselves when `shadow.extent` is above 40): scene `long-street` scores 0.1555 against Cycles with one map and 0.1398 with three cascades, for about 0.2 ms more a frame on an RTX 3060 when the camera moves. | [lighting](../tests/lighting.test.js), [cascades](../tests/cascaded-shadows.test.js), `npm run reference` scenes `spot-area` and `long-street` | #52 |
| Rendering > Lights > Light Linking | partial | `addons/light-linking`: a light's `affects` list (and `environment.keyAffects` for the sun) limits it to the named parts through `applyLightLinks`, as a Blender receiver collection does; the shader skips a light whose bit in the part's mask is clear. Linking changes what a light adds, not what it shadows. The path tracer and the light bake ignore it, recipes do not reach it (`lightLinking: false` in `scene_capabilities`) and there is no blocker list. Scene `light-linking` scores 0.0998 against Cycles. | [light-linking](../tests/light-linking.test.js), `npm run reference` scene `light-linking` | #52 |
-| Rendering > Lights > World Environment | partial | Recipes pick a named setup (`daylight`, `overcast`, `sunset`, `studio`) that carries a procedural environment map, with opt-in screen-space ambient occlusion. Code can load any HDRI; recipes reach only the named maps, with no URLs or files. No reflections between objects yet. The MCP preview adds an automatic floor with a contact shadow (`environment.ground: false` removes it). Cold-run reference-free score for sitting on a surface, summed over six tasks and 0 to 3 each: 0 before, 6 with the floor and 7 after a lone flat object (a gear) stopped being read as a floor; the front and side cameras see it edge-on, so only the three-quarter view shows it. | [environment](../tests/environment.test.js), [default look](../tests/default-look.test.js) | #53 |
+| Rendering > Lights > World Environment | partial | Recipes pick a named setup (`daylight`, `overcast`, `sunset`, `studio`) that carries a procedural environment map, with opt-in screen-space ambient occlusion. Code can load any HDRI; recipes reach only the named maps, with no URLs or files. No reflections between objects yet. The MCP preview adds an automatic floor with a contact shadow (`environment.ground: false` removes it). Cold-run reference-free score for sitting on a surface, summed over six tasks and 0 to 3 each: 0 before, 6 with the floor and 7 after a lone flat object (a gear) stopped being read as a floor; the front and side cameras see it edge-on, so only the three-quarter view shows it. A blind pairwise Sonnet judge (`default-judge.mjs`, six cold recipes, two cameras, 18 calls) prefers the floor to none 18 of 18 (p 0.0000076) and the darker floor now used (0.22) to the first one (0.6) 18 of 18; its control, one image against itself, picks the first 17 of 18. | [environment](../tests/environment.test.js), [default look](../tests/default-look.test.js) | #53 |
| Rendering > Materials > Components | partial | Surfaces with PBR factors and five maps, a clear coat, transmission with thickness, attenuation and IOR, sheen, and specular weight and tint. Anisotropic highlights and a thin-film iridescence layer, as in the glTF extensions, are compiled in only when a part uses them. There is no subsurface scattering, volume material or displacement. | [texture-set](../tests/texture-set.test.js), [material-layers](../tests/material-layers.test.js) | #50, #51 |
| Rendering > Materials > Assignment | done | A node names one material. | [agent-scene](../tests/agent-scene.test.js) | |
| Rendering > Materials > Preview | out of scope | Interface for a person. Agents use `scene_look`. | | |
diff --git a/src/agent-ground.js b/src/agent-ground.js
index 9d485944..446e5b89 100644
--- a/src/agent-ground.js
+++ b/src/agent-ground.js
@@ -12,7 +12,7 @@ const FLOOR_LOWEST_TOLERANCE = 1e-3;
// The disc reaches this many scene half-widths past the scene, so its edge stays out of a framed shot.
const DISC_REACH = 6;
const MINIMUM_RADIUS = 2;
-const FLOOR_COLOR = [0.6, 0.6, 0.58];
+const FLOOR_COLOR = [0.22, 0.22, 0.21];
/** World-space axis-aligned bounds of one part, from its positions and matrix. */
function partBounds(part) {
diff --git a/tests/agent-ground.test.js b/tests/agent-ground.test.js
index 718d7c8b..e0a90a77 100644
--- a/tests/agent-ground.test.js
+++ b/tests/agent-ground.test.js
@@ -64,3 +64,10 @@ test('the placement is deterministic and moves the floor part in place', () => {
assert.equal(floor.matrix[13], 4);
assert.equal(floor.material.tag, 'surface');
});
+
+test('the automatic floor is a mid-dark tone, so a pale object and its contact shadow stand out from it', () => {
+ const placement = agentGroundPlacement([boxPart([0, 0.5, 0], [1, 1, 1])], defaultEnvironment);
+ const floorColor = createAgentGround(placement).material.color;
+ const luminance = 0.2126 * floorColor[0] + 0.7152 * floorColor[1] + 0.0722 * floorColor[2];
+ assert.ok(luminance < 0.3, `floor luminance ${luminance} is too close to the backdrop`);
+});