Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / scripts / ml / maia_parity_fixture.json

maia_parity_fixture.json71 lines · 3.1 KiBRaw
1{
2 "_comment": [
3 "Positions for scripts/ml/maia_parity.py. Chosen so that between them they exercise every",
4 "encoding decision that fails silently: the square indexing, the mirror-and-swap for black,",
5 "the promotion vocabulary, and the elo blend at both ends of its range.",
6 "",
7 "`self_elo` and `oppo_elo` are the model's SelfElo/OppoElo inputs, 0..5000. Two of the",
8 "positions sit at the ends of that range because `interpolate_elo`'s naming is inverted and a",
9 "blend computed the wrong way round is only visible where the two embeddings differ most.",
10 "",
11 "FENs are standard; the harness feeds them to python-chess and to the app's own encoder."
12 ],
13 "positions": [
14 {
15 "name": "startpos",
16 "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
17 "self_elo": 1500,
18 "oppo_elo": 1500,
19 "why": "White to move, no mirror. The baseline: if this disagrees, nothing else matters."
20 },
21 {
22 "name": "startpos-black",
23 "fen": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR b KQkq - 0 1",
24 "self_elo": 1500,
25 "oppo_elo": 1500,
26 "why": "The same position with black to move. Mirrored and colour-swapped, so it must encode to the same 12 planes as startpos - and the two must therefore produce identical logits."
27 },
28 {
29 "name": "italian-middlegame",
30 "fen": "r1bqk2r/pppp1ppp/2n2n2/2b1p3/2B1P3/2N2N2/PPPP1PPP/R1BQK2R w KQkq - 6 5",
31 "self_elo": 1100,
32 "oppo_elo": 1900,
33 "why": "A real middlegame with every piece type on the board, and asymmetric elos so a self/oppo swap is visible."
34 },
35 {
36 "name": "sicilian-black-to-move",
37 "fen": "r1bqkbnr/pp1ppppp/2n5/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 2 3",
38 "self_elo": 2500,
39 "oppo_elo": 1100,
40 "why": "Black to move in an asymmetric position, so the mirror actually changes the planes rather than mapping the board onto itself."
41 },
42 {
43 "name": "promotion-available",
44 "fen": "8/2P2k2/8/8/8/8/5K2/8 w - - 0 1",
45 "self_elo": 1900,
46 "oppo_elo": 1900,
47 "why": "A white pawn on c7. The 256 promotion logits are only reachable from rank 7, and this is the position where they are the moves that matter."
48 },
49 {
50 "name": "promotion-available-black",
51 "fen": "8/5k2/8/8/8/8/2p2K2/8 b - - 0 1",
52 "self_elo": 1900,
53 "oppo_elo": 1900,
54 "why": "The same, mirrored: a black pawn on c2 must encode as a white pawn on c7, because the vocabulary has no black promotions at all."
55 },
56 {
57 "name": "endgame-elo-floor",
58 "fen": "8/8/4k3/8/8/4K3/4P3/8 w - - 0 1",
59 "self_elo": 0,
60 "oppo_elo": 0,
61 "why": "King and pawn, at elo 0 - where interpolate_elo puts all the weight on elo_embedding_high. Reversing the blend is invisible at 2500 and maximal here."
62 },
63 {
64 "name": "endgame-elo-ceiling",
65 "fen": "8/8/4k3/8/8/4K3/4P3/8 w - - 0 1",
66 "self_elo": 5000,
67 "oppo_elo": 5000,
68 "why": "The same board at the other end of the elo range. Its logits must differ from the floor case, which is what proves the elo input reaches the model at all."
69 }
70 ]
71}