# Vulcan vs XG-engine: 10,000 five-point matches at XG 2-ply

10,000 five-point matches between Vulcan (the engine of Gammon Forge, https://www.gammonforge.com) and XG-engine,
both searching at what eXtreme Gammon calls 2-ply, with dice taken from a public randomness beacon named before it
existed. The format follows HedgeHog's published study "Colossus vs eXtreme Gammon: 5,000 5-point matches at 2-ply"
(https://hedgehog-bg.com/learn/colossus-vs-xg-match). The write-up is at https://www.gammonforge.com/engine/verification.

| Vulcan's match win rate | Estimate | 95% interval |
|---|---|---|
| Luck-adjusted (GNU Backgammon's networks as reference) | **51.29%** | 51.15% to 51.43% |
| Raw | 50.81% (5,081 of 10,000) | 49.89% to 51.73% |

For comparison, HedgeHog's Colossus 2.0 against eXtreme Gammon 2.10 in the same format: 50.68% luck-adjusted (50.44%
to 50.93%), raw 49.60%.

## What was played

- 5-point matches, Crawford rule, Jacoby and beavers off. 34,307 games.
- Vulcan: production networks (contact network "f5"), 1-ply search with 1-ply cube and take decisions (eXtreme
  Gammon's 2-ply), checker play by match winning chances, no opening book. The files call it "bg", the engine's code
  name.
- XG-engine: our native implementation of eXtreme Gammon 2.10's engine (its search, neural networks and cube logic),
  at its 2-ply setting for checker play and cube decisions, opening book off. Real eXtreme Gammon 2.10 analysed pairs
  000000-000049 (100 matches) at 2-ply and flagged none of XG-engine's 14,233 decision records: the right column is
  eXtreme Gammon 2.10's own 2-ply play.
- Standard opening roll: each player rolls one die, ties re-rolled, the higher die moves first with both dice.
- The run is 5,000 pairs. Both matches of a pair use the same dice with the seats swapped (`pair_NNNNNN_a.mat`,
  `pair_NNNNNN_b.mat`), so neither side gets better dice. Vulcan is always Player 1 (the left column).

## What is here

| File | What it is |
|---|---|
| `games/pair_*_[ab].mat` | Every match, in JellyFish `.mat` format; tags at the top give the pair, its seed and the seat. |
| `beacon.json`, `seed.txt` | The drand round the dice came from, and the seed taken from it. |
| `verify_dice.py` | Regenerates every roll of every game from the seed and checks it against the files (Python 3, standard library only). |
| `preregistration.md` | The plan, written and hashed before the beacon round existed. |
| `matches.csv` | One row per match: the result, the net luck of the match in match winning chances, and the adjusted result. |
| `compute_result.py` | Recomputes both win rates and their intervals from `matches.csv` (Python 3, standard library only). |
| `results.json` | The pooled results as the run reported them. |

## Checking it

**The plan was fixed first.** The public gist https://gist.github.com/cmwetherell/50c9922e1b53bece94c7d7383523532c,
created 2026-11-10 19:33 UTC, names drand round 33848212 and the SHA-256 of `preregistration.md`:

    shasum -a 256 preregistration.md
    3eb70e70e9e66bbcd2dbf9ac245ad0449d6386db2cf4a9da8def6b8a6e137e56  preregistration.md

The plan fixes the engines and their settings, the number of matches, the luck reference and how the result would be
read. It is an entry from the project's experiment log and uses its internal names ("f5" for Vulcan's network, "D1"
for its 1-ply search, "XG-engine (native port)" for the opponent); it is unchanged, so the hash still matches.

**The dice.** They come from drand's quicknet chain, round 33848212, published 2026-11-10 22:00:00 UTC, after the
gist. Fetch it from any drand relay and compare with `beacon.json`:

    curl https://api.drand.sh/52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971/public/33848212

The seed is the first 16 hex digits of its `randomness`, `0956f05673db5ad9`, as a 64-bit integer:
672989448440077017. Pair N rolls from seed + N x 12345 (mod 2^64); game k of a match from the pair seed + k x 1000003,
one stream per game; the generator is ChaCha12 as in Rust's `rand` 0.9 `StdRng`, re-implemented in `verify_dice.py`:

    python3 verify_dice.py --seed 672989448440077017 --games games

    10000 files (34307 games, 1564116 rolls) checked, 0 with dice that do not follow from seed 672989448440077017

**The raw result** is in the files: the winner of a match's last game wins the match, and each game ends with a "Wins
N points" line, on the left for Vulcan and on the right for XG-engine:

    python3 - <<'EOF'
    import pathlib, re
    w = [len(re.findall(r"^( *)Wins \d+ point", f.read_text(), re.M)[-1]) < 10
         for f in sorted(pathlib.Path("games").glob("*.mat"))]
    print(len(w), "matches, Vulcan won", sum(w))
    EOF

    10000 matches, Vulcan won 5081

**The luck-adjusted result.** Every roll except each game's opening roll is valued by GNU Backgammon 1.08's own
neural networks at 0-ply, in match winning chances (Kazaross-XG2 match equity table): the chances after the best play
with the dice rolled, at that game's score, cube value and owner, minus the average over all 21 rolls (each weighted
by its probability). A match's result, 1 won or 0 lost, has the net luck of all its rolls subtracted. Luck depends on
the position, the score, the cube and the dice only, never on either player's choices, and averages to zero over the
rolls, so subtracting it leaves the estimate unbiased whatever the reference; it only removes noise (here the variance
per pair falls 42.7x). `matches.csv` has each match's luck and adjusted result, and `compute_result.py` turns them
into the numbers above:

    python3 compute_result.py matches.csv

    10000 matches in 5000 pairs; Vulcan won 5081
               raw: 50.81% [49.89%, 51.73%]  SD per pair 0.3306
     luck-adjusted: 51.29% [51.15%, 51.43%]  SD per pair 0.0506

The two matches of a pair share their dice, so the pair is the independent unit and the intervals use the spread of
the 5,000 pair means. Because the reference is GNU Backgammon's public networks, any match's luck can be recomputed
independently from its file.

**The opponent's moves.** Anyone with eXtreme Gammon 2.10 can import the files and check that the right column's
moves and cube actions are eXtreme Gammon's 2-ply choices.

## What this does not show

- It is not a game against Colossus: it compares two results against the same opponent, in the same format, with
  different dice and harnesses.
- The files cannot prove which program played the left column; only a rerun with the engine could.
