File size: 7,388 Bytes
fd9aedf 1c56cd2 fd9aedf ad60a46 fd9aedf ad60a46 fd9aedf ad60a46 fd9aedf ad60a46 fd9aedf ad60a46 fd9aedf ad60a46 fd9aedf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | ---
license: mit
language:
- en
library_name: nanogpt
pipeline_tag: text-generation
tags:
- daydream
- nanogpt
- char-level
- gpt
- chess
- uci
- minichess
---
# Model Card β `daydream-chess-nanogpt-micro-1` (v1, Micro)
> A [sup computer](https://www.supcpu.com) release β a small language model studio. [Model page](https://www.supcpu.com/models/daydream-chess-nanogpt-micro-1/) Β· [monorepo](https://github.com/romellogoodman/sup-computer) (frozen code: [`projects/daydream/models/daydream-chess-nanogpt-micro-1/`](https://github.com/romellogoodman/sup-computer/tree/main/projects/daydream/models/daydream-chess-nanogpt-micro-1), tag `daydream-chess-nanogpt-micro-1`) Β· runs in your browser at [www.supcpu.com/model-player](https://www.supcpu.com/model-player/).
<div class="takeaways">
<p class="takeaways-label">Key takeaways</p>
<ul>
<li>A 0.79M-param char-level GPT trained entirely on <strong>synthetic self-play</strong> β no human corpus exists for 5Γ5 Gardner minichess, so all 4,135 training games came from two Fairy-Stockfish instances playing each other.</li>
<li>Fixed-depth engine self-play is <strong>fully deterministic</strong> on its own β the first generation attempt produced identical games every time. Fixed by randomizing opening plies (sourced from the engine's own legal-move list) before search takes over.</li>
<li>100% clean completion, 39.2% legal-move rate on first try β slightly higher than the <a href="daydream-chess-nanogpt-1.md">Regular</a> tier's 35.3%, consistent with a smaller board being an easier legality problem to learn, though the corpora and vocab sizes differ too much to call it a controlled comparison.</li>
<li>Smallest tier in the three-board <a href="../../projects/daydream/README.md">daydream</a> family β 5Γ5 is the smallest board that can hold one of every standard chess piece, which is why Micro uses Gardner's real, balance-tested arrangement rather than an invented one.</li>
</ul>
</div>
The smallest tier in the [`daydream`](https://github.com/romellogoodman/sup-computer/blob/main/projects/daydream/README.md)
family: a chess-move GPT trained on **Gardner minichess**, a real 5Γ5 chess
variant β one each of King/Queen/Rook/Bishop/Knight per side, five pawns.
Same mechanic as the rest of the series: legal moves snap into focus,
illegal moves render as dim near-misses instead of being discarded.
> **A smaller board means a smaller book to memorize.** The animating
> thesis behind the daydream series is that repetition (opening theory,
> memorized lines) is where a model is most "in focus" and least
> interesting. Micro tests the far end of that: with only 25 squares and 6
> non-pawn pieces per side, there's very little room for memorized
> structure at all β almost everything the model does here, it has to
> generalize from a comparatively tiny, self-play-only corpus.
## Model details
| | |
|---|---|
| **Version / git tag** | `daydream-chess-nanogpt-micro-1` (research run `micro-r1`) |
| **Architecture** | modern char-level (RoPE, RMSNorm, bias-free) on the shared `core` engine |
| **Size** | 4 layers Β· 4 heads Β· 128 embedding dim Β· 128 context Β· dropout 0.1 Β· ~0.79M params |
| **Tokenizer** | character-level, 15-char vocabulary over UCI move text on a 5Γ5 board (files aβe, ranks 1β5, promotion letters n/q/r, space, newline) |
| **Checkpoint** | `projects/daydream/models/daydream-chess-nanogpt-micro-1/` (weights not committed) |
| **Built on** | the monorepo's shared [`core`](https://github.com/romellogoodman/sup-computer/tree/main/core) engine |
| **Developed with** | Claude ([Claude Code](https://claude.com/claude-code)) |
| **License** | MIT |
## Intended use
Same exhibit posture as Regular, scaled to the smallest board in the
series. Pairs with `harness.py` (this folder), which plays the model
against Fairy-Stockfish under the built-in `gardner` variant.
**Out of scope.** Not a chess engine, not evaluated for playing strength.
Vocabulary and board are Gardner-minichess-specific β moves here are
meaningless on Regular's or Grand's boards and vice versa (see
[ADR-0022](https://github.com/romellogoodman/sup-computer/blob/main/docs/adr/0022-daydream-three-tier-sampler-prober-shape.md)
on why tiers never share a vocabulary).
## Training data
No human corpus exists for 5Γ5 chess, so this tier is entirely synthetic:
4,135 self-play games between two Fairy-Stockfish instances under the
engine's built-in `gardner` variant β bounded-depth search, not
strength-reduced (see
[ADR-0021](https://github.com/romellogoodman/sup-computer/blob/main/docs/adr/0021-daydream-fairy-stockfish-dependency.md)).
Fixed-depth search alone is fully deterministic; the first attempt produced
identical games every time. The fix: randomized opening plies, sourcing
random legal openings from the engine's own `go perft 1` move list, plus a
repetition-window cutoff for games that fell into shuffling loops. Corpus
is vendored in-folder as `games.txt` β synthetic, seeded, code-owned,
committed, the same treatment as kenosha-kid's `raw.txt`.
## Training procedure
- **Optimizer:** AdamW, LR 3e-4 with cosine decay to 3e-5, 100 warmup iters, Ξ²β 0.99, batch size 64.
- **Run:** 2,500 iterations, best val loss 0.718.
- **Hardware:** Apple Silicon Mac (MPS / Metal backend), `torch.compile` disabled.
## Evaluation
| Metric | Result (30 games) |
|---|---|
| **Clean completion rate** | 30/30 (100%) |
| **Legal-move rate (first try)** | 121/309 (39.2%) |
Micro's legal-move rate (39.2%) is somewhat higher than Regular's (35.3%,
[`daydream-chess-nanogpt-1`](https://github.com/romellogoodman/sup-computer/blob/main/research-docs/model-cards/daydream-chess-nanogpt-1.md)). One reading: a
smaller board and smaller per-position legal-move count is an easier
legality-learning problem. But the two aren't a strict apples-to-apples
comparison β different corpora, different vocab sizes, different training
run lengths.
## Limitations
- **Not evaluated for playing strength**, deliberately.
- **Synthetic corpus only** β no human Gardner-minichess games exist to
compare against; the training distribution is entirely a product of
bounded-depth Fairy-Stockfish self-play plus randomized openings.
- **Legality is learned, not guaranteed** β same resample-then-force-random
fallback as every tier in this series.
- **No weights in the tree** ([ADR-0002](https://github.com/romellogoodman/sup-computer/blob/main/docs/adr/0002-no-weights-in-tree.md)).
## How to reproduce
```bash
cd projects/daydream/models/daydream-chess-nanogpt-micro-1
python prepare.py # -> micro/{train,val}.bin + meta.pkl
python train.py config.py # -> ./ckpt.pt (2500 iters, val ~0.72)
python harness.py --games 30 # verification
```
Requires Fairy-Stockfish on `PATH` (`brew install fairy-stockfish`).
Experiment write-up: [Can a chess model's illegal moves be the point?](https://github.com/romellogoodman/sup-computer/blob/main/research-docs/reports/illegal-moves-are-the-point.md)
## Citation / credits
- The shared `core` engine (modern nanoGPT lineage β RoPE, RMSNorm, bias-free).
- [Fairy-Stockfish](https://github.com/fairy-stockfish/Fairy-Stockfish) β self-play corpus generator and legality arbiter, via its built-in `gardner` variant.
- Set up and trained with Claude ([Claude Code](https://claude.com/claude-code)).
|