yomibench

Training a bot on one PC

An Arena entry is a single value net (value.npz) trained on the Arena's candidate set (set 7 in Era 2). It scores positions — who is winning, from one side's view — and the Arena runs the same full search for every bot.

1. The value net: the training loop

uv run python tools/train_loop.py --out ~/.yomibench/train --candidate-set 7

Each cycle:

  1. Self-play. The current best plays itself (plain search before the first promotion) on game-pool:auto, headless copies of your own game, for --games-per-cycle games (default 200).
  2. Train. A small value network learns from every cycle's records so far.
  3. Gate. The new net plays the current best in seat-swapped pairs over every pairing of --characters (--pairs each, a fixed number). The decision rule is fixed before any game is played (tools/pool_eval.py prints it first): the new net is promoted only on a clear win over the current best.
  4. Promote. If the new net wins clearly, it becomes the best: OUT/best.json names it (generation, model, sha256) and the model is kept as OUT/models/<sha256>.npz.

Every stage is skipped when its output exists, so stopping and rerunning the same command resumes. --cycles N stops after N cycles; the default keeps going.

Starting from our weights

The real game is slow: one PC plays tens to low hundreds of games an hour. Starting from scratch takes days before the first promotions. To continue from HustleBot's published value net instead (each release's gen-N.npz; weights are published two generations behind the current best):

uv run python tools/train_loop.py --out ~/.yomibench/train --candidate-set 7 --start-from gen-N.npz

Entering HustleBot's own nets unchanged is refused: the checks compare an entry's arrays with the house models.

2. Check your value net

uv run python tools/validate_submission.py --value PATH/TO/value.npz --name my-bot-1

PATH/TO/value.npz is your best value net: the model OUT/best.json names. The checks are the ones the Arena runs on an entry (see SUBMIT.md). When they pass, submit value.npz from the site's Submit page.

3. Test it like the Arena

The Arena plays every entry as full:VALUE.npz: double-oracle search over every move on candidate set 7 with factor refinement, top-2 fine DI, the L1 toggle verification pass and coarse-to-fine XY aim refinement, scored by your value net. tools/arena_match.py plays two value nets under everything arena/spec.json pins (the search, candidate set, match settings, turn cap and characters), here your bot against your previous version:

uv run python tools/arena_match.py --bot value-2.npz --vs value-1.npz --pairs 2 --procs 4

That is every character pairing, two seat-swapped pairs each (100 games). Raise --pairs for a clearer answer.

Settings worth knowing

flag default
--engine game-pool:auto any engine spec (docs/SETUP.md)
--candidate-set 6 how finely the bot's options are discretized; the Arena plays 7 in Era 2
--characters all five the gate plays every ordered pairing of these
--games-per-cycle 200 more games per cycle: steadier training, slower cycles
--pairs 30 gate pairs per pairing
--procs 1 parallel self-play and gate processes
--below-normal off run every stage at below-normal priority (Windows), to keep the PC responsive

Reading the results