# The Adventure Wing · Libraries and training

Eight adventures share deterministic replay, local notebooks, optional sound, accessible action buttons, and an inspectable coach. The existing arcade and poker rules and models stay in their own worlds.

## Six fitted companions

Grand Theft Condo, Venus Cloudport, and James Webbz’s Signal Web each use an actual `pytoolzx.wsrf.WSRFRegressor`. The isolated pytoolzx installation supplies `indexrng.Index` with separately named BLAKE2b seed streams for training, validation, sealed-test labels, and complete fresh episodes. Browser worlds reuse the arcade’s verified integer qrand adapter.

The label is the final 0–100 design score after a candidate action and complete continuations. Future choices use the documented reference policy with 18% random exploration. Training visits states through a separate mixed exploration policy. Compact and full candidates compete on validation action regret; the chosen candidate is fixed before sealed-test and fresh-episode evaluation. These are supervised action-value fits, not live learning in the browser.

The three fits use 122,603 action rows and 1,217,480 complete training continuations. The table below records each shipped pass separately. Cloudport’s second pass adds the full public arrival manifest, dock workloads and upcoming arrivals to its features.

| Game | Pass | Train / validation / test episodes | Continuations per action: train / validation / test |
|---|---:|---|---|
| Grand Theft Condo: Midnight Shift | 1 | 384 / 64 / 96 | 8 / 16 / 24 |
| Venus Cloudport | 2 | 1024 / 128 / 192 | 12 / 24 / 32 |
| James Webbz’s Signal Web | 1 | 384 / 64 / 96 | 8 / 16 / 24 |
| The Volcano Watch | 1 | 384 / 64 / 96 | 8 / 16 / 24 |
| Market Day in Sudoku Town | 1 | 384 / 64 / 96 | 8 / 16 / 24 |
| The Pedlar's Road | 1 | 384 / 64 / 96 | 8 / 16 / 24 |

| Game | Selected fit | Training rows | Sealed-test MAE | Browser parity probes |
|---|---|---:|---:|---:|
| Grand Theft Condo: Midnight Shift | full | 9907 | 0.633 | 2234 |
| Venus Cloudport | full | 59164 | 2.142 | 2429 |
| James Webbz’s Signal Web | full | 22308 | 5.019 | 2111 |
| The Volcano Watch | full | 9989 | 1.946 | 2192 |
| Market Day in Sudoku Town | compact | 13132 | 1.773 | 1154 |
| The Pedlar's Road | full | 8103 | 1.902 | 2156 |

## Fresh complete episodes

Each evaluation uses 160 fresh seeds at each of three focus settings, with the model, explicit reference policy, and random actions on the same starting worlds. Each score is a game-design objective, rather than a measurement of human enjoyment. The reference policy also helps generate continuation labels; matching or outperforming it is a useful local comparison, not a general optimality claim.

| Game | Focus | WSRF mean | Reference mean | Random mean |
|---|---|---:|---:|---:|
| Grand Theft Condo: Midnight Shift | balanced | 100.00 | 100.00 | 87.26 |
| Grand Theft Condo: Midnight Shift | care | 100.00 | 100.00 | 85.26 |
| Grand Theft Condo: Midnight Shift | thrifty | 100.00 | 100.00 | 83.12 |
| Venus Cloudport | balanced | 79.51 | 87.05 | 68.35 |
| Venus Cloudport | care | 80.07 | 84.25 | 68.41 |
| Venus Cloudport | thrifty | 89.57 | 93.05 | 73.97 |
| James Webbz’s Signal Web | balanced | 92.85 | 95.45 | 13.50 |
| James Webbz’s Signal Web | care | 92.96 | 95.46 | 14.16 |
| James Webbz’s Signal Web | thrifty | 93.67 | 98.49 | 14.37 |
| The Volcano Watch | balanced | 90.31 | 89.74 | 47.67 |
| The Volcano Watch | care | 88.78 | 88.14 | 52.91 |
| The Volcano Watch | thrifty | 91.35 | 91.35 | 44.01 |
| Market Day in Sudoku Town | balanced | 88.00 | 88.00 | 48.88 |
| Market Day in Sudoku Town | care | 93.00 | 93.00 | 51.84 |
| Market Day in Sudoku Town | thrifty | 98.00 | 98.00 | 52.82 |
| The Pedlar's Road | balanced | 99.50 | 88.81 | 62.48 |
| The Pedlar's Road | care | 98.00 | 83.90 | 56.61 |
| The Pedlar's Road | thrifty | 100.00 | 92.88 | 65.53 |

In balanced fresh episodes, all three fitted coaches outperform random actions. The condo coach matches the reference score; the signal and cloudport coaches trail their reference policies. Cloudport’s second pass improved its measured mean from 74.76 to 79.51 on separately indexed evaluation batches, so this comparison describes two measured batches rather than a paired-seed experiment.

The JSON receipts preserve parameters, all score standard errors, explicit outcome averages, library/source hashes, model hashes, and the Python/browser float32 boundary probes. Exact per-seed evaluation outcomes appear beside them.

## Objectives and information

- **Condo:** three chores, a neighbor helped, a satellite cleared, HOA correspondence, and remaining coins. Ten task choices advance five story minutes. Room visits and the console puzzle pause the evening clock. The fitted coach ranks the high-level console task; its training assumes the solvable laser task is completed. In Watch mode the exact beam solver handles that task.
- **Cloudport:** ships served, partial dock service, safe alternate routes, remaining coins, and port heat. Six indexed arrivals use two size-limited piers, cooling stock, supply stock, and a 24-choice shift. The full arrival manifest is visible to the player.
- **Signal Web:** useful message routes and fully restored four-bit payloads, with a resource-focused reward for economical tuning. Three XOR masks combine with a visible interference key. The tri_xor XOR driver shapes indexed interference. Eight messages share a 24-choice budget. The preference score is distinct from the sound generated by a phrase.

Care and resource priorities change declared objective weights and enter the fitted model as features. They leave the seeded starting conditions intact. Models estimate ending score; tree paths are actual serving-tree comparisons.

## Two exact puzzle companions

**Laser Janitor** traces a beam through an integer grid, reflects it at mirrors, stops at closed gates or ships, and checks the three debris targets. Its companion enumerates 64 mirror configurations and four reachable XOR-gate patterns, then recommends a nearest complete safe route. The preview and sweep use the same tracer. A small version runs inside the condo console.

**Mystery Delivery** considers 36 parcel/time assignments for three visitors. Each collected clue filters this set. A theory is accepted only when every remaining assignment agrees on the named moon-coil carrier and time. The guide follows a fixed investigation order, and its proof view uses only collected statements. The unrevealed clue contents stay out of its deduction. These two companions are explicit algorithms, rather than fitted WSRF models.

## Existing modules reused

- `arcade/shared/pytoolz-lite.js`: integer qrand indexing and the two-input triangular-XOR step, with the arcade’s existing Python fixtures and licensing scope.
- `arcade/games/almanac-cafe/vendor/nedgelaw.js`: the existing Almanac supplies deterministic weather and wind. This is the same module used by Almanac Café.
- `arcade/shared/academy-forest.js`: complete regression-tree interpretation, including float32 comparisons.
- `arcade/shared/sound.js` and `jam-audio.js`: user-gesture audio and cancelable phrase playback, as in Lantern Jam.
- Dockmaster and Stormpost Squadron informed the cloudport’s visible arrival and resource choices; its turn-based rules are original to this wing.

The first release uses fictional, seed-generated neighborhood bulletins. It makes no RSS requests or other external runtime requests. The library source and existing game code are unchanged.

## Reproduce

From the editions root with the isolated pytoolzx environment:

```sh
../pytoolzx/.venv/bin/python -B tools/adventures/train.py --pass 1 midnight-condo signal-web
../pytoolzx/.venv/bin/python -B tools/adventures/train.py --pass 2 venus-cloudport
node tools/adventures/publish.cjs
node tools/adventures/test.cjs
npm run build -- --reuse
```

Model fitting is offline. The static site serves the exported forests; visitors need neither Python nor an account. Training caches live in a temporary directory. Rendering, saves, and hints work with the local deployed assets.
