From 0e9e1ee837f581efd39a32e6407e23a58b2d3691 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 19 Nov 2026 22:40:50 +0100 Subject: [PATCH] Synaptic Induction Chamber (the pain box) in the CLI, README and docs; stale build, determinism and scenario text corrected The CLI usage and run output carry the ruled name in a title line (the render and the sweep table are untouched). README's build note and determinism paragraph describe the Lodur-backed slice and the end-of-tick rows, including the goal column of a same-tick Flinch and break. The scenario doc no longer says none of Lodur's layers exist or that stable ids are missing. Co-Authored-By: Claude Sonnet 5.5 --- README.md | 28 ++++++++++++------- docs/pain-sweep.md | 2 +- docs/scenarios/fella-bad-day-at-the-office.md | 7 +++-- src/BadDay.Cli/Program.cs | 6 ++++ tools/PainSweep/Program.cs | 2 +- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2f035e8..2cfe0a6 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,10 @@ impairment) in one place where a player can poke at all of it. Canonical: `https://eureka.gamecult.org/forge/GameCult/BadDaySimulator`. GitHub `GameCult/BadDaySimulator` is a push mirror. -## What runs today: the pain box +## What runs today: the Synaptic Induction Chamber (the pain box) -A deterministic simulation of one virtual human with a hand in a pain box, -run headless or on a Ymir ragdoll. Question it answers: **how long until the +A deterministic simulation of one virtual human with a hand in the Synaptic +Induction Chamber (the pain box), run headless or on a Ymir ragdoll. Question it answers: **how long until the will breaks, or the box is disabled first?** The nervous model is Lodur's (`Lodur.Actor`); this game holds the box, the seed, the restraint and the recorder. It needs sibling checkouts of Lodur and Ymir (`LODUR_ROOT`, else @@ -87,8 +87,15 @@ broken will does. All parameter values are **placeholders**, not physiology; the figures in Lodur's target are marked unverified and so are these. Break times in the output are properties of this toy model, not predictions about people. Bit-exact output across CPU architectures is not claimed; same-machine runs -are byte-identical (the loop uses only `+ - * /` and comparisons, no -transcendental functions). +are byte-identical. The headless arithmetic is Lodur's and uses only `+ - * /` +and comparisons; the hold behaviour's shake uses `Math.Sin`, and the body run +adds native physics, so neither is claimed bit-exact across machines (Windows +and Linux x64 agreed on seeds 1-5, the sweep and `run --body` when compared). + +The timeline of a run differs from the pre-Lodur slice only in that each row is the +Actor's state at the end of its tick: a Flinch row shows strain and resolve after the +tick's update, and when a Flinch and the will's break fall on the same tick the Flinch +row's goal column reads Withdraw. Persistent content (puppet definitions, drive parameters, saved levels) will be CultCache per Lodur's `content-is-cultcache`; this slice has none, so it @@ -96,8 +103,9 @@ has no cache layer and no JSON. ### Build note -The core has no engine reference (`core-engine-free`). The slice has no -package dependencies, so the tests are a plain console program rather than -xunit. On the Yggdrasil mind host `dotnet restore` currently fails on a -NuGet named mutex (read-only `/dev/shm`); the slice was compiled there with -Roslyn's `csc` directly, which is why the `.csproj` files are the unverified part. +The core has no engine reference (`core-engine-free`). It references the sibling Lodur checkout +(`LODUR_ROOT`, else `..\Lodur`) and nothing else, so `dotnet build` and `dotnet run` work with the +.NET SDK alone; the tests are a plain console program rather than xunit. Only `BadDay.Ymir` (and what +references it: the CLI and the tests) builds Ymir's native library, which needs cmake and a C compiler +(on Windows MinGW: `CMAKE_GENERATOR="Ninja Multi-Config" CC=gcc`). The projects were built and the tests +run on Windows and on Linux. diff --git a/docs/pain-sweep.md b/docs/pain-sweep.md index 0273f00..f46f420 100644 --- a/docs/pain-sweep.md +++ b/docs/pain-sweep.md @@ -1,6 +1,6 @@ # Pain sweep: time to break over intensity and suppression -`tools/PainSweep/Program.cs` runs the pain box puppet over a grid of box +`tools/PainSweep/Program.cs` runs the Synaptic Induction Chamber (the pain box) puppet over a grid of box intensity (rows) and withdrawal-reflex suppression strength (columns, `PainBoxParameters.Reflex.MaxSuppression`: the largest fraction of the reflex the will can hold down). It is engine-free and deterministic; the same build prints the diff --git a/docs/scenarios/fella-bad-day-at-the-office.md b/docs/scenarios/fella-bad-day-at-the-office.md index 9599ce0..b0ed809 100644 --- a/docs/scenarios/fella-bad-day-at-the-office.md +++ b/docs/scenarios/fella-bad-day-at-the-office.md @@ -5,7 +5,7 @@ readable; none is measured physiology or tuned play. Nothing here is canon until Concept: Meta, 2026-11-06. The protagonist's name, **Fella**, is by **Deru**. -Built on the first slice: the pain box (`PainBoxSimulation`, merged in +Built on the first slice: the Synaptic Induction Chamber (the pain box) (`PainBoxSimulation`, merged in [GameCult/BadDaySimulator#1](https://eureka.gamecult.org/forge/GameCult/BadDaySimulator/pulls/1)) and its sweep, [`docs/pain-sweep.md`](https://eureka.gamecult.org/forge/GameCult/BadDaySimulator/src/branch/main/docs/pain-sweep.md). Layer and invariant names (`drive-is-state`, @@ -224,7 +224,7 @@ resolve, so the personality effect can be isolated in testing. ## 4. What Lodur and Ymir must expose -Lodur (all under Lodur's layer rules; none of it is built): +Lodur (all under Lodur's layer rules; the nervous layers and the hold stand-in exist, and none of what follows is built): - Actor drive state readable and writable per tick: `resolve`, `adrenaline`, per-limb-group `strength`, `goal`, goal weights, objective pull. The goal as first-class state with a typed `GoalFlipped` event. - Perception of non-contact stimuli by channel and region (audio, visual, interrupt, proximity), feeding the same @@ -246,7 +246,8 @@ Still missing: - Breakable objects: a break threshold on a joint or weld, or removal of a body on a destroy call. The SoA world has a fixed capacity and no removal. - Joint springs, for stiff limbs without explicit PD torques. -- Stable ids for actors and objects so scenario documents refer to them. +- An id convention for actors and objects: the SoA world carries a StableId lane, so ids exist; scenario + documents still need BDS to allocate and name them. ## 5. Three tuning checks diff --git a/src/BadDay.Cli/Program.cs b/src/BadDay.Cli/Program.cs index 5aa767d..b2a503c 100644 --- a/src/BadDay.Cli/Program.cs +++ b/src/BadDay.Cli/Program.cs @@ -10,6 +10,8 @@ namespace BadDay.Cli; public static class Program { private const string Usage = """ + baddaysim: the Synaptic Induction Chamber (the pain box) + baddaysim run --seed N [options] one run, full timeline baddaysim run --seed N --body [options] the same run on the Ymir ragdoll, with the hand-out time baddaysim sweep --seed N --count M [options] seeds N..N+M-1, break-time summary @@ -22,6 +24,8 @@ public static class Program --every S timeline sample interval (default 1) """; + private const string Title = "Synaptic Induction Chamber (the pain box)"; + public static int Main(string[] args) { try { return Execute(args, Console.Out); } @@ -51,6 +55,7 @@ public static class Program if (args[0] == "run" && opts.ContainsKey("body")) { var b = BodyPainBox.Run(p with { TickSeconds = BodyPainBox.TickSeconds }, seed); + output.WriteLine(Title); output.Write(b.Run.Render()); output.WriteLine(b.Run.Summary()); output.WriteLine(b.HandOutMs is { } out_ @@ -63,6 +68,7 @@ public static class Program if (args[0] == "run") { var r = PainBoxSimulation.Run(p, seed); + output.WriteLine(Title); output.Write(r.Render()); output.WriteLine(r.Summary()); return 0; diff --git a/tools/PainSweep/Program.cs b/tools/PainSweep/Program.cs index b987376..f1ee1f8 100644 --- a/tools/PainSweep/Program.cs +++ b/tools/PainSweep/Program.cs @@ -7,7 +7,7 @@ using BadDay.Core; using Lodur; // Grid sweep: stimulus intensity (rows) x withdrawal-reflex suppression strength -// (columns, PainBoxParameters.MaxSuppression). Each cell runs Seeds consecutive +// (columns, PainBoxParameters.Reflex.MaxSuppression). Each cell runs Seeds consecutive // seeds and prints the median time-to-break in seconds over the runs that broke, // "never" if none broke within MaxSeconds, and "(k/N)" when only k of N broke. // Engine-free and deterministic: same build, same table, byte for byte.