# Miso’s Meadow: a stronger WSRF brain

Miso still chooses **forage, rest, shelter, or explore** from hunger, energy, cold, curiosity, and clear/rain weather. This release preserves the four activities and teacher preferences while training on **96,000 synthetic examples** instead of 24,000.

This is supervised imitation learning. Miso learns the teacher’s activity preferences; movement, animation, changing needs, and memories remain game rules. The browser does not collect training data or retrain while you play.

## Measured results

Four candidate forests were compared using 12,000 validation examples. The selected forest has **64 trees**, 32 per weather zone, with maximum depth 14. On a separate 24,000-example test set it matched the teacher on **99.1833%** of cases. The original forest achieved **98.4333%** on that same set. The original 98.5% result used a different, smaller test set.

The full browser forest matched Python on **86,300** test, corner, and float32 boundary cases, including probability comparison to a tolerance of 1e-12. These checks establish fidelity for the tested recipe and fixtures. Gameplay checks exercise all four memories, weather, planting, reset, and a long simulation.

## Reproduce

From the complete Range Arcade folder, using Python with the supplied `pytoolz` package, NumPy, pandas, scikit-learn and Node 22 or newer:

```sh
/home/wiliamrocha/.spenv/bin/python -B games/miso-meadow/training/train.py
node tools/test-miso.cjs
npm run build
```

On another machine, use its Python executable with the same dependencies; versions and library source hashes are in `training/report.json`. `training/requirements.txt` records this environment’s numeric packages. The shared trainer is `tools/wsrf/train.py` in the arcade root. It also trains the two flight copilots with `--game lantern-post` or `--game summit-post`.

`indexrng.Index('miso-meadow-v2', backend='blake2b')` creates independent `train`, `validation`, and `test` streams. The four candidates use 16/32 trees per zone and depths 10/14, three samples per leaf, all features, and seed 1717. Validation accuracy selects the candidate; model size breaks ties. Test data is evaluated only after selection.

WSRF’s OOB collection remains enabled because version 8 derives zone reputation from it. Binary calibration is not applied to these multiclass models. Adaptive complexity and prior blending are disabled. The shared exporter preserves class order, zone reputation blending, and float32 traversal, using explicit branch and leaf tags.

The browser uses `shared/wsrf.js` through Miso’s four-need `brain.js` wrapper. `forest.json` contains all fitted trees. `training/baseline-v1.json` preserves the old forest for the comparison; `training/validation.json` contains Python reference outputs. The old native rule export remains historical source only and is not used or distributed as this model.

Training candidates and intermediate data stay under `tools/wsrf/.cache`. Retraining replaces the published forest and receipts only after accuracy and export checks pass. Publishing uses saved models; Netlify needs no Python, API keys, or backend.

WSRF’s MIT notice is retained in `LICENSE.wsrf`. qrand still supplies the meadow’s deterministic plants and music through the existing browser adapter.
