From d6e60858355cbfb5fdf2c8478a7611555b812534 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 15:27:44 +0200 Subject: [PATCH 001/184] Add experimental Germany AI training and CPU worker --- .gitignore | 9 + ai/README.md | 87 + ai/arena.cjs | 55 + ai/audit-remote.cjs | 59 + ai/audit-replays.cjs | 54 + ai/benchmark.cjs | 35 + ai/bridge.cjs | 54 + ai/core.cjs | 239 ++ ai/data-audit.json | 4332 +++++++++++++++++++++++++++++++++++++ ai/evaluate.py | 73 + ai/export-remote.cjs | 63 + ai/features.cjs | 25 + ai/generate.cjs | 72 + ai/infer.py | 95 + ai/launch-profile.sh | 19 + ai/launch-smoke.sh | 19 + ai/launch-v2.sh | 19 + ai/launch.sh | 19 + ai/package-results.py | 88 + ai/performance.py | 125 ++ ai/pool.py | 67 + ai/replay-audit.json | 502 +++++ ai/requirements-serve.txt | 2 + ai/serving-smoke.py | 48 + ai/summarize.py | 50 + ai/test.cjs | 81 + ai/test_pool.py | 32 + ai/train.py | 283 +++ ai/verify-export.py | 57 + 29 files changed, 6663 insertions(+) create mode 100644 ai/README.md create mode 100644 ai/arena.cjs create mode 100644 ai/audit-remote.cjs create mode 100644 ai/audit-replays.cjs create mode 100644 ai/benchmark.cjs create mode 100644 ai/bridge.cjs create mode 100644 ai/core.cjs create mode 100644 ai/data-audit.json create mode 100644 ai/evaluate.py create mode 100644 ai/export-remote.cjs create mode 100644 ai/features.cjs create mode 100644 ai/generate.cjs create mode 100644 ai/infer.py create mode 100755 ai/launch-profile.sh create mode 100755 ai/launch-smoke.sh create mode 100755 ai/launch-v2.sh create mode 100755 ai/launch.sh create mode 100644 ai/package-results.py create mode 100644 ai/performance.py create mode 100644 ai/pool.py create mode 100644 ai/replay-audit.json create mode 100644 ai/requirements-serve.txt create mode 100644 ai/serving-smoke.py create mode 100644 ai/summarize.py create mode 100644 ai/test.cjs create mode 100644 ai/test_pool.py create mode 100644 ai/train.py create mode 100644 ai/verify-export.py diff --git a/.gitignore b/.gitignore index 7256c56..7354c4b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,12 @@ viewer/public/*.jpg viewer/public/*.jpeg viewer/public/*.png .pnpm-store + +ai/private-data/ +ai/runs/ +ai/.venv/ + +source-bundle/ + +ai/__pycache__/ +serving-bundle/ diff --git a/ai/README.md b/ai/README.md new file mode 100644 index 0000000..1f3b3e0 --- /dev/null +++ b/ai/README.md @@ -0,0 +1,87 @@ +# Powergrid AI — first executable baseline + +This is an experimental training/serving pipeline, **not a replacement for the current production bot**. The trained self-play model beats the new simple heuristic but loses heavily to the engine's existing bot. No BGS bot routing has been changed. + +## Scope and information + +Germany, three players, normal region setup, original and Recharged rules, open and sealed (`fastBid`) auctions. Money is visible for every player. Other maps, player counts and randomized maps need another feature schema and training distribution. Optional region/color drafts are not represented adequately and must not be used with this model. + +The existing compiled JavaScript engine is the authoritative simulator. No game rules were modified. The engine revision is `365fc519903fa2b4e8c593eed6cc5f5f77b5332a`. Schema v2 contains 541 state numbers and 74 numbers per candidate action. Its 44-city vocabulary covers both original and Recharged Germany, including Stralsund/Mainz and Torgelow/Wiesbaden. Schema v1 omitted the two replacement cities and is superseded; do not mix v1 weights with current features. The policy scores a variable list of legal candidates. Large bid lists are approximated by the lowest eight bids, multiples of ten, and the maximum; this is not exhaustive bidding. + +Feature extraction excludes seed, deck order, logs, queued plans, and sealed bid amounts, including already submitted opposing bids. Sealed auctions retain the engine's actual resolution rules, rather than being treated as faster ascending auctions. Player order, plant markets, resource markets, cities, all players' money and holdings remain visible. The server passes trusted engine state; the model itself sees only the allowlisted features. + +## Corrected schema v2 results + +The final HF job completed in 155 seconds. It uses the 44-city vocabulary, 600 synthetic games, 32 supported human games, 12 imitation epochs and 16 self-play updates (482 completed episodes). Four JS workers serve 64 environments; optimizer batch is 1,024. Source: dataset commit `65ecfa063c272bd72a805d45f4ba55dc84a28f42`, archive `source-v4.tgz`. Job: https://huggingface.co/jobs/coyotte508/6abd0cba404719ba3761324e. + +Each comparison has 480 games and zero truncations: + +| Candidate | Opponents | Win share | +| ------------ | ------------------- | --------: | +| Imitation v2 | New heuristic | 13.75% | +| Self-play v2 | New heuristic | 90.00% | +| Imitation v2 | Existing engine bot | 0.00% | +| Self-play v2 | Existing engine bot | 0.00% | + +This is a failed playing-strength gate, despite a working training pipeline. Do not deploy it as the production bot. The larger optimizer batch improved component throughput but reduced gradient updates per epoch; these runs also change schema and rollout configuration, so they are not a controlled batch-size quality comparison. + +On the 8840U, the corrected self-play model reproduces all 480 laptop game outcomes. Pure inference p95 is 0.130 ms. Full worker p50/p95 is 0.773/1.202 ms across 48 representative positions; startup plus first request is 152 ms. All returned actions are legal. Both exports agree with PyTorch on 128 checked decisions each, with maximum absolute error below 0.000007. + +The throughput microbenchmark measured 2,766 decisions/s with one worker/24 environments, 6,289 with four workers/256 environments, and 6,177 with eight. Optimizer sample throughput rose from 18,874 to 28,590/s when increasing batch 256 to 1,024. This does not translate directly into full training speed or playing strength. + +## Initial evidence (schema v1; corrected-model results accompany the package) + +- Read-only BGS audit: 4,007 records, 3,978 marked ended. Export restricted to non-unlisted, ended Germany games with three players. +- 66 candidate historical games; 33 replay exactly against the current engine, including 7 sealed games. Reject 14 dropped/quit/bot games, 15 records that do not reach engine termination, and 4 incompatible replays. The initial run used 11,675 decision examples. Corrected-schema training excludes one color-draft game outside its supported setup: 32 games and 11,366 historical decision examples remain. These records are private and excluded from Git and serving bundles. +- Initial HF job: 600 synthetic games plus verified human examples, 12 imitation epochs, 16 PPO updates, all three seats share the model. Split imitation validation by whole game. HF job completed in 147 seconds excluding queue. CPU training is not run on the 8840U. +- Evaluation: 40 unseen seeds × 3 rotated seats × 4 rule combinations = 480 games per comparison. Model gets one seat, the selected opponent fills the other two. Zero truncated evaluation games. + +| Candidate | Opponents | Win share | +| --------------- | ------------------- | --------: | +| Imitation model | New heuristic | 59.27% | +| Self-play model | New heuristic | 81.77% | +| Self-play model | Existing engine bot | 2.08% | + +These are observed win shares, splitting ties. Seats sharing a seed are correlated. The simple heuristic is a weak opponent; its score is not evidence of human-level play. Use the existing bot as a gate and a training teacher in the next experiment. Freeze separate final-test seeds before selecting many checkpoints. + +8840U: all 480 model-vs-heuristic games completed with identical outcomes to the laptop. Pure ONNX inference p50 0.082 ms / p95 0.165 ms. Persistent JSONL worker on 48 representative positions: p50 0.725 ms / p95 1.144 ms; first request including worker startup 182 ms. All returned actions passed the engine. These are one-run measurements, not concurrency/load guarantees. + +The value head is an **uncalibrated self-play win estimate**, not a forecast of a player's final score or objective position strength. Imitation held-out value MSE is approximately 0.244. Do not expose a player-analysis graph from it yet: add round-stratified calibration, stronger reference opponents, and a separate final-score target if that is the desired analysis. + +## Run and reproduce + +Install the engine dependencies and build `engine/tsconfig.json` using the repository's package manager. Use Python 3.11+, Node 24, and `numpy`, `onnxruntime` for serving. Cloud training additionally needs PyTorch, `onnx`, and `huggingface_hub`; launch scripts use the PyTorch 2.6.0 CUDA 12.4 image. + +```sh +node --test ai/test.cjs +hf download coyotte508/powergrid-ai-germany-v1 --include 'runs/baseline-v2/*' --local-dir ai/runs/download +python ai/evaluate.py ai/runs/download/runs/baseline-v2/selfplay.onnx --seeds 40 --output evaluation.json +python ai/evaluate.py ai/runs/download/runs/baseline-v2/selfplay.onnx --seeds 40 --opponent legacy --output evaluation-legacy.json +python ai/serving-smoke.py ai/runs/download/runs/baseline-v2/selfplay.onnx +``` + +Private HF repositories require the owner's token in the CLI credential store. `launch-v2.sh` trains the corrected schema using `source-v4.tgz`; `launch.sh` reproduces the initial frozen `source-v1.tgz` job; `launch-smoke.sh` checks the updated concurrent trainer with `source-v2.tgz`. `launch-profile.sh` measures batching/worker throughput. Source archives contain only the compiled engine, its production dependencies, AI scripts and the deidentified verified training records. Use the recorded dataset commit plus archive hash for exact provenance; uploaded archives are not automatically rebuilt when local files change. + +Trainer controls: `GAMES`, `BC_EPOCHS`, `RL_UPDATES`, `ENVS`, `WORKERS`, `BATCH_SIZE`, `ROLLOUT_SAMPLES`, `OUT`, `RUN_NAME`, `HF_MODEL_REPO`. Start with four workers and 256 environments, then tune the optimizer batch from measurements. Increasing batch changes optimization dynamics; compare strength as well as throughput. The small model does not need to fill GPU VRAM. Python JSON conversion and feature packing still take appreciable time; a packed binary/shared-memory interface is the next throughput improvement if needed. + +## Platform worker contract + +Keep one worker alive per CPU execution slot: + +```sh +python ai/infer.py selfplay.onnx +``` + +Input is one JSON object per line: `{ "requestId": "unique-job-id", "revision": 123, "player": 0, "state": }`. + +Output echoes the request ID/revision and returns `move`, `winProbabilities`, `valueStatus`, `playerOrder`, `model`, `modelSha256`, and `elapsedMs`, or an `error`. Probabilities are ordered `[acting seat, next seat clockwise, third seat]`. + +Each request chooses one **atomic** engine action. Before committing it, the platform must reload/check the game revision and acting player, validate the action with its pinned engine, and commit through its normal move path with a server timestamp. Revision is an echoed correlation value here, not a concurrency lock. Retry stale jobs from fresh state; deduplicate by request ID; use the existing bot on timeout/error or unsupported options. Multiple atomic actions can be needed to finish a player's turn. The process provides no HTTP endpoint or authentication; invoke it through the platform's existing job machinery. + +## Next strength experiment + +1. Generate demonstrations from the existing engine bot and improve the heuristic's build/auction economics. Preserve information boundaries for all teachers. +2. Train against a mixture of existing bots, frozen older policies and self-play; use larger rollout batches and enough completed games rather than simply more GPU memory. +3. Evaluate across rule combinations and held-out seeds with paired uncertainty estimates; require improvement over the existing bot before routing production moves. +4. Expand to other maps/player counts using graph/city features and variable player encodings. Retrain; do not silently apply the Germany model. +5. Train/calibrate analysis targets separately. Public-money assumptions must remain explicit in any analysis UI. diff --git a/ai/arena.cjs b/ai/arena.cjs new file mode 100644 index 0000000..f9f2a82 --- /dev/null +++ b/ai/arena.cjs @@ -0,0 +1,55 @@ +const c = require('./core.cjs'), + readline = require('node:readline'); +let g, seat, opponent, rng, steps; +function advance() { + while (!c.E.ended(g) && g.currentPlayers[0] !== seat && steps < 1600) { + const p = g.currentPlayers[0]; + if (opponent === 'legacy') { + const old = Math.random; + Math.random = rng; + try { + g = c.E.moveAI(g, p); + } finally { + Math.random = old; + } + } else g = c.E.move(g, c.heuristic(g, p, rng).action, p); + steps++; + } + if (c.E.ended(g) || steps >= 1600) + return { + done: true, + truncated: !c.E.ended(g), + win: c.E.ended(g) ? c.outcome(g)[seat] : 0, + round: g.round, + steps, + final: g.players.map((p) => ({ powered: p.citiesPowered, money: p.money, cities: p.cities.length })), + }; + const a = c.candidates(g, seat); + return { + done: false, + state: c.observe(g, seat), + actions: a.map((x) => c.actionFeatures(g, seat, x)), + heuristic: c.heuristic(g, seat, rng).index, + }; +} +(async () => { + for await (const line of readline.createInterface({ input: process.stdin })) { + try { + const q = JSON.parse(line); + if (q.op === 'reset') { + g = c.start(q.seed, q.variant, q.sealed); + seat = q.seat; + opponent = q.opponent || 'heuristic'; + rng = c.seedrandom(q.seed + '-opponents'); + steps = 0; + } else if (q.op === 'step') { + g = c.E.move(g, c.candidates(g, seat)[q.action], seat); + steps++; + } + console.log(JSON.stringify(advance())); + } catch (e) { + console.error(e.stack); + process.exit(1); + } + } +})(); diff --git a/ai/audit-remote.cjs b/ai/audit-remote.cjs new file mode 100644 index 0000000..f7f0f0d --- /dev/null +++ b/ai/audit-remote.cjs @@ -0,0 +1,59 @@ +const fs = require('node:fs'); +const { parseEnv } = require('node:util'); +const { createRequire } = require('node:module'); +const requireApi = createRequire('/home/bgs/boardgamers-mono/apps/api/package.json'); +const { MongoClient } = requireApi('mongodb'); +(async () => { + const env = parseEnv(fs.readFileSync('/home/bgs/boardgamers-mono/apps/api/.env', 'utf8')); + const client = await MongoClient.connect(env.dbUrl, { serverSelectionTimeoutMS: 10000 }); + try { + const db = client.db(env.dbName || 'bgs'); + const c = db.collection('games'); + const counts = await c + .aggregate( + [ + { $match: { 'game.name': 'powergrid' } }, + { + $group: { + _id: { + version: '$game.version', + status: '$status', + map: '$game.options.map', + variant: '$game.options.variant', + players: '$options.setup.nbPlayers', + }, + n: { $sum: 1 }, + }, + }, + ], + { maxTimeMS: 20000 } + ) + .toArray(); + const sample = await c.findOne( + { 'game.name': 'powergrid', status: 'ended' }, + { projection: { data: 1, game: 1, options: 1, players: 1, status: 1 } } + ); + console.log( + JSON.stringify( + { + counts, + sample: sample && { + dataType: typeof sample.data, + dataKeys: typeof sample.data === 'object' ? Object.keys(sample.data || {}) : undefined, + dataLength: typeof sample.data === 'string' ? sample.data.length : undefined, + game: sample.game, + playerFields: Object.keys(sample.players[0] || {}), + hasSeed: !!sample.options?.setup?.seed, + }, + }, + null, + 2 + ) + ); + } finally { + await client.close(); + } +})().catch((e) => { + console.error(e.name, e.code); + process.exit(1); +}); diff --git a/ai/audit-replays.cjs b/ai/audit-replays.cjs new file mode 100644 index 0000000..5a29118 --- /dev/null +++ b/ai/audit-replays.cjs @@ -0,0 +1,54 @@ +const fs = require('node:fs'), + assert = require('node:assert/strict'); +const c = require('./core.cjs'); +const games = fs.readFileSync('ai/private-data/human-games.jsonl', 'utf8').trim().split('\n').map(JSON.parse); +const results = []; +let admitted = []; +const clean = (p) => ({ + money: p.money, + citiesPowered: p.citiesPowered, + cities: p.cities.map((c) => c.name).sort(), + powerPlants: p.powerPlants.map((p) => p.number).sort((a, b) => a - b), +}); +for (const h of games) { + let count = 0; + try { + if (h.players.some((p) => p.dropped || p.quit || p.bot)) throw Error('dropped/quit/bot'); + if (h.phase !== c.E.Phase.GameEnd) throw Error('not engine terminal'); + let g = c.E.setup(3, h.options, h.seed); + for (const m of h.moves) { + g = c.E.move(g, m.move, m.player); + count++; + } + assert.deepEqual(g.players.map(clean), h.final); + assert.ok(c.E.ended(g)); + admitted.push(h); + results.push({ + id: h.id, + version: h.version, + variant: h.options.variant, + sealed: !!h.options.fastBid, + moves: count, + accepted: true, + }); + } catch (e) { + results.push({ id: h.id, version: h.version, moves: count, accepted: false, reason: e.message.split('\n')[0] }); + } +} +fs.writeFileSync('ai/private-data/verified-games.jsonl', admitted.map((x) => JSON.stringify(x)).join('\n')); +const report = { + total: games.length, + accepted: admitted.length, + acceptedSealed: admitted.filter((x) => x.options.fastBid).length, + results, +}; +fs.writeFileSync('ai/replay-audit.json', JSON.stringify(report, null, 2)); +console.log({ + total: games.length, + accepted: admitted.length, + reasons: results.reduce((o, r) => { + let k = r.accepted ? 'accepted' : r.reason; + o[k] = (o[k] || 0) + 1; + return o; + }, {}), +}); diff --git a/ai/benchmark.cjs b/ai/benchmark.cjs new file mode 100644 index 0000000..b7d597e --- /dev/null +++ b/ai/benchmark.cjs @@ -0,0 +1,35 @@ +const c = require('./core.cjs'), + fs = require('node:fs'), + os = require('node:os'), + { performance } = require('node:perf_hooks'); +let runs = []; +for (const variant of ['original', 'recharged']) + for (const sealed of [false, true]) { + let steps = 0, + ended = 0; + const t = performance.now(); + for (let i = 0; i < 100; i++) { + let g = c.start('benchmark-' + i, variant, sealed), + rng = c.seedrandom('policy-' + i), + n = 0; + while (!c.E.ended(g) && n++ < 1600) { + const p = g.currentPlayers[0]; + g = c.E.move(g, c.heuristic(g, p, rng).action, p); + steps++; + } + ended += +c.E.ended(g); + } + const sec = (performance.now() - t) / 1000; + runs.push({ + variant, + sealed, + games: 100, + ended, + steps, + seconds: sec, + gamesPerSecond: 100 / sec, + stepsPerSecond: steps / sec, + }); + } +const result = { cpu: os.cpus()[0].model, node: process.version, runs }; +console.log(JSON.stringify(result, null, 2)); diff --git a/ai/bridge.cjs b/ai/bridge.cjs new file mode 100644 index 0000000..2484512 --- /dev/null +++ b/ai/bridge.cjs @@ -0,0 +1,54 @@ +const c = require('./core.cjs'), + readline = require('node:readline'); +let envs = [], + sequence = 0; +const seed = process.env.SEED || 'rollout-v1'; +const rng = c.seedrandom(seed); +function reset() { + const id = sequence++; + return { g: c.start(seed + '-' + id, id % 2 ? 'recharged' : 'original', id % 4 < 2), id, steps: 0 }; +} +function obs(e) { + const seat = e.g.currentPlayers[0], + a = c.candidates(e.g, seat); + return { + state: c.observe(e.g, seat), + actions: a.map((x) => c.actionFeatures(e.g, seat, x)), + seat, + episode: e.id, + heuristic: c.heuristic(e.g, seat, rng).index, + }; +} +(async () => { + for await (const line of readline.createInterface({ input: process.stdin })) { + try { + const q = JSON.parse(line); + let ended = []; + if (q.op === 'reset') { + envs = Array.from({ length: q.n }, reset); + } else if (q.op === 'step') { + q.actions.forEach((action, i) => { + const e = envs[i], + seat = e.g.currentPlayers[0]; + e.g = c.E.move(e.g, c.candidates(e.g, seat)[action], seat); + e.steps++; + if (c.E.ended(e.g) || e.steps >= 1600) { + ended.push({ + env: i, + episode: e.id, + truncated: !c.E.ended(e.g), + value: c.E.ended(e.g) ? c.outcome(e.g) : null, + steps: e.steps, + round: e.g.round, + }); + envs[i] = reset(); + } + }); + } else throw Error('unknown operation'); + console.log(JSON.stringify({ observations: envs.map(obs), ended })); + } catch (e) { + console.error(e.stack); + process.exit(1); + } + } +})(); diff --git a/ai/core.cjs b/ai/core.cjs new file mode 100644 index 0000000..4236f00 --- /dev/null +++ b/ai/core.cjs @@ -0,0 +1,239 @@ +const E = require('../engine/dist/index.js'); +const { map: germany, mapRecharged: germanyRecharged } = require('../engine/dist/src/maps/germany.js'); +const seedrandom = require(require.resolve('seedrandom', { paths: [__dirname + '/../engine'] })); +const TYPES = [ + 'ChoosePowerPlant', + 'Bid', + 'DiscardPowerPlant', + 'DiscardResources', + 'BuyResource', + 'Build', + 'UsePowerPlant', + 'ChooseRegion', + 'ChooseColor', + 'Pass', +]; +const RES = ['coal', 'oil', 'garbage', 'uranium']; +const CITIES = [...new Set([...germany.cities, ...germanyRecharged.cities].map((c) => c.name))].sort(); +const PHASES = Object.values(E.Phase); +const onehot = (v, vs) => vs.map((x) => +(x === v)); +const plant = (p) => + p ? [p.number / 50, p.cost / 4, p.citiesPowered / 8, ...onehot(p.type, [0, 1, 2, 3, 4, 5])] : Array(9).fill(0); +function assertScope(g) { + if ( + g.map.name !== 'Germany' || + g.players.length !== 3 || + g.options.randomizeMap || + g.map.cities.some((city) => !CITIES.includes(city.name)) || + g.options.chooseRegions || + g.options.chooseColors + ) + throw Error('Baseline supports three-player Germany with automatic setup only'); +} +function observe(g, seat) { + assertScope(g); + const order = [seat, (seat + 1) % 3, (seat + 2) % 3]; + const s = [ + ...onehot(g.phase, PHASES), + g.round / 20, + g.step / 3, + +(g.options.variant === 'recharged'), + +g.options.fastBid, + g.cardsLeft / 50, + +g.nextCardWeak, + (g.options.fastBid ? 0 : g.currentBid || 0) / 100, + (g.minimunBid || 0) / 100, + ...onehot(g.auctioningPlayer, order), + g.citiesToEndGame / 25, + g.citiesToStep2 / 20, + ]; + for (const r of RES) + s.push( + (g[r + 'Market'] || 0) / 24, + (g[r + 'Supply'] || 0) / 24, + ...(g[r + 'Prices'] || []).slice(0, 24).map((x) => x / 20), + ...Array(Math.max(0, 24 - (g[r + 'Prices'] || []).length)).fill(0) + ); + for (const i of order) { + const p = g.players[i]; + s.push( + p.money / 500, + p.cities.length / 22, + p.housesLeft / 22, + p.citiesPowered / 22, + g.playerOrder.indexOf(i) / 2, + +p.skipAuction, + +p.passed, + (g.options.fastBid ? 0 : p.bid || 0) / 100 + ); + for (const r of RES) s.push((p[r + 'Left'] || 0) / 24, (p[r + 'Capacity'] || 0) / 24); + s.push(p.hybridCapacity / 24); + for (let j = 0; j < 4; j++) s.push(...plant(p.powerPlants[j])); + } + for (let i = 0; i < 4; i++) s.push(...plant(g.actualMarket[i]), ...plant(g.futureMarket[i])); + s.push(...plant(g.chosenPowerPlant)); + for (const city of CITIES) + s.push( + +g.map.cities.some((c) => c.name === city), + ...order.map((i) => +g.players[i].cities.some((c) => c.name === city)) + ); + if (!s.every(Number.isFinite)) throw Error('Non-finite observation'); + return s; +} +function allLegal(g, seat) { + return Object.entries(g.players[seat].availableMoves || {}).flatMap(([name, items]) => + (items || []).map((data) => ({ name, data })) + ); +} +function candidates(g, seat) { + const all = allLegal(g, seat), + bids = all.filter((a) => a.name === 'Bid'); + if (bids.length <= 48) return all; + const min = bids[0].data, + max = bids.at(-1).data; + return all.filter((a) => a.name !== 'Bid' || a.data < min + 8 || a.data % 10 === 0 || a.data === max); +} + +function actionFeatures(g, seat, a) { + const d = a.data, + p = g.players[seat]; + const pp = + a.name === 'ChoosePowerPlant' + ? g.actualMarket.find((x) => x.number === d) + : a.name === 'DiscardPowerPlant' + ? p.powerPlants.find((x) => x.number === d) + : a.name === 'UsePowerPlant' + ? p.powerPlants.find((x) => x.number === d.powerPlant) + : g.chosenPowerPlant; + const cost = a.name === 'Bid' ? d : d?.price || 0; + return [ + ...onehot(a.name, TYPES), + cost / 500, + cost / Math.max(p.money, 1), + ...onehot(d?.resource || (typeof d === 'string' ? d : ''), RES), + ...plant(pp), + ...onehot(d?.name, CITIES), + (d?.citiesPowered || 0) / 20, + ...RES.map((r) => (d?.resourcesSpent || []).filter((x) => x === r).length / 4), + ]; +} +function fuelDemand(g, p) { + const target = Math.min(Math.max(p.cities.length, Math.min(3, capacity(p))), capacity(p)); + let powered = 0; + const need = Object.fromEntries(RES.map((r) => [r, 0])); + const ps = [...p.powerPlants].sort((a, b) => fuelCost(g, a) / a.citiesPowered - fuelCost(g, b) / b.citiesPowered); + for (const pp of ps) { + if (powered >= target) break; + powered += pp.citiesPowered; + let resource = RES[pp.type]; + if (pp.type === 4) resource = (g.coalPrices[0] || 8) <= (g.oilPrices[0] || 8) ? 'coal' : 'oil'; + if (resource) need[resource] += pp.cost; + } + return need; +} +function fuelCost(g, pp) { + return ( + pp.cost * + (pp.type === 4 ? Math.min(g.coalPrices[0] || 8, g.oilPrices[0] || 8) : g[RES[pp.type] + 'Prices']?.[0] || 0) + ); +} +const capacity = (p) => p.powerPlants.reduce((n, x) => n + x.citiesPowered, 0); +function plantWorth(g, p, pp) { + let old = 0; + if (p.powerPlants.length >= 3) old = Math.min(...p.powerPlants.map((x) => x.citiesPowered)); + const gain = Math.max(0, pp.citiesPowered - old); + const reserve = Math.max(12, Math.min(40, p.cities.length * 2 + 10)); + const useful = gain > 0 || fuelCost(g, pp) < 3; + return useful ? Math.min(p.money - reserve, pp.number + gain * 5 - fuelCost(g, pp)) : 0; +} +function heuristicScore(g, seat, a) { + const p = g.players[seat], + d = a.data, + cap = capacity(p); + switch (a.name) { + case 'ChoosePowerPlant': { + const pp = g.actualMarket.find((x) => x.number === d); + const worth = plantWorth(g, p, pp); + return worth >= d ? 20 + pp.citiesPowered * 5 - fuelCost(g, pp) - d * 0.2 : -100 - d; + } + case 'Bid': { + const worth = Math.max(g.round === 1 ? g.minimunBid : 0, plantWorth(g, p, g.chosenPowerPlant)); + if (d > worth) return -100 - d; + return g.options.fastBid ? 20 - Math.abs(worth - d) : 30 - d * 0.1; + } + case 'DiscardPowerPlant': { + const pp = p.powerPlants.find((x) => x.number === d); + return 10 - pp.citiesPowered * 5 + fuelCost(g, pp); + } + case 'DiscardResources': + return 10 + (p[d + 'Left'] || 0); + case 'BuyResource': { + const need = fuelDemand(g, p); + return p[d.resource + 'Left'] < need[d.resource] && + p.money - d.price >= Math.max(0, p.cities.length ? 0 : 12) + ? 20 - d.price + : -100; + } + case 'Build': { + const desired = + p.money > 150 || g.round > 18 + ? g.citiesToEndGame + : Math.min(g.citiesToEndGame, cap + (p.money > 100 ? 1 : 0)); + return p.cities.length < desired ? 30 - d.price * 0.5 : -100; + } + case 'UsePowerPlant': + return ( + 40 + + (d.citiesPowered || 0) * 5 - + (d.resourcesSpent || []).reduce((n, r) => n + (g[r + 'Prices']?.[0] || 8), 0) + ); + case 'Pass': + return 0; + default: + return 1; + } +} +function heuristic(g, seat, rng = () => 0.5) { + const a = candidates(g, seat); + let best = 0, + v = -Infinity; + a.forEach((x, i) => { + const score = heuristicScore(g, seat, x) + rng() * 0.01; + if (score > v) { + v = score; + best = i; + } + }); + return { index: best, action: a[best] }; +} +function outcome(g) { + const sorted = E.playersSortedByScore(g), + top = sorted[0], + w = g.players.map( + (p) => + +( + p.citiesPowered === top.citiesPowered && + p.money === top.money && + p.cities.length === top.cities.length + ) + ); + return w.map((x) => x / w.reduce((a, b) => a + b, 0)); +} +function start(seed, variant = 'original', fastBid = false) { + return E.setup(3, { map: 'Germany', variant, fastBid, showMoney: true }, seed); +} +module.exports = { + E, + CITIES, + TYPES, + RES, + observe, + allLegal, + candidates, + actionFeatures, + heuristic, + heuristicScore, + outcome, + start, + seedrandom, +}; diff --git a/ai/data-audit.json b/ai/data-audit.json new file mode 100644 index 0000000..cb8443e --- /dev/null +++ b/ai/data-audit.json @@ -0,0 +1,4332 @@ +{ + "counts": [ + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "original", + "players": 4 + }, + "n": 10 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 6 + }, + "n": 16 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "China", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "original", + "players": 2 + }, + "n": 34 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "original", + "players": 6 + }, + "n": 8 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 5 + }, + "n": 4 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 6 + }, + "n": 14 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 5 + }, + "n": 5 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 3 + }, + "n": 10 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 6 + }, + "n": 10 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 3 + }, + "n": 5 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Europe", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 4 + }, + "n": 49 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 2 + }, + "n": 74 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "China", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "original", + "players": 6 + }, + "n": 3 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "original", + "players": 6 + }, + "n": 4 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 6 + }, + "n": 20 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 3 + }, + "n": 3 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "South Africa", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Europe", + "variant": "recharged", + "players": 2 + }, + "n": 4 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "Bremen", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 12, + "status": "ended", + "map": "France", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Bremen", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "India", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "China", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "original", + "players": 6 + }, + "n": 8 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "original", + "players": 5 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "original", + "players": 3 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "original", + "players": 6 + }, + "n": 6 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 4 + }, + "n": 3 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 4 + }, + "n": 3 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "China", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Benelux", + "variant": "original", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Central Europe", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 4 + }, + "n": 102 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "original", + "players": 3 + }, + "n": 7 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 6 + }, + "n": 22 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "India", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Korea", + "variant": "original", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Bremen", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Bremen", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 3 + }, + "n": 67 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "China", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "original", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 4 + }, + "n": 4 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Europe", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Bremen", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 5 + }, + "n": 27 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 6 + }, + "n": 17 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 2 + }, + "n": 168 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Middle East", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "original", + "players": 4 + }, + "n": 15 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "original", + "players": 5 + }, + "n": 5 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 3 + }, + "n": 29 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "original", + "players": 6 + }, + "n": 11 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 4 + }, + "n": 66 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "South Africa", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Korea", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 5 + }, + "n": 11 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Manhattan", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 4 + }, + "n": 6 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "original", + "players": 3 + }, + "n": 9 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "recharged", + "players": 5 + }, + "n": 19 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 6 + }, + "n": 7 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "UK & Ireland", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Europe", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 6 + }, + "n": 6 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 2 + }, + "n": 5 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 3 + }, + "n": 15 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 4 + }, + "n": 29 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 5 + }, + "n": 33 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "original", + "players": 5 + }, + "n": 10 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 3 + }, + "n": 3 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 4 + }, + "n": 3 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 4 + }, + "n": 8 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Japan", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 3 + }, + "n": 12 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Bremen", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 9, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Australia", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 2 + }, + "n": 29 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 5 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 4 + }, + "n": 64 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "UK & Ireland", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 1, + "status": "ended", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 2 + }, + "n": 65 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Central Europe", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 5 + }, + "n": 46 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Russia", + "variant": "original", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 4 + }, + "n": 11 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "original", + "players": 5 + }, + "n": 8 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 6 + }, + "n": 4 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Australia", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Manhattan", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "original", + "players": 6 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Korea", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 9, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Italy", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "recharged", + "players": 3 + }, + "n": 11 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Korea", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 3 + }, + "n": 7 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 3 + }, + "n": 8 + }, + { + "_id": { + "version": 1, + "status": "ended", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 5 + }, + "n": 8 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 5 + }, + "n": 59 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 6 + }, + "n": 17 + }, + { + "_id": { + "version": 9, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "UK & Ireland", + "variant": "original", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 2 + }, + "n": 9 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Brazil", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Spain & Portugal", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "China", + "variant": "original", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 4 + }, + "n": 60 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 2 + }, + "n": 14 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 2 + }, + "n": 10 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Northern Europe", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 3 + }, + "n": 13 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 2 + }, + "n": 8 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "France", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 5 + }, + "n": 44 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "original", + "players": 5 + }, + "n": 12 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "original", + "players": 2 + }, + "n": 33 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "South Africa", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 6 + }, + "n": 12 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Australia", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 4 + }, + "n": 3 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "France", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "Northern Europe", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Japan", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 6 + }, + "n": 2 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "South Africa", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Germany", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "original", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 2 + }, + "n": 114 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "recharged", + "players": 5 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "original", + "players": 5 + }, + "n": 5 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 2 + }, + "n": 5 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Australia", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 2 + }, + "n": 25 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Russia", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 3 + }, + "n": 9 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "original", + "players": 3 + }, + "n": 4 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 4 + }, + "n": 4 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 4 + }, + "n": 61 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Australia", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 9, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 9, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 5 + }, + "n": 49 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Benelux", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "India", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "original", + "players": 4 + }, + "n": 10 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 3 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 4 + }, + "n": 49 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "original", + "players": 6 + }, + "n": 5 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "original", + "players": 3 + }, + "n": 6 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Australia", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 4 + }, + "n": 28 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 2 + }, + "n": 9 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 9, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 2 + }, + "n": 19 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "original", + "players": 4 + }, + "n": 23 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Europe", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "China", + "variant": "original", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Europe", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Korea", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 2 + }, + "n": 10 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 2 + }, + "n": 24 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Central Europe", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Middle East", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "original", + "players": 4 + }, + "n": 9 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 4 + }, + "n": 4 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "original", + "players": 2 + }, + "n": 50 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Europe", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 1, + "status": "ended", + "players": 4 + }, + "n": 10 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 4 + }, + "n": 14 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "UK & Ireland", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 2 + }, + "n": 4 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 3 + }, + "n": 26 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 2 + }, + "n": 15 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Bremen", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 2 + }, + "n": 20 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 4 + }, + "n": 98 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Middle East", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 4 + }, + "n": 44 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "South Africa", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 9, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "India", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Japan", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Bremen", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 12, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Northern Europe", + "variant": "original", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 2 + }, + "n": 4 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "original", + "players": 6 + }, + "n": 4 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 6 + }, + "n": 25 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "France", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "Brazil", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Japan", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "original", + "players": 5 + }, + "n": 15 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 5 + }, + "n": 3 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 3 + }, + "n": 8 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Australia", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "original", + "players": 5 + }, + "n": 3 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 5 + }, + "n": 5 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "original", + "players": 2 + }, + "n": 60 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 3 + }, + "n": 25 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 4 + }, + "n": 40 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "original", + "players": 4 + }, + "n": 7 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "original", + "players": 4 + }, + "n": 7 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 6 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 5 + }, + "n": 46 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "North America", + "variant": "original", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 5 + }, + "n": 13 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 2 + }, + "n": 17 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 3 + }, + "n": 8 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "recharged", + "players": 2 + }, + "n": 9 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 6 + }, + "n": 16 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Europe", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "original", + "players": 2 + }, + "n": 54 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "India", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "original", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 2 + }, + "n": 21 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "Europe", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Europe", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "original", + "players": 6 + }, + "n": 2 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Korea", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 6 + }, + "n": 19 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "original", + "players": 3 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "original", + "players": 2 + }, + "n": 46 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Australia", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 5 + }, + "n": 19 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 4 + }, + "n": 14 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Quebec", + "variant": "original", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "China", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "original", + "players": 3 + }, + "n": 5 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Northern Europe", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "recharged", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "France", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 5 + }, + "n": 44 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "South Africa", + "variant": "original", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "recharged", + "players": 5 + }, + "n": 5 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "Germany", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 5 + }, + "n": 71 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Quebec", + "variant": "recharged", + "players": 3 + }, + "n": 9 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "India", + "variant": "original", + "players": 2 + }, + "n": 49 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "recharged", + "players": 4 + }, + "n": 27 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "original", + "players": 4 + }, + "n": 7 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 5 + }, + "n": 39 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "South Africa", + "variant": "original", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 4 + }, + "n": 7 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Spain & Portugal", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Spain & Portugal", + "variant": "original", + "players": 2 + }, + "n": 50 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "original", + "players": 2 + }, + "n": 51 + }, + { + "_id": { + "version": 1, + "status": "ended", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 5, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 6 + }, + "n": 10 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Japan", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 3 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "France", + "variant": "original", + "players": 2 + }, + "n": 49 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "original", + "players": 5 + }, + "n": 6 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Central Europe", + "variant": "recharged", + "players": 5 + }, + "n": 46 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Australia", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Russia", + "variant": "recharged", + "players": 3 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 2 + }, + "n": 14 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 7, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Bremen", + "variant": "recharged", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 10, + "status": "ended", + "map": "Korea", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Benelux", + "variant": "original", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "original", + "players": 4 + }, + "n": 87 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 2 + }, + "n": 3 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Manhattan", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Bremen", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Middle East", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Baden-Württemberg", + "variant": "recharged", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 2, + "status": "ended", + "map": "USA", + "variant": "original", + "players": 6 + }, + "n": 3 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "France", + "variant": "recharged", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "China", + "variant": "recharged", + "players": 6 + }, + "n": 10 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 4 + }, + "n": 2 + }, + { + "_id": { + "version": 11, + "status": "active", + "map": "Germany", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "USA", + "variant": "recharged", + "players": 5 + }, + "n": 3 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Russia", + "variant": "recharged", + "players": 4 + }, + "n": 1 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "North America", + "variant": "recharged", + "players": 5 + }, + "n": 2 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "recharged", + "players": 5 + }, + "n": 37 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "UK & Ireland", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 11, + "status": "ended", + "map": "Northern Europe", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 13, + "status": "ended", + "map": "Japan", + "variant": "recharged", + "players": 5 + }, + "n": 1 + }, + { + "_id": { + "version": 6, + "status": "ended", + "map": "Brazil", + "variant": "recharged", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 13, + "status": "active", + "map": "Benelux", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Middle East", + "variant": "original", + "players": 3 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 5 + }, + "n": 69 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "South Africa", + "variant": "recharged", + "players": 5 + }, + "n": 3 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Germany", + "variant": "recharged", + "players": 4 + }, + "n": 121 + }, + { + "_id": { + "version": 4, + "status": "ended", + "map": "Benelux", + "variant": "recharged", + "players": 6 + }, + "n": 1 + }, + { + "_id": { + "version": 3, + "status": "ended", + "map": "Italy", + "variant": "original", + "players": 4 + }, + "n": 12 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Australia", + "variant": "original", + "players": 2 + }, + "n": 1 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Northern Europe", + "variant": "original", + "players": 2 + }, + "n": 2 + }, + { + "_id": { + "version": 8, + "status": "ended", + "map": "Brazil", + "variant": "original", + "players": 5 + }, + "n": 1 + } + ], + "sample": { + "dataType": "object", + "dataKeys": [ + "map", + "players", + "playerOrder", + "currentPlayers", + "powerPlantsDeck", + "coalSupply", + "oilSupply", + "garbageSupply", + "uraniumSupply", + "coalResupply", + "oilResupply", + "garbageResupply", + "uraniumResupply", + "coalMarket", + "oilMarket", + "garbageMarket", + "uraniumMarket", + "coalPrices", + "oilPrices", + "garbagePrices", + "uraniumPrices", + "actualMarket", + "futureMarket", + "highestBidders", + "step", + "phase", + "options", + "log", + "hiddenLog", + "seed", + "round", + "newTurn", + "auctionSkips", + "citiesToStep2", + "citiesToEndGame", + "resourceResupply", + "paymentTable", + "variant", + "minimunBid", + "plantDiscountActive", + "discardSmallestPlant", + "cardsLeft", + "nextCardWeak", + "card39Bought", + "knownPowerPlantDeck", + "knownPowerPlantDeckStep3", + "automation", + "auctioningPlayer", + "pendingMarketRefill", + "chosenResource" + ], + "game": { + "name": "powergrid", + "version": 13, + "expansions": [], + "options": { + "map": "China", + "variant": "original" + } + }, + "playerFields": [ + "_id", + "remainingTime", + "dropped", + "score", + "name", + "quit", + "faction", + "ranking", + "elo" + ], + "hasSeed": true + } +} diff --git a/ai/evaluate.py b/ai/evaluate.py new file mode 100644 index 0000000..ab4a388 --- /dev/null +++ b/ai/evaluate.py @@ -0,0 +1,73 @@ +import argparse, json, time, platform +from pathlib import Path +import numpy as np +from infer import Model, Node + +p = argparse.ArgumentParser() +p.add_argument("model") +p.add_argument("--seeds", type=int, default=10) +p.add_argument("--opponent", default="heuristic", choices=["heuristic", "legacy"]) +p.add_argument("--output", default="evaluation.json") +args = p.parse_args() +net = None if args.model == "heuristic" else Model(args.model) +node = Node("arena.cjs") +results = [] +latency = [] +start = time.perf_counter() +try: + for variant in ["original", "recharged"]: + for sealed in [False, True]: + for seed in range(args.seeds): + for seat in range(3): + config = { + "op": "reset", + "seed": "heldout-arena-v1-" + str(seed), + "variant": variant, + "sealed": sealed, + "seat": seat, + "opponent": args.opponent, + } + o = node.call(config) + while not o["done"]: + t = time.perf_counter() + action = ( + net.predict(o["state"], o["actions"])[0] + if net + else o["heuristic"] + ) + latency.append((time.perf_counter() - t) * 1000) + o = node.call({"op": "step", "action": action}) + results.append({**config, **o}) + group = [ + r for r in results if r["variant"] == variant and r["sealed"] == sealed + ] + print( + json.dumps( + { + "variant": variant, + "sealed": sealed, + "games": len(group), + "win_rate": np.mean([r["win"] for r in group]), + "truncated": sum(r["truncated"] for r in group), + } + ), + flush=True, + ) +finally: + node.close() +report = { + "model": args.model, + "opponent": args.opponent, + "platform": platform.platform(), + "games": len(results), + "win_rate": np.mean([r["win"] for r in results]), + "truncated": sum(r["truncated"] for r in results), + "seconds": time.perf_counter() - start, + "inference_ms": { + k: float(np.percentile(latency, v)) + for k, v in [("p50", 50), ("p95", 95), ("p99", 99)] + }, + "results": results, +} +Path(args.output).write_text(json.dumps(report, indent=2)) +print(json.dumps({k: v for k, v in report.items() if k != "results"})) diff --git a/ai/export-remote.cjs b/ai/export-remote.cjs new file mode 100644 index 0000000..c8455e9 --- /dev/null +++ b/ai/export-remote.cjs @@ -0,0 +1,63 @@ +const fs = require('node:fs'), + { parseEnv } = require('node:util'), + { createRequire } = require('node:module'), + { createHash } = require('node:crypto'); +const { MongoClient } = createRequire('/home/bgs/boardgamers-mono/apps/api/package.json')('mongodb'); +(async () => { + const env = parseEnv(fs.readFileSync('/home/bgs/boardgamers-mono/apps/api/.env', 'utf8')); + const c = await MongoClient.connect(env.dbUrl); + try { + for await (const g of c + .db(env.dbName || 'bgs') + .collection('games') + .find( + { + 'game.name': 'powergrid', + status: 'ended', + 'game.options.map': 'Germany', + 'options.setup.nbPlayers': 3, + 'options.meta.unlisted': { $ne: true }, + }, + { projection: { _id: 1, game: 1, options: 1, data: 1, players: 1 } } + ) + .maxTimeMS(20000)) { + const d = g.data; + if (!d || typeof d !== 'object') continue; + const cleanPlayer = (p) => ({ + money: p.money, + citiesPowered: p.citiesPowered, + cities: p.cities?.map((c) => c.name).sort(), + powerPlants: p.powerPlants?.map((p) => p.number).sort((a, b) => a - b), + }); + console.log( + JSON.stringify({ + id: createHash('sha256') + .update('powergrid-ai-v1:' + g._id) + .digest('hex') + .slice(0, 20), + version: g.game.version, + options: d.options || g.game.options, + seed: d.seed || g.options.setup.seed, + players: g.players.map((p) => ({ + bot: !!p.isBot, + dropped: !!p.dropped, + quit: !!p.quit, + rating: p.elo?.initial, + ranking: p.ranking, + })), + moves: (d.log || []) + .filter((x) => x.type === 'move') + .map((x) => ({ player: x.player, move: x.move })), + final: d.players.map(cleanPlayer), + phase: d.phase, + round: d.round, + }) + ); + } + } finally { + await c.close(); + } +})().catch((e) => { + console.error(e.name, e.code); + process.exit(1); +}); diff --git a/ai/features.cjs b/ai/features.cjs new file mode 100644 index 0000000..45715e5 --- /dev/null +++ b/ai/features.cjs @@ -0,0 +1,25 @@ +const c = require('./core.cjs'), + readline = require('node:readline'); +(async () => { + for await (const line of readline.createInterface({ input: process.stdin })) { + try { + const q = JSON.parse(line), + g = q.state, + p = q.player; + if (!Number.isInteger(p) || !g.currentPlayers.includes(p)) + throw Error('Player cannot act in this position'); + const moves = c.candidates(g, p); + if (!moves.length) throw Error('No legal actions'); + console.log( + JSON.stringify({ + state: c.observe(g, p), + actions: moves.map((a) => c.actionFeatures(g, p, a)), + moves, + playerOrder: [p, (p + 1) % 3, (p + 2) % 3], + }) + ); + } catch (e) { + console.log(JSON.stringify({ error: e.message })); + } + } +})(); diff --git a/ai/generate.cjs b/ai/generate.cjs new file mode 100644 index 0000000..b77715a --- /dev/null +++ b/ai/generate.cjs @@ -0,0 +1,72 @@ +const fs = require('node:fs'), + c = require('./core.cjs'); +const count = Number(process.env.GAMES || 600), + rng = c.seedrandom('dataset-v1'), + out = fs.openSync(process.argv[2] || 'dataset.jsonl', 'w'); +let samples = 0, + completed = 0, + truncated = 0; +function writeEpisode(rows, g, id) { + const result = c.outcome(g); + for (const row of rows) { + row.value = [row.seat, (row.seat + 1) % 3, (row.seat + 2) % 3].map((i) => result[i]); + row.game = id; + fs.writeSync(out, JSON.stringify(row) + '\n'); + samples++; + } +} +for (let i = 0; i < count; i++) { + let g = c.start('train-v1-' + i, i % 2 ? 'recharged' : 'original', i % 4 < 2), + rows = [], + n = 0; + while (!c.E.ended(g) && n++ < 1600) { + const seat = g.currentPlayers[0], + a = c.candidates(g, seat), + h = c.heuristic(g, seat, rng); + if (a.length > 1 && rng() < 0.4) + rows.push({ + state: c.observe(g, seat), + actions: a.map((x) => c.actionFeatures(g, seat, x)), + target: h.index, + seat, + weight: 1, + }); + let index = rng() < 0.015 ? Math.floor(rng() * a.length) : h.index; + g = c.E.move(g, a[index], seat); + } + if (c.E.ended(g)) { + writeEpisode(rows, g, 'synthetic-' + i); + completed++; + } else truncated++; + if (i % 100 === 99) console.error(JSON.stringify({ games: i + 1, samples, completed, truncated })); +} +const path = 'ai/private-data/verified-games.jsonl'; +if (fs.existsSync(path)) + for (const line of fs.readFileSync(path, 'utf8').split('\n').filter(Boolean)) { + const h = JSON.parse(line); + if (h.options.chooseColors || h.options.chooseRegions || h.options.randomizeMap) { + console.error(JSON.stringify({ skippedHumanGame: h.id, reason: 'unsupported setup' })); + continue; + } + let g = c.E.setup(3, h.options, h.seed), + rows = []; + for (const m of h.moves) { + const seat = m.player, + a = c.candidates(g, seat), + target = a.findIndex( + (x) => JSON.stringify(x.data) === JSON.stringify(m.move.data) && x.name === m.move.name + ); + if (target >= 0 && a.length > 1) + rows.push({ + state: c.observe(g, seat), + actions: a.map((x) => c.actionFeatures(g, seat, x)), + target, + seat, + weight: 1.5, + }); + g = c.E.move(g, m.move, seat); + } + writeEpisode(rows, g, 'human-' + h.id); + } +fs.closeSync(out); +console.error(JSON.stringify({ completed, truncated, samples })); diff --git a/ai/infer.py b/ai/infer.py new file mode 100644 index 0000000..d9f8f42 --- /dev/null +++ b/ai/infer.py @@ -0,0 +1,95 @@ +import json, sys, subprocess, argparse, time, hashlib +from pathlib import Path +import numpy as np +import onnxruntime as ort + +ROOT = Path(__file__).resolve().parents[1] + + +class Model: + def __init__(self, path, threads=1): + self.sha256 = hashlib.sha256(Path(path).read_bytes()).hexdigest() + options = ort.SessionOptions() + options.intra_op_num_threads = threads + options.inter_op_num_threads = 1 + self.session = ort.InferenceSession( + str(path), sess_options=options, providers=["CPUExecutionProvider"] + ) + + def predict(self, state, actions): + a = np.asarray(actions, dtype=np.float32)[None] + s = np.asarray(state, dtype=np.float32)[None] + mask = np.ones(a.shape[:2], dtype=bool) + scores, values = self.session.run( + None, {"state": s, "actions": a, "mask": mask} + ) + return int(scores[0].argmax()), values[0].tolist() + + +class Node: + def __init__(self, script): + self.proc = subprocess.Popen( + ["node", str(ROOT / "ai" / script)], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + text=True, + bufsize=1, + ) + + def call(self, q): + self.proc.stdin.write(json.dumps(q) + "\n") + self.proc.stdin.flush() + line = self.proc.stdout.readline() + if not line: + raise RuntimeError("Engine worker exited") + return json.loads(line) + + def close(self): + self.proc.terminate() + self.proc.wait(timeout=5) + self.proc.stdin.close() + self.proc.stdout.close() + + +if __name__ == "__main__": + p = argparse.ArgumentParser() + p.add_argument("model") + args = p.parse_args() + model = Model(args.model) + node = Node("features.cjs") + try: + for line in sys.stdin: + q = {} + try: + decoded = json.loads(line) + if not isinstance(decoded, dict): + raise ValueError("Request must be a JSON object") + q = decoded + begin = time.perf_counter() + o = node.call(q) + if "error" in o: + raise ValueError(o["error"]) + index, value = model.predict(o["state"], o["actions"]) + print( + json.dumps( + { + "requestId": q.get("requestId"), + "revision": q.get("revision"), + "move": o["moves"][index], + "winProbabilities": value, + "valueStatus": "uncalibrated-selfplay-estimate", + "playerOrder": o["playerOrder"], + "model": Path(args.model).name, + "modelSha256": model.sha256, + "elapsedMs": (time.perf_counter() - begin) * 1000, + } + ), + flush=True, + ) + except Exception as e: + print( + json.dumps({"requestId": q.get("requestId"), "error": str(e)}), + flush=True, + ) + finally: + node.close() diff --git a/ai/launch-profile.sh b/ai/launch-profile.sh new file mode 100755 index 0000000..aca3b6c --- /dev/null +++ b/ai/launch-profile.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor l4x1 --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=profile-v1 --env GAMES=600 --env BC_EPOCHS=12 \ + --env RL_UPDATES=16 --env ENVS=24 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=profile-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"profile-source.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs +python -u ai/performance.py +' diff --git a/ai/launch-smoke.sh b/ai/launch-smoke.sh new file mode 100755 index 0000000..25caa4d --- /dev/null +++ b/ai/launch-smoke.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor l4x1 --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=optimized-smoke --env GAMES=32 --env BC_EPOCHS=1 \ + --env RL_UPDATES=1 --env ENVS=64 --env WORKERS=4 --env BATCH_SIZE=1024 --env ROLLOUT_SAMPLES=2000 \ + --label project=powergrid-ai --label stage=optimized-smoke \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"source-v2.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs +python -u ai/train.py +' diff --git a/ai/launch-v2.sh b/ai/launch-v2.sh new file mode 100755 index 0000000..c0b8430 --- /dev/null +++ b/ai/launch-v2.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor l4x1 --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=baseline-v2 --env GAMES=600 --env BC_EPOCHS=12 \ + --env RL_UPDATES=16 --env ENVS=64 --env WORKERS=4 --env BATCH_SIZE=1024 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=baseline-v2 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"source-v4.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs +python -u ai/train.py +' diff --git a/ai/launch.sh b/ai/launch.sh new file mode 100755 index 0000000..940763c --- /dev/null +++ b/ai/launch.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor l4x1 --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=baseline-v1 --env GAMES=600 --env BC_EPOCHS=12 \ + --env RL_UPDATES=16 --env ENVS=24 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=baseline-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"source-v1.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs +python -u ai/train.py +' diff --git a/ai/package-results.py b/ai/package-results.py new file mode 100644 index 0000000..4f1e46b --- /dev/null +++ b/ai/package-results.py @@ -0,0 +1,88 @@ +"""Create the user-facing report from completed, measured runs.""" + +import argparse, json, hashlib, html, shutil, tarfile +from pathlib import Path + +p = argparse.ArgumentParser() +p.add_argument("output") +args = p.parse_args() +out = Path(args.output) +out.mkdir(parents=True, exist_ok=True) +root = Path(__file__).resolve().parents[1] +runs = root / "ai/runs" +model = runs / "download/runs/baseline-v2" +summary = json.loads((runs / "v2-summary.json").read_text()) +profile = json.loads((runs / "download/runs/baseline-v1/profile.json").read_text()) +smoke = json.loads((runs / "8840u-serving-v2.json").read_text().split("\n", 1)[1]) +cpu = json.loads((runs / "8840u-evaluation-v2.json").read_text()) +parity = json.loads((runs / "parity-v2.json").read_text()) +bench = json.loads((runs / "8840u-simulation-v2.json").read_text()) +for name in [ + "v2-summary.json", + "8840u-evaluation-v2.json", + "8840u-serving-v2.json", + "8840u-simulation-v2.json", + "parity-v2.json", +]: + shutil.copy2(runs / name, out / name) +shutil.copy2(root / "ai/README.md", out / "README.md") +shutil.copy2(model / "metrics.json", out / "training-metrics.json") +shutil.copy2(model / "schema.json", out / "schema.json") +bundle = runs / "serving-bundle" +for name in [ + "core.cjs", + "arena.cjs", + "features.cjs", + "infer.py", + "evaluate.py", + "benchmark.cjs", + "test.cjs", + "serving-smoke.py", + "requirements-serve.txt", + "README.md", +]: + shutil.copy2(root / "ai" / name, bundle / "ai" / name) +shutil.copy2(model / "selfplay.onnx", bundle / "selfplay.onnx") +shutil.copy2(model / "schema.json", bundle / "schema.json") +with tarfile.open(out / "powergrid-ai-serving-v2.tgz", "w:gz") as tf: + for item in sorted(bundle.rglob("*")): + if item.is_file() and "__pycache__" not in item.parts: + tf.add(item, arcname=str(item.relative_to(bundle))) +manifest = { + "engine_revision": "365fc519903fa2b4e8c593eed6cc5f5f77b5332a", + "source_dataset_commit": "65ecfa063c272bd72a805d45f4ba55dc84a28f42", + "source_archive": "source-v4.tgz", + "source_sha256": hashlib.sha256((runs / "source-v4.tgz").read_bytes()).hexdigest(), + "job": "https://huggingface.co/jobs/coyotte508/6abd0cba404719ba3761324e", + "schema": 2, + "model_sha256": hashlib.sha256((model / "selfplay.onnx").read_bytes()).hexdigest(), + "deployment": "Research worker only; production bot unchanged", + "files": { + f.name: hashlib.sha256(f.read_bytes()).hexdigest() + for f in out.iterdir() + if f.is_file() and f.name not in ["report.html", "manifest.json"] + }, +} +(out / "manifest.json").write_text(json.dumps(manifest, indent=2)) +rows = "".join( + f"{html.escape(Path(r['model']).stem)}{html.escape(r['opponent'])}{r['win_rate']:.1%}{(format(r['seed_cluster_bootstrap_95pct'][0], '.1%') + '–' + format(r['seed_cluster_bootstrap_95pct'][1], '.1%')) if r['seed_cluster_bootstrap_95pct'] else 'Not estimated (identical outcomes)'}{r['truncated']}" + for r in summary +) +rollouts = profile["rollouts"] +speed = rollouts[2]["decisions_per_second"] / rollouts[0]["decisions_per_second"] +train_speed = ( + profile["training"][1]["samples_per_second"] + / profile["training"][0]["samples_per_second"] +) +report = f'''Powergrid AI baseline

Powergrid AI: executable baseline

30 September 2026 · Germany · 3 players · original / Recharged · open / sealed auctions

CPU deployment is feasible. Playing strength is not ready for production. The existing engine bot remains the baseline to beat. These value estimates are not calibrated for player analysis.

{speed:.1f}×
Rollout throughput improvement in the HF microbenchmark
{train_speed:.1f}×
Optimizer sample throughput with batch 1,024 versus 256
{smoke["warm_end_to_end_ms"]["p95"]:.2f} ms
8840U persistent worker p95, including state encoding and IPC
+

Measured playing strength

Each row is 480 games: 40 unseen seeds × 3 seat rotations × 4 rule combinations. One model faces two bots of the listed type. Ties split win credit. The intervals resample whole seed groups, retaining correlations between seats and rule variants.

{rows}
ModelOpponentsWin share95% seed-bootstrap intervalTruncated

This remains a small baseline experiment. Beating the new heuristic does not establish human-level play; performance against the existing bot is the relevant deployment gate.

+

What was built and checked

  • Reproducible JavaScript simulator, heuristic, masked candidate-scoring policy, whole-game imitation split, multi-player self-play, ONNX export and CPU worker.
  • All 4,007 game records counted. 66 candidate Germany replays inspected; 33 match the current engine exactly. Corrected training uses 32 supported historical games, with one color-draft game excluded.
  • Schema v2 covers both Germany city lists (44 cities), including the Recharged replacements Mainz and Stralsund. Bids remain sealed in model observations; other players’ money is intentionally visible.
  • {smoke["requests"]} end-to-end worker requests returned legal actions; {cpu["games"]} CPU arena games completed on the 8840U. Pure model inference p95: {cpu["inference_ms"]["p95"]:.3f} ms. Cold first request: {smoke["first_request_including_startup_ms"]:.0f} ms.
  • PyTorch / ONNX maximum absolute error: {max(x["max_abs_error"] for x in parity.values()):.2g}; all checked action choices agree.
  • minipc-wg now reaches the verified 8840U at WireGuard address 10.90.0.3.
+

Why resource utilization was low

The initial configuration used one Node worker, 24 environments and optimizer batches of 256. This compact model alternates simulation and optimization, so GPU work arrives in bursts. Four workers and 256 environments reached {rollouts[2]["decisions_per_second"]:,.0f} decisions/s versus {rollouts[0]["decisions_per_second"]:,.0f}; eight workers offered no gain. Python feature packing and JSON communication still take substantial time.

These are component microbenchmarks, not an end-to-end speedup guarantee. Larger optimizer batches also reduce gradient updates per epoch. The replacement training run uses four workers, 64 environments and batch 1,024; 256 environments are more suitable when collecting substantially larger completed-episode batches.

+

Recommendation

Keep the JS engine authoritative and train on HF Jobs. Run persistent ONNX workers on the 8840U; this model needs neither its GPU nor NPU. Before production, train against the existing bot and a mixture of frozen opponents, use more completed games, and gate releases on held-out arena results. Expand maps/player counts with a new variable-size representation and retraining.

For round-by-round analysis, train and calibrate that target separately. The current three-way value output estimates outcomes under its training opponents; it is not an objective score evaluation.

+

Artifacts

Serving bundle · Setup and worker contract · Evaluation details · Throughput profile · Hashes and provenance · HF training job

One JSONL request chooses one atomic move. The platform must check the game revision, validate the move and commit it through its normal server path. No production routing was changed.

''' +(out / "report.html").write_text(report) +print( + json.dumps( + {"report": str(out / "report.html"), "model_sha256": manifest["model_sha256"]} + ) +) diff --git a/ai/performance.py b/ai/performance.py new file mode 100644 index 0000000..e06624a --- /dev/null +++ b/ai/performance.py @@ -0,0 +1,125 @@ +"""Run on HF Jobs: profile real engine rollouts, GPU batches and ONNX parity.""" + +import concurrent.futures, json, os, subprocess, time +from pathlib import Path +import numpy as np +import torch +import onnxruntime as ort +from huggingface_hub import hf_hub_download, HfApi +import train + +repo = "coyotte508/powergrid-ai-germany-v1" +ck = torch.load( + hf_hub_download(repo, "runs/baseline-v1/imitation.pt"), + map_location="cpu", + weights_only=True, +) +train.AD = ck["action_dim"] +net = train.Policy(ck["state_dim"], train.AD).cuda().eval() +net.load_state_dict(ck["state_dict"]) + + +class Worker: + def __init__(self, i): + self.p = subprocess.Popen( + ["node", "ai/bridge.cjs"], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + text=True, + env={**os.environ, "SEED": f"profile-{i}"}, + ) + + def call(self, q): + self.p.stdin.write(json.dumps(q) + "\n") + self.p.stdin.flush() + return json.loads(self.p.stdout.readline()) + + +results = [] +sample = None +for workers, envs in [(1, 24), (1, 256), (4, 256), (8, 256)]: + pool = concurrent.futures.ThreadPoolExecutor(workers) + ws = [Worker(i) for i in range(workers)] + n = envs // workers + current = list(pool.map(lambda w: w.call({"op": "reset", "n": n}), ws)) + timing = {"packing_gpu": 0.0, "engine_ipc": 0.0} + started = time.perf_counter() + decisions = 0 + for step in range(120): + rows = [r for x in current for r in x["observations"]] + t = time.perf_counter() + with torch.no_grad(): + logits, _ = net(*train.tensors(rows)) + choices = ( + torch.distributions.Categorical(logits=logits).sample().cpu().tolist() + ) + timing["packing_gpu"] += time.perf_counter() - t + t = time.perf_counter() + current = list( + pool.map( + lambda pair: pair[1].call( + {"op": "step", "actions": choices[pair[0] * n : (pair[0] + 1) * n]} + ), + enumerate(ws), + ) + ) + timing["engine_ipc"] += time.perf_counter() - t + decisions += len(rows) + seconds = time.perf_counter() - started + entry = { + "workers": workers, + "envs": envs, + "decisions_per_second": decisions / seconds, + "seconds": seconds, + **timing, + } + results.append(entry) + print(json.dumps(entry), flush=True) + sample = rows + for w in ws: + w.p.terminate() + w.p.wait() + pool.shutdown() +# Compare GPU optimization throughput including normal data packing. +optimizer = torch.optim.Adam(net.parameters(), lr=3e-4) +training = [] +for size in [256, 1024]: + rows = (sample * ((size + len(sample) - 1) // len(sample)))[:size] + torch.cuda.synchronize() + t = time.perf_counter() + for _ in range(30): + logits, v = net(*train.tensors(rows)) + loss = -logits.log_softmax(-1)[:, 0].mean() + v.square().mean() + optimizer.zero_grad() + loss.backward() + optimizer.step() + torch.cuda.synchronize() + seconds = time.perf_counter() - t + training.append({"batch": size, "samples_per_second": 30 * size / seconds}) +# Validate original checkpoint export with real observations and varying masks. +net.load_state_dict(ck["state_dict"]) +net.eval() +session = ort.InferenceSession( + hf_hub_download(repo, "runs/baseline-v1/imitation.onnx"), + providers=["CPUExecutionProvider"], +) +errors = [] +for n in [1, 7, 24]: + x = train.tensors(sample[:n]) + feed = dict(zip(["state", "actions", "mask"], [a.cpu().numpy() for a in x])) + actual = session.run(None, feed) + with torch.no_grad(): + expected = [a.cpu().numpy() for a in net(*x)] + errors.append(max(float(np.max(np.abs(a - b))) for a, b in zip(actual, expected))) +assert max(errors) < 1e-4, errors +out = Path("profile.json") +out.write_text( + json.dumps( + {"rollouts": results, "training": training, "onnx_max_abs_error": max(errors)}, + indent=2, + ) +) +print(out.read_text(), flush=True) +HfApi().upload_file( + repo_id=repo, path_or_fileobj=str(out), path_in_repo="runs/baseline-v1/profile.json" +) diff --git a/ai/pool.py b/ai/pool.py new file mode 100644 index 0000000..57625f4 --- /dev/null +++ b/ai/pool.py @@ -0,0 +1,67 @@ +"""Concurrent isolated JS engines with one batched GPU policy call per step.""" + +import json +import os +import subprocess +from concurrent.futures import ThreadPoolExecutor + + +class EnginePool: + def __init__(self, workers=1, seed="rollout-v1"): + self.executor = ThreadPoolExecutor(workers) + self.processes = [ + subprocess.Popen( + ["node", "ai/bridge.cjs"], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + text=True, + bufsize=1, + env={**os.environ, "SEED": f"{seed}-worker-{i}"}, + ) + for i in range(workers) + ] + self.sizes = [] + + @staticmethod + def _call(pair): + process, request = pair + process.stdin.write(json.dumps(request) + "\n") + process.stdin.flush() + line = process.stdout.readline() + if not line: + raise RuntimeError("Engine worker exited") + return json.loads(line) + + def call(self, request): + workers = len(self.processes) + if request["op"] == "reset": + n = request["n"] + if n < workers: + raise ValueError("Need at least one environment per worker") + self.sizes = [n // workers + (i < n % workers) for i in range(workers)] + requests = [{"op": "reset", "n": n} for n in self.sizes] + else: + requests = [] + offset = 0 + for n in self.sizes: + requests.append( + {"op": "step", "actions": request["actions"][offset : offset + n]} + ) + offset += n + if offset != len(request["actions"]): + raise ValueError("Incorrect action count") + results = self.executor.map(self._call, zip(self.processes, requests)) + observations, ended, offset = [], [], 0 + for result, n in zip(results, self.sizes): + observations.extend(result["observations"]) + ended.extend({**e, "env": e["env"] + offset} for e in result["ended"]) + offset += n + return {"observations": observations, "ended": ended} + + def close(self): + for process in self.processes: + process.terminate() + process.wait(timeout=5) + process.stdin.close() + process.stdout.close() + self.executor.shutdown() diff --git a/ai/replay-audit.json b/ai/replay-audit.json new file mode 100644 index 0000000..5e4fc01 --- /dev/null +++ b/ai/replay-audit.json @@ -0,0 +1,502 @@ +{ + "total": 66, + "accepted": 33, + "acceptedSealed": 7, + "results": [ + { + "id": "ab995e827dbb1e02ade0", + "version": 11, + "variant": "original", + "sealed": false, + "moves": 318, + "accepted": true + }, + { + "id": "928d7ae9824c4e016bf6", + "version": 8, + "variant": "recharged", + "sealed": true, + "moves": 418, + "accepted": true + }, + { + "id": "143b518757e189efc7e3", + "version": 8, + "variant": "recharged", + "sealed": false, + "moves": 351, + "accepted": true + }, + { + "id": "6fcca63a2d0f6c9b306b", + "version": 5, + "variant": "recharged", + "sealed": false, + "moves": 388, + "accepted": true + }, + { + "id": "607961f608892c628873", + "version": 3, + "variant": "recharged", + "sealed": true, + "moves": 380, + "accepted": true + }, + { + "id": "2af648ee2c81b05daa9c", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "19ea5e783adbad9865d4", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "549451ce830ac138852f", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 391, + "accepted": true + }, + { + "id": "54e393e828a04be005b8", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "d9a4234d28fdb5a8547b", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "eb708533d3ebd35d724a", + "version": 3, + "variant": "recharged", + "sealed": false, + "moves": 405, + "accepted": true + }, + { + "id": "d4c097c3d06fe3975517", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "210a7d1dfd4b54d11c2c", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "c9537b635df301d5d05b", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "6f7f5a1973f1476ef44d", + "version": 3, + "variant": "original", + "sealed": true, + "moves": 369, + "accepted": true + }, + { + "id": "44817ee07143fb7704c4", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 434, + "accepted": true + }, + { + "id": "65ddf54509b49a8aa36f", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "0f9f19bd7730819956b3", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 440, + "accepted": true + }, + { + "id": "a8250d7cd92ca6e0e8b3", + "version": 3, + "variant": "recharged", + "sealed": false, + "moves": 441, + "accepted": true + }, + { + "id": "3b5968bedb92d0f8bd79", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "092879ca1fe46053827e", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "6bf265fe48dae34c6101", + "version": 3, + "variant": "recharged", + "sealed": true, + "moves": 372, + "accepted": true + }, + { + "id": "09d086a97424a4a9b912", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "0488c48741af557764af", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "c448d8a0c7a6c9557f5f", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "142899655d055b4bc61e", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "e00b68c936f0ccdcd0e7", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "9dba6d7432a8f41e6083", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "4622adbf48bc58ce9ce2", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "4ca01233be2fd72067a0", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "2faf87e068025d212b9c", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "6cfdadead45769953298", + "version": 3, + "moves": 21, + "accepted": false, + "reason": "Wrong argument for the command Build" + }, + { + "id": "8a881b6eaf108c303025", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "8df1a59ac269271dbc46", + "version": 3, + "moves": 22, + "accepted": false, + "reason": "Wrong argument for the command Build" + }, + { + "id": "a74cabc1bba0781fd23f", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "1f9f4a3777e43af15c54", + "version": 3, + "moves": 19, + "accepted": false, + "reason": "Wrong argument for the command Build" + }, + { + "id": "d018dbf18dbe82273a6b", + "version": 3, + "variant": "original", + "sealed": true, + "moves": 454, + "accepted": true + }, + { + "id": "72c34fdee48fe10fdc7f", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "83416c44fa84004a5f45", + "version": 3, + "variant": "recharged", + "sealed": false, + "moves": 370, + "accepted": true + }, + { + "id": "b76ed70e5aa1ae33b963", + "version": 3, + "variant": "recharged", + "sealed": false, + "moves": 405, + "accepted": true + }, + { + "id": "54d6f0e36f565a708c9b", + "version": 3, + "variant": "recharged", + "sealed": false, + "moves": 390, + "accepted": true + }, + { + "id": "718f4881af994c1faf9a", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 383, + "accepted": true + }, + { + "id": "433cf6558b24a0bbdbf9", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 444, + "accepted": true + }, + { + "id": "eb0cec0a066e8b33bad2", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 405, + "accepted": true + }, + { + "id": "c2894a48c0a27444e114", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 436, + "accepted": true + }, + { + "id": "31610763def175adf40b", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 538, + "accepted": true + }, + { + "id": "1312804c48c9f82aa016", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 482, + "accepted": true + }, + { + "id": "adf42d5b3442634e4caf", + "version": 3, + "variant": "recharged", + "sealed": true, + "moves": 381, + "accepted": true + }, + { + "id": "5068dbfee4b33c649609", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 373, + "accepted": true + }, + { + "id": "933fb07b88c95c2bbe96", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "b43887f769649ff3c89d", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "6c1d332a20633eea9f94", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "dcd4475ef997f56beb6f", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 427, + "accepted": true + }, + { + "id": "e3d7fed6a1e2b332bf0a", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 430, + "accepted": true + }, + { + "id": "32df38734319c7b5dfde", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 392, + "accepted": true + }, + { + "id": "b019571e788c2fc32cd4", + "version": 3, + "variant": "recharged", + "sealed": true, + "moves": 381, + "accepted": true + }, + { + "id": "2b63676563cda6368b48", + "version": 3, + "moves": 144, + "accepted": false, + "reason": "You are not allowed to run the command DiscardPowerPlant" + }, + { + "id": "dc4da51d596babae1a94", + "version": 2, + "variant": "recharged", + "sealed": false, + "moves": 429, + "accepted": true + }, + { + "id": "7034b82777f64af7059a", + "version": 3, + "variant": "original", + "sealed": false, + "moves": 320, + "accepted": true + }, + { + "id": "b42f7181fe6174bfcf9b", + "version": 2, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "8232d800063a67651177", + "version": 2, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "0304865b35466d23992c", + "version": 3, + "moves": 0, + "accepted": false, + "reason": "not engine terminal" + }, + { + "id": "b1befc19a57d12d4a1a0", + "version": 2, + "variant": "recharged", + "sealed": false, + "moves": 418, + "accepted": true + }, + { + "id": "6bdc5e3f925879f358b3", + "version": 2, + "moves": 0, + "accepted": false, + "reason": "dropped/quit/bot" + }, + { + "id": "21040a462644ef9ce599", + "version": 2, + "variant": "original", + "sealed": false, + "moves": 397, + "accepted": true + }, + { + "id": "48965364741e57901f71", + "version": 2, + "variant": "original", + "sealed": false, + "moves": 354, + "accepted": true + } + ] +} \ No newline at end of file diff --git a/ai/requirements-serve.txt b/ai/requirements-serve.txt new file mode 100644 index 0000000..78f3eb4 --- /dev/null +++ b/ai/requirements-serve.txt @@ -0,0 +1,2 @@ +numpy==2.4.6 +onnxruntime==1.30.0 diff --git a/ai/serving-smoke.py b/ai/serving-smoke.py new file mode 100644 index 0000000..747216b --- /dev/null +++ b/ai/serving-smoke.py @@ -0,0 +1,48 @@ +"""Exercise the full persistent JSONL worker; validate returned engine actions.""" + +import json, subprocess, sys, time +from pathlib import Path +import numpy as np + +root = Path(__file__).resolve().parents[1] +generate = """const c=require('./ai/core.cjs');for(const variant of ['original','recharged'])for(const sealed of [false,true]){let g=c.start('serving-smoke',variant,sealed),rng=c.seedrandom('smoke'),seen=new Set();for(let n=0;n<1600&&!c.E.ended(g);n++){const p=g.currentPlayers[0],key=g.phase+':'+Math.min(g.round,3);if(!seen.has(key)){seen.add(key);console.log(JSON.stringify({state:g,player:p,revision:n,requestId:variant+'-'+sealed+'-'+n}));}g=c.E.move(g,c.heuristic(g,p,rng).action,p);}}""" +requests = [ + json.loads(l) + for l in subprocess.check_output( + ["node", "-e", generate], cwd=root, text=True + ).splitlines() +] +p = subprocess.Popen( + [sys.executable, str(root / "ai/infer.py"), sys.argv[1]], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + text=True, +) +latency = [] +checks = [] +for q in requests: + t = time.perf_counter() + p.stdin.write(json.dumps(q) + "\n") + p.stdin.flush() + r = json.loads(p.stdout.readline()) + latency.append((time.perf_counter() - t) * 1000) + assert "error" not in r, r + assert r["requestId"] == q["requestId"] and r["revision"] == q["revision"] + assert abs(sum(r["winProbabilities"]) - 1) < 1e-5 + checks.append({"state": q["state"], "player": q["player"], "move": r["move"]}) +p.stdin.close() +p.wait(timeout=10) +validate = """const c=require('./ai/core.cjs'),fs=require('fs');for(const q of JSON.parse(fs.readFileSync(0,'utf8'))){if(!c.allLegal(q.state,q.player).some(x=>JSON.stringify(x)===JSON.stringify(q.move)))throw Error('Illegal move');c.E.move(q.state,q.move,q.player);}console.log('all legal');""" +subprocess.run( + ["node", "-e", validate], input=json.dumps(checks), cwd=root, text=True, check=True +) +report = { + "requests": len(requests), + "first_request_including_startup_ms": latency[0], + "warm_end_to_end_ms": { + k: float(np.percentile(latency[1:], v)) + for k, v in [("p50", 50), ("p95", 95), ("p99", 99)] + }, + "all_moves_legal": True, +} +print(json.dumps(report, indent=2)) diff --git a/ai/summarize.py b/ai/summarize.py new file mode 100644 index 0000000..0f318da --- /dev/null +++ b/ai/summarize.py @@ -0,0 +1,50 @@ +"""Aggregate arenas with confidence intervals clustered by shared game seed.""" + +import argparse, json +from pathlib import Path +import numpy as np + +p = argparse.ArgumentParser() +p.add_argument("files", nargs="+") +args = p.parse_args() +summaries = [] +for file in args.files: + r = json.loads(Path(file).read_text()) + groups = {} + for row in r["results"]: + groups.setdefault(row["seed"], []).append(row["win"]) + means = np.array([np.mean(xs) for xs in groups.values()]) + rng = np.random.default_rng(171) + ci = np.percentile( + rng.choice(means, (10000, len(means))).mean(axis=1), [2.5, 97.5] + ).tolist() + degenerate = bool(np.all(means == means[0])) + if degenerate: + ci = None + summaries.append( + { + **{k: v for k, v in r.items() if k != "results"}, + "seed_cluster_bootstrap_95pct": ci, + "interval_note": "Not estimated: identical seed outcomes make percentile bootstrap degenerate" + if degenerate + else "Percentile bootstrap over shared seeds", + "by_rules": [ + { + "variant": variant, + "sealed": sealed, + "win_share": float( + np.mean( + [ + x["win"] + for x in r["results"] + if x["variant"] == variant and x["sealed"] == sealed + ] + ) + ), + } + for variant in ["original", "recharged"] + for sealed in [False, True] + ], + } + ) +print(json.dumps(summaries, indent=2)) diff --git a/ai/test.cjs b/ai/test.cjs new file mode 100644 index 0000000..9f19526 --- /dev/null +++ b/ai/test.cjs @@ -0,0 +1,81 @@ +const test = require('node:test'), + assert = require('node:assert/strict'), + c = require('./core.cjs'); +test('hidden deck, seed, premoves and sealed bids cannot change observations or candidates', () => { + let g = c.start('privacy', 'original', true); + g = c.E.move(g, c.candidates(g, g.currentPlayers[0])[0], g.currentPlayers[0]); + const p = g.currentPlayers[0], + a = c.observe(g, p), + moves = c.candidates(g, p).map((m) => c.actionFeatures(g, p, m)); + g.seed = 'do not use'; + g.powerPlantsDeck.reverse(); + g.hiddenLog = [{ secret: 123 }]; + g.automation = { plans: { 1: { secret: 321 } } }; + g.currentBid = 999; + g.players.forEach((x, i) => { + if (i !== p) x.bid = 987 + i; + }); + assert.deepEqual(c.observe(g, p), a); + assert.deepEqual( + c.candidates(g, p).map((m) => c.actionFeatures(g, p, m)), + moves + ); +}); +test('original/recharged and sealed/open produce finite fixed features and legal complete games', () => { + for (let seed = 0; seed < 16; seed++) { + let g = c.start('test-' + seed, seed % 2 ? 'original' : 'recharged', seed % 4 < 2), + rng = c.seedrandom('bot' + seed), + steps = 0; + while (!c.E.ended(g) && steps++ < 1600) { + const p = g.currentPlayers[0], + a = c.candidates(g, p); + assert.equal(c.observe(g, p).length, 541); + for (const m of a) { + const f = c.actionFeatures(g, p, m); + assert.equal(f.length, 74); + assert.ok(f.every(Number.isFinite)); + } + g = c.E.move(g, c.heuristic(g, p, rng).action, p); + } + assert.ok(c.E.ended(g)); + assert.equal( + c.outcome(g).reduce((a, b) => a + b, 0), + 1 + ); + } +}); +test('seeded heuristic runs reproduce terminal state', () => { + function run() { + let g = c.start('repeat', 'recharged', true), + r = c.seedrandom('tie'); + for (let i = 0; i < 1600 && !c.E.ended(g); i++) { + const p = g.currentPlayers[0]; + g = c.E.move(g, c.heuristic(g, p, r).action, p); + } + return JSON.stringify(g); + } + assert.equal(run(), run()); +}); + +test('unsupported maps, player counts and drafts are rejected', () => { + for (const options of [{ map: 'USA' }, { randomizeMap: true }, { chooseRegions: true }, { chooseColors: true }]) { + const g = c.E.setup(3, { map: 'Germany', ...options }, 'scope'); + assert.throws(() => c.observe(g, g.currentPlayers[0]), /Baseline supports/); + } + const g = c.E.setup(4, { map: 'Germany' }, 'scope'); + assert.throws(() => c.observe(g, g.currentPlayers[0]), /Baseline supports/); +}); + +test('Recharged replacement cities have distinct action features', () => { + const g = c.start('city-encoding', 'recharged'); + for (const [replacement, original] of [ + ['Stralsund', 'Torgelow'], + ['Mainz', 'Wiesbaden'], + ]) { + assert.ok(c.CITIES.includes(replacement)); + assert.notDeepEqual( + c.actionFeatures(g, 0, { name: 'Build', data: { name: replacement, price: 10 } }), + c.actionFeatures(g, 0, { name: 'Build', data: { name: original, price: 10 } }) + ); + } +}); diff --git a/ai/test_pool.py b/ai/test_pool.py new file mode 100644 index 0000000..b123108 --- /dev/null +++ b/ai/test_pool.py @@ -0,0 +1,32 @@ +"""Exercise uneven sharding and terminal episode ownership without training.""" + +import unittest +from pool import EnginePool + + +class PoolTest(unittest.TestCase): + def test_uneven_shards_complete_legal_games(self): + pool = EnginePool(4, seed="pool-regression") + try: + reply = pool.call({"op": "reset", "n": 25}) + finished = set() + for _ in range(1000): + self.assertEqual(len(reply["observations"]), 25) + reply = pool.call( + { + "op": "step", + "actions": [o["heuristic"] for o in reply["observations"]], + } + ) + for end in reply["ended"]: + self.assertFalse(end["truncated"]) + self.assertTrue(0 <= end["env"] < 25) + self.assertAlmostEqual(sum(end["value"]), 1) + finished.add(end["env"]) + self.assertEqual(finished, set(range(25))) + finally: + pool.close() + + +if __name__ == "__main__": + unittest.main() diff --git a/ai/train.py b/ai/train.py new file mode 100644 index 0000000..5c7fbdb --- /dev/null +++ b/ai/train.py @@ -0,0 +1,283 @@ +import os, json, random, hashlib, subprocess, time, copy +from pathlib import Path +import numpy as np +import torch +from torch import nn +from torch.distributions import Categorical + +random.seed(7) +np.random.seed(7) +torch.manual_seed(7) +torch.set_num_threads(4) +BATCH_SIZE = int(os.getenv("BATCH_SIZE", "256")) +DEVICE = "cuda" if torch.cuda.is_available() else "cpu" + + +class Policy(nn.Module): + def __init__(self, sd, ad): + super().__init__() + self.state = nn.Sequential( + nn.Linear(sd, 512), nn.Tanh(), nn.Linear(512, 256), nn.Tanh() + ) + self.action = nn.Sequential(nn.Linear(ad, 128), nn.Tanh()) + self.score = nn.Sequential(nn.Linear(384, 128), nn.Tanh(), nn.Linear(128, 1)) + self.value = nn.Linear(256, 3) + + def forward(self, state, actions, mask): + s = self.state(state) + a = self.action(actions) + logits = self.score( + torch.cat((s[:, None, :].expand(-1, a.shape[1], -1), a), -1) + ).squeeze(-1) + return logits.masked_fill(~mask, -1e9), self.value(s).softmax(-1) + + +def tensors(rows): + states = torch.tensor( + np.asarray([r["state"] for r in rows], dtype=np.float32), device=DEVICE + ) + m = max(len(r["actions"]) for r in rows) + a = np.zeros((len(rows), m, AD), np.float32) + mask = np.zeros((len(rows), m), bool) + for i, r in enumerate(rows): + a[i, : len(r["actions"])] = r["actions"] + mask[i, : len(r["actions"])] = True + return states, torch.tensor(a, device=DEVICE), torch.tensor(mask, device=DEVICE) + + +def split(game): + return int(hashlib.sha256(game.encode()).hexdigest()[:8], 16) % 5 == 0 + + +if __name__ == "__main__": + out = Path(os.environ.get("OUT", "ai/runs/baseline")) + out.mkdir(parents=True, exist_ok=True) + if not Path("dataset.jsonl").exists(): + subprocess.run(["node", "ai/generate.cjs", "dataset.jsonl"], check=True) + rows = [json.loads(l) for l in open("dataset.jsonl")] + SD = len(rows[0]["state"]) + AD = len(rows[0]["actions"][0]) + train = [r for r in rows if not split(r["game"])] + valid = [r for r in rows if split(r["game"])] + net = Policy(SD, AD).to(DEVICE) + opt = torch.optim.Adam(net.parameters(), lr=3e-4) + metrics = [] + + def save(name): + torch.save( + {"state_dim": SD, "action_dim": AD, "state_dict": net.cpu().state_dict()}, + out / (name + ".pt"), + ) + net.to(DEVICE) + + print( + json.dumps( + { + "device": DEVICE, + "training": len(train), + "validation": len(valid), + "parameters": sum(p.numel() for p in net.parameters()), + } + ), + flush=True, + ) + for epoch in range(int(os.getenv("BC_EPOCHS", "12"))): + random.shuffle(train) + net.train() + losses = [] + for k in range(0, len(train), BATCH_SIZE): + b = train[k : k + BATCH_SIZE] + logits, v = net(*tensors(b)) + target = torch.tensor([r["target"] for r in b], device=DEVICE) + value = torch.tensor([r["value"] for r in b], device=DEVICE) + w = torch.tensor([r["weight"] for r in b], device=DEVICE) + loss = ( + nn.functional.cross_entropy(logits, target, reduction="none") * w + ).mean() + 0.5 * ((v - value) ** 2).mean() + opt.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(net.parameters(), 1) + opt.step() + losses.append(loss.item()) + correct = total = 0 + vl = [] + net.eval() + with torch.no_grad(): + for k in range(0, len(valid), 256): + b = valid[k : k + 256] + l, v = net(*tensors(b)) + correct += ( + (l.argmax(-1).cpu().numpy() == [r["target"] for r in b]) + .sum() + .item() + ) + total += len(b) + vl.append( + ((v.cpu().numpy() - np.array([r["value"] for r in b])) ** 2) + .mean() + .item() + ) + entry = { + "stage": "bc", + "epoch": epoch, + "loss": float(np.mean(losses)), + "heldout_action_accuracy": correct / total, + "heldout_value_mse": float(np.mean(vl)), + } + metrics.append(entry) + print(json.dumps(entry), flush=True) + save("imitation") + teacher = copy.deepcopy(net).eval() + from pool import EnginePool + + pool = EnginePool(int(os.getenv("WORKERS", "1"))) + rpc = pool.call + nenv = int(os.getenv("ENVS", "24")) + current = rpc({"op": "reset", "n": nenv})["observations"] + pending = [[] for _ in range(nenv)] + completed = 0 + for update in range(int(os.getenv("RL_UPDATES", "24"))): + batch = [] + start = time.time() + truncated = 0 + while len(batch) < int(os.getenv("ROLLOUT_SAMPLES", "8000")): + with torch.no_grad(): + x = tensors(current) + logits, v = net(*x) + dist = Categorical(logits=logits) + actions = dist.sample() + logps = dist.log_prob(actions) + for i, r in enumerate(current): + pending[i].append( + { + **r, + "choice": actions[i].item(), + "oldlogp": logps[i].item(), + "oldvalue": v[i, 0].item(), + } + ) + result = rpc({"op": "step", "actions": actions.tolist()}) + current = result["observations"] + for end in result["ended"]: + i = end["env"] + completed += 1 + if end["truncated"]: + truncated += 1 + else: + for r in pending[i]: + seat = r["seat"] + r["value"] = [end["value"][(seat + j) % 3] for j in range(3)] + r["advantage"] = r["value"][0] - r["oldvalue"] + batch.append(r) + pending[i] = [] + # Freeze the rollout policy during collection; never reuse unfinished episodes across updates. + current = rpc({"op": "reset", "n": nenv})["observations"] + pending = [[] for _ in range(nenv)] + rollout_seconds = time.time() - start + optimization_start = time.time() + adv = np.array([r["advantage"] for r in batch]) + mean, std = float(adv.mean()), float(adv.std() + 1e-6) + for epoch in range(3): + random.shuffle(batch) + for k in range(0, len(batch), BATCH_SIZE): + b = batch[k : k + BATCH_SIZE] + x = tensors(b) + logits, v = net(*x) + dist = Categorical(logits=logits) + act = torch.tensor([r["choice"] for r in b], device=DEVICE) + old = torch.tensor([r["oldlogp"] for r in b], device=DEVICE) + advantage = torch.tensor( + [(r["advantage"] - mean) / std for r in b], device=DEVICE + ) + target = torch.tensor([r["value"] for r in b], device=DEVICE) + ratio = (dist.log_prob(act) - old).exp() + policy = -torch.minimum( + ratio * advantage, ratio.clamp(0.8, 1.2) * advantage + ).mean() + with torch.no_grad(): + tl, _ = teacher(*x) + kl = nn.functional.kl_div( + logits.log_softmax(-1), tl.softmax(-1), reduction="batchmean" + ) + loss = ( + policy + + 0.5 * ((v - target) ** 2).mean() + - 0.005 * dist.entropy().mean() + + 0.05 * kl + ) + opt.zero_grad() + loss.backward() + nn.utils.clip_grad_norm_(net.parameters(), 1) + opt.step() + entry = { + "stage": "selfplay_ppo", + "update": update, + "episodes_total": completed, + "truncated": truncated, + "samples": len(batch), + "seconds": round(time.time() - start, 2), + "rollout_seconds": rollout_seconds, + "optimization_seconds": time.time() - optimization_start, + } + metrics.append(entry) + print(json.dumps(entry), flush=True) + if update % 4 == 3: + save("selfplay-" + str(update + 1)) + pool.close() + save("selfplay") + net.cpu().eval() + # Export both imitation and final RL checkpoints; evaluation selects the serving model. + for name in ["imitation", "selfplay"]: + ck = torch.load(out / (name + ".pt"), map_location="cpu", weights_only=True) + net.load_state_dict(ck["state_dict"]) + net.eval() + torch.onnx.export( + net, + ( + torch.zeros(1, SD), + torch.zeros(1, 8, AD), + torch.ones(1, 8, dtype=torch.bool), + ), + str(out / (name + ".onnx")), + input_names=["state", "actions", "mask"], + output_names=["logits", "value"], + dynamic_axes={ + "state": {0: "batch"}, + "actions": {0: "batch", 1: "candidates"}, + "mask": {0: "batch", 1: "candidates"}, + "logits": {0: "batch", 1: "candidates"}, + "value": {0: "batch"}, + }, + opset_version=17, + dynamo=False, + ) + (out / "metrics.json").write_text(json.dumps(metrics, indent=2)) + (out / "schema.json").write_text( + json.dumps( + { + "version": 2, + "state_dim": SD, + "action_dim": AD, + "map": "Germany", + "players": 3, + "variants": ["original", "recharged"], + "fastBid": [False, True], + "money": "all players visible", + "hidden": [ + "seed", + "deck order", + "opponent bids when sealed", + "queued moves", + ], + }, + indent=2, + ) + ) + if os.getenv("HF_MODEL_REPO"): + from huggingface_hub import HfApi + + HfApi().upload_folder( + repo_id=os.environ["HF_MODEL_REPO"], + folder_path=str(out), + path_in_repo="runs/" + os.environ.get("RUN_NAME", "baseline"), + ) diff --git a/ai/verify-export.py b/ai/verify-export.py new file mode 100644 index 0000000..58c66b5 --- /dev/null +++ b/ai/verify-export.py @@ -0,0 +1,57 @@ +"""CPU inference-only parity check of trained checkpoints versus exported ONNX.""" + +import argparse, json, subprocess +from pathlib import Path +import numpy as np +import torch +import onnxruntime as ort +import train + +p = argparse.ArgumentParser() +p.add_argument("directory") +args = p.parse_args() +root = Path(__file__).resolve().parents[1] +script = """const c=require('./ai/core.cjs');for(const variant of ['original','recharged'])for(const sealed of [false,true]){let g=c.start('parity',variant,sealed),rng=c.seedrandom('parity');for(let i=0;i<240&&!c.E.ended(g);i++){const p=g.currentPlayers[0],a=c.candidates(g,p);if(i%10===0)console.log(JSON.stringify({state:c.observe(g,p),actions:a.map(x=>c.actionFeatures(g,p,x))}));g=c.E.move(g,c.heuristic(g,p,rng).action,p);}}""" +rows = [ + json.loads(l) + for l in subprocess.check_output( + ["node", "-e", script], cwd=root, text=True + ).splitlines() +] +train.DEVICE = "cpu" +results = {} +for name in ["imitation", "selfplay"]: + ck = torch.load( + Path(args.directory) / (name + ".pt"), map_location="cpu", weights_only=True + ) + train.AD = ck["action_dim"] + net = train.Policy(ck["state_dim"], train.AD).eval() + net.load_state_dict(ck["state_dict"]) + opts = ort.SessionOptions() + opts.intra_op_num_threads = 1 + session = ort.InferenceSession( + str(Path(args.directory) / (name + ".onnx")), + sess_options=opts, + providers=["CPUExecutionProvider"], + ) + errors = [] + matches = 0 + for n in [1, 7, 24, len(rows)]: + x = train.tensors(rows[:n]) + actual = session.run( + None, dict(zip(["state", "actions", "mask"], [t.numpy() for t in x])) + ) + with torch.no_grad(): + expected = [t.numpy() for t in net(*x)] + errors.append( + max(float(np.max(np.abs(a - b))) for a, b in zip(actual, expected)) + ) + assert np.array_equal(actual[0].argmax(-1), expected[0].argmax(-1)) + matches += n + assert max(errors) < 1e-4, errors + results[name] = { + "max_abs_error": max(errors), + "matching_decisions": matches, + "batch_sizes": [1, 7, 24, len(rows)], + } +print(json.dumps(results, indent=2)) From e8c83925fbc389e30a3ba48381c37e98d2d719f3 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 15:28:48 +0200 Subject: [PATCH 002/184] Pin the verified CPU serving runtimes --- ai/README.md | 2 +- ai/requirements-serve.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ai/README.md b/ai/README.md index 1f3b3e0..b02bb90 100644 --- a/ai/README.md +++ b/ai/README.md @@ -50,7 +50,7 @@ The value head is an **uncalibrated self-play win estimate**, not a forecast of ## Run and reproduce -Install the engine dependencies and build `engine/tsconfig.json` using the repository's package manager. Use Python 3.11+, Node 24, and `numpy`, `onnxruntime` for serving. Cloud training additionally needs PyTorch, `onnx`, and `huggingface_hub`; launch scripts use the PyTorch 2.6.0 CUDA 12.4 image. +Install the engine dependencies and build `engine/tsconfig.json` using the repository's package manager. Use Python 3.11+, Node 24, and `pip install -r ai/requirements-serve.txt` for serving. Verified runtimes: Python 3.11 / NumPy 2.4.6 on the laptop; Python 3.12 / NumPy 2.5.3 on the 8840U; ONNX Runtime 1.30.0 on both. Cloud training additionally needs PyTorch, `onnx`, and `huggingface_hub`; launch scripts use the PyTorch 2.6.0 CUDA 12.4 image. ```sh node --test ai/test.cjs diff --git a/ai/requirements-serve.txt b/ai/requirements-serve.txt index 78f3eb4..943d237 100644 --- a/ai/requirements-serve.txt +++ b/ai/requirements-serve.txt @@ -1,2 +1,3 @@ -numpy==2.4.6 +numpy==2.4.6; python_version < "3.12" +numpy==2.5.3; python_version >= "3.12" onnxruntime==1.30.0 From 1c7645b5949907a7ea6926828fdd2df6a2301399 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 16:00:54 +0200 Subject: [PATCH 003/184] Fix fuel teacher and launch economic-policy league training --- ai/core-v2.cjs | 239 +++++++++++++++++++++++++ ai/core.cjs | 31 ++-- ai/features.cjs | 2 +- ai/pool.py | 6 +- ai/strong/README.md | 39 +++++ ai/strong/benchmark-features.cjs | 1 + ai/strong/bridge.cjs | 94 ++++++++++ ai/strong/economics.cjs | 198 +++++++++++++++++++++ ai/strong/evaluate.py | 83 +++++++++ ai/strong/experiments.json | 22 +++ ai/strong/features.cjs | 82 +++++++++ ai/strong/infer.py | 49 ++++++ ai/strong/launch-a.sh | 19 ++ ai/strong/launch-b.sh | 19 ++ ai/strong/launch-c.sh | 19 ++ ai/strong/launch-d.sh | 19 ++ ai/strong/launch-population.sh | 19 ++ ai/strong/launch-search.sh | 19 ++ ai/strong/launch-smoke.sh | 19 ++ ai/strong/model.py | 45 +++++ ai/strong/population.py | 32 ++++ ai/strong/public-graph.cjs | 53 ++++++ ai/strong/search-benchmark.py | 40 +++++ ai/strong/search.cjs | 53 ++++++ ai/strong/spatial.cjs | 78 +++++++++ ai/strong/test.cjs | 95 ++++++++++ ai/strong/tournament.cjs | 74 ++++++++ ai/strong/train.py | 287 +++++++++++++++++++++++++++++++ ai/strong/worker.cjs | 16 ++ ai/test.cjs | 21 +++ 30 files changed, 1759 insertions(+), 14 deletions(-) create mode 100644 ai/core-v2.cjs create mode 100644 ai/strong/README.md create mode 100644 ai/strong/benchmark-features.cjs create mode 100644 ai/strong/bridge.cjs create mode 100644 ai/strong/economics.cjs create mode 100644 ai/strong/evaluate.py create mode 100644 ai/strong/experiments.json create mode 100644 ai/strong/features.cjs create mode 100644 ai/strong/infer.py create mode 100644 ai/strong/launch-a.sh create mode 100644 ai/strong/launch-b.sh create mode 100644 ai/strong/launch-c.sh create mode 100644 ai/strong/launch-d.sh create mode 100644 ai/strong/launch-population.sh create mode 100644 ai/strong/launch-search.sh create mode 100644 ai/strong/launch-smoke.sh create mode 100644 ai/strong/model.py create mode 100644 ai/strong/population.py create mode 100644 ai/strong/public-graph.cjs create mode 100644 ai/strong/search-benchmark.py create mode 100644 ai/strong/search.cjs create mode 100644 ai/strong/spatial.cjs create mode 100644 ai/strong/test.cjs create mode 100644 ai/strong/tournament.cjs create mode 100644 ai/strong/train.py create mode 100644 ai/strong/worker.cjs diff --git a/ai/core-v2.cjs b/ai/core-v2.cjs new file mode 100644 index 0000000..4236f00 --- /dev/null +++ b/ai/core-v2.cjs @@ -0,0 +1,239 @@ +const E = require('../engine/dist/index.js'); +const { map: germany, mapRecharged: germanyRecharged } = require('../engine/dist/src/maps/germany.js'); +const seedrandom = require(require.resolve('seedrandom', { paths: [__dirname + '/../engine'] })); +const TYPES = [ + 'ChoosePowerPlant', + 'Bid', + 'DiscardPowerPlant', + 'DiscardResources', + 'BuyResource', + 'Build', + 'UsePowerPlant', + 'ChooseRegion', + 'ChooseColor', + 'Pass', +]; +const RES = ['coal', 'oil', 'garbage', 'uranium']; +const CITIES = [...new Set([...germany.cities, ...germanyRecharged.cities].map((c) => c.name))].sort(); +const PHASES = Object.values(E.Phase); +const onehot = (v, vs) => vs.map((x) => +(x === v)); +const plant = (p) => + p ? [p.number / 50, p.cost / 4, p.citiesPowered / 8, ...onehot(p.type, [0, 1, 2, 3, 4, 5])] : Array(9).fill(0); +function assertScope(g) { + if ( + g.map.name !== 'Germany' || + g.players.length !== 3 || + g.options.randomizeMap || + g.map.cities.some((city) => !CITIES.includes(city.name)) || + g.options.chooseRegions || + g.options.chooseColors + ) + throw Error('Baseline supports three-player Germany with automatic setup only'); +} +function observe(g, seat) { + assertScope(g); + const order = [seat, (seat + 1) % 3, (seat + 2) % 3]; + const s = [ + ...onehot(g.phase, PHASES), + g.round / 20, + g.step / 3, + +(g.options.variant === 'recharged'), + +g.options.fastBid, + g.cardsLeft / 50, + +g.nextCardWeak, + (g.options.fastBid ? 0 : g.currentBid || 0) / 100, + (g.minimunBid || 0) / 100, + ...onehot(g.auctioningPlayer, order), + g.citiesToEndGame / 25, + g.citiesToStep2 / 20, + ]; + for (const r of RES) + s.push( + (g[r + 'Market'] || 0) / 24, + (g[r + 'Supply'] || 0) / 24, + ...(g[r + 'Prices'] || []).slice(0, 24).map((x) => x / 20), + ...Array(Math.max(0, 24 - (g[r + 'Prices'] || []).length)).fill(0) + ); + for (const i of order) { + const p = g.players[i]; + s.push( + p.money / 500, + p.cities.length / 22, + p.housesLeft / 22, + p.citiesPowered / 22, + g.playerOrder.indexOf(i) / 2, + +p.skipAuction, + +p.passed, + (g.options.fastBid ? 0 : p.bid || 0) / 100 + ); + for (const r of RES) s.push((p[r + 'Left'] || 0) / 24, (p[r + 'Capacity'] || 0) / 24); + s.push(p.hybridCapacity / 24); + for (let j = 0; j < 4; j++) s.push(...plant(p.powerPlants[j])); + } + for (let i = 0; i < 4; i++) s.push(...plant(g.actualMarket[i]), ...plant(g.futureMarket[i])); + s.push(...plant(g.chosenPowerPlant)); + for (const city of CITIES) + s.push( + +g.map.cities.some((c) => c.name === city), + ...order.map((i) => +g.players[i].cities.some((c) => c.name === city)) + ); + if (!s.every(Number.isFinite)) throw Error('Non-finite observation'); + return s; +} +function allLegal(g, seat) { + return Object.entries(g.players[seat].availableMoves || {}).flatMap(([name, items]) => + (items || []).map((data) => ({ name, data })) + ); +} +function candidates(g, seat) { + const all = allLegal(g, seat), + bids = all.filter((a) => a.name === 'Bid'); + if (bids.length <= 48) return all; + const min = bids[0].data, + max = bids.at(-1).data; + return all.filter((a) => a.name !== 'Bid' || a.data < min + 8 || a.data % 10 === 0 || a.data === max); +} + +function actionFeatures(g, seat, a) { + const d = a.data, + p = g.players[seat]; + const pp = + a.name === 'ChoosePowerPlant' + ? g.actualMarket.find((x) => x.number === d) + : a.name === 'DiscardPowerPlant' + ? p.powerPlants.find((x) => x.number === d) + : a.name === 'UsePowerPlant' + ? p.powerPlants.find((x) => x.number === d.powerPlant) + : g.chosenPowerPlant; + const cost = a.name === 'Bid' ? d : d?.price || 0; + return [ + ...onehot(a.name, TYPES), + cost / 500, + cost / Math.max(p.money, 1), + ...onehot(d?.resource || (typeof d === 'string' ? d : ''), RES), + ...plant(pp), + ...onehot(d?.name, CITIES), + (d?.citiesPowered || 0) / 20, + ...RES.map((r) => (d?.resourcesSpent || []).filter((x) => x === r).length / 4), + ]; +} +function fuelDemand(g, p) { + const target = Math.min(Math.max(p.cities.length, Math.min(3, capacity(p))), capacity(p)); + let powered = 0; + const need = Object.fromEntries(RES.map((r) => [r, 0])); + const ps = [...p.powerPlants].sort((a, b) => fuelCost(g, a) / a.citiesPowered - fuelCost(g, b) / b.citiesPowered); + for (const pp of ps) { + if (powered >= target) break; + powered += pp.citiesPowered; + let resource = RES[pp.type]; + if (pp.type === 4) resource = (g.coalPrices[0] || 8) <= (g.oilPrices[0] || 8) ? 'coal' : 'oil'; + if (resource) need[resource] += pp.cost; + } + return need; +} +function fuelCost(g, pp) { + return ( + pp.cost * + (pp.type === 4 ? Math.min(g.coalPrices[0] || 8, g.oilPrices[0] || 8) : g[RES[pp.type] + 'Prices']?.[0] || 0) + ); +} +const capacity = (p) => p.powerPlants.reduce((n, x) => n + x.citiesPowered, 0); +function plantWorth(g, p, pp) { + let old = 0; + if (p.powerPlants.length >= 3) old = Math.min(...p.powerPlants.map((x) => x.citiesPowered)); + const gain = Math.max(0, pp.citiesPowered - old); + const reserve = Math.max(12, Math.min(40, p.cities.length * 2 + 10)); + const useful = gain > 0 || fuelCost(g, pp) < 3; + return useful ? Math.min(p.money - reserve, pp.number + gain * 5 - fuelCost(g, pp)) : 0; +} +function heuristicScore(g, seat, a) { + const p = g.players[seat], + d = a.data, + cap = capacity(p); + switch (a.name) { + case 'ChoosePowerPlant': { + const pp = g.actualMarket.find((x) => x.number === d); + const worth = plantWorth(g, p, pp); + return worth >= d ? 20 + pp.citiesPowered * 5 - fuelCost(g, pp) - d * 0.2 : -100 - d; + } + case 'Bid': { + const worth = Math.max(g.round === 1 ? g.minimunBid : 0, plantWorth(g, p, g.chosenPowerPlant)); + if (d > worth) return -100 - d; + return g.options.fastBid ? 20 - Math.abs(worth - d) : 30 - d * 0.1; + } + case 'DiscardPowerPlant': { + const pp = p.powerPlants.find((x) => x.number === d); + return 10 - pp.citiesPowered * 5 + fuelCost(g, pp); + } + case 'DiscardResources': + return 10 + (p[d + 'Left'] || 0); + case 'BuyResource': { + const need = fuelDemand(g, p); + return p[d.resource + 'Left'] < need[d.resource] && + p.money - d.price >= Math.max(0, p.cities.length ? 0 : 12) + ? 20 - d.price + : -100; + } + case 'Build': { + const desired = + p.money > 150 || g.round > 18 + ? g.citiesToEndGame + : Math.min(g.citiesToEndGame, cap + (p.money > 100 ? 1 : 0)); + return p.cities.length < desired ? 30 - d.price * 0.5 : -100; + } + case 'UsePowerPlant': + return ( + 40 + + (d.citiesPowered || 0) * 5 - + (d.resourcesSpent || []).reduce((n, r) => n + (g[r + 'Prices']?.[0] || 8), 0) + ); + case 'Pass': + return 0; + default: + return 1; + } +} +function heuristic(g, seat, rng = () => 0.5) { + const a = candidates(g, seat); + let best = 0, + v = -Infinity; + a.forEach((x, i) => { + const score = heuristicScore(g, seat, x) + rng() * 0.01; + if (score > v) { + v = score; + best = i; + } + }); + return { index: best, action: a[best] }; +} +function outcome(g) { + const sorted = E.playersSortedByScore(g), + top = sorted[0], + w = g.players.map( + (p) => + +( + p.citiesPowered === top.citiesPowered && + p.money === top.money && + p.cities.length === top.cities.length + ) + ); + return w.map((x) => x / w.reduce((a, b) => a + b, 0)); +} +function start(seed, variant = 'original', fastBid = false) { + return E.setup(3, { map: 'Germany', variant, fastBid, showMoney: true }, seed); +} +module.exports = { + E, + CITIES, + TYPES, + RES, + observe, + allLegal, + candidates, + actionFeatures, + heuristic, + heuristicScore, + outcome, + start, + seedrandom, +}; diff --git a/ai/core.cjs b/ai/core.cjs index 4236f00..0ff582d 100644 --- a/ai/core.cjs +++ b/ai/core.cjs @@ -105,7 +105,7 @@ function actionFeatures(g, seat, a) { : a.name === 'UsePowerPlant' ? p.powerPlants.find((x) => x.number === d.powerPlant) : g.chosenPowerPlant; - const cost = a.name === 'Bid' ? d : d?.price || 0; + const cost = a.name === 'Bid' ? d : a.name === 'BuyResource' ? resourcePrice(g, d.resource) : d?.price || 0; return [ ...onehot(a.name, TYPES), cost / 500, @@ -117,6 +117,11 @@ function actionFeatures(g, seat, a) { ...RES.map((r) => (d?.resourcesSpent || []).filter((x) => x === r).length / 4), ]; } +function resourcePrice(g, resource, offset = 0) { + const prices = g[resource + 'Prices']; + const count = g[resource + 'Market']; + return prices && count > offset ? prices[prices.length - count + offset] : 20; +} function fuelDemand(g, p) { const target = Math.min(Math.max(p.cities.length, Math.min(3, capacity(p))), capacity(p)); let powered = 0; @@ -126,7 +131,7 @@ function fuelDemand(g, p) { if (powered >= target) break; powered += pp.citiesPowered; let resource = RES[pp.type]; - if (pp.type === 4) resource = (g.coalPrices[0] || 8) <= (g.oilPrices[0] || 8) ? 'coal' : 'oil'; + if (pp.type === 4) resource = resourcePrice(g, 'coal') <= resourcePrice(g, 'oil') ? 'coal' : 'oil'; if (resource) need[resource] += pp.cost; } return need; @@ -134,7 +139,11 @@ function fuelDemand(g, p) { function fuelCost(g, pp) { return ( pp.cost * - (pp.type === 4 ? Math.min(g.coalPrices[0] || 8, g.oilPrices[0] || 8) : g[RES[pp.type] + 'Prices']?.[0] || 0) + (pp.type === 4 + ? Math.min(resourcePrice(g, 'coal'), resourcePrice(g, 'oil')) + : RES[pp.type] + ? resourcePrice(g, RES[pp.type]) + : 0) ); } const capacity = (p) => p.powerPlants.reduce((n, x) => n + x.citiesPowered, 0); @@ -168,10 +177,10 @@ function heuristicScore(g, seat, a) { case 'DiscardResources': return 10 + (p[d + 'Left'] || 0); case 'BuyResource': { - const need = fuelDemand(g, p); - return p[d.resource + 'Left'] < need[d.resource] && - p.money - d.price >= Math.max(0, p.cities.length ? 0 : 12) - ? 20 - d.price + const need = fuelDemand(g, p), + price = resourcePrice(g, d.resource); + return p[d.resource + 'Left'] < need[d.resource] && p.money - price >= Math.max(0, p.cities.length ? 0 : 12) + ? 20 - price : -100; } case 'Build': { @@ -183,9 +192,7 @@ function heuristicScore(g, seat, a) { } case 'UsePowerPlant': return ( - 40 + - (d.citiesPowered || 0) * 5 - - (d.resourcesSpent || []).reduce((n, r) => n + (g[r + 'Prices']?.[0] || 8), 0) + 40 + (d.citiesPowered || 0) * 5 - (d.resourcesSpent || []).reduce((n, r) => n + resourcePrice(g, r), 0) ); case 'Pass': return 0; @@ -236,4 +243,8 @@ module.exports = { outcome, start, seedrandom, + resourcePrice, + fuelDemand, + fuelCost, + capacity, }; diff --git a/ai/features.cjs b/ai/features.cjs index 45715e5..e1c8f55 100644 --- a/ai/features.cjs +++ b/ai/features.cjs @@ -1,4 +1,4 @@ -const c = require('./core.cjs'), +const c = require('./core-v2.cjs'), readline = require('node:readline'); (async () => { for await (const line of readline.createInterface({ input: process.stdin })) { diff --git a/ai/pool.py b/ai/pool.py index 57625f4..a252984 100644 --- a/ai/pool.py +++ b/ai/pool.py @@ -7,11 +7,11 @@ from concurrent.futures import ThreadPoolExecutor class EnginePool: - def __init__(self, workers=1, seed="rollout-v1"): + def __init__(self, workers=1, seed="rollout-v1", script="ai/bridge.cjs"): self.executor = ThreadPoolExecutor(workers) self.processes = [ subprocess.Popen( - ["node", "ai/bridge.cjs"], + ["node", script], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True, @@ -39,7 +39,7 @@ class EnginePool: if n < workers: raise ValueError("Need at least one environment per worker") self.sizes = [n // workers + (i < n % workers) for i in range(workers)] - requests = [{"op": "reset", "n": n} for n in self.sizes] + requests = [{**request, "n": n} for n in self.sizes] else: requests = [] offset = 0 diff --git a/ai/strong/README.md b/ai/strong/README.md new file mode 100644 index 0000000..f2efed5 --- /dev/null +++ b/ai/strong/README.md @@ -0,0 +1,39 @@ +# Strong-policy research (active) + +The target is substantially stronger play, not merely beating the engine's default bot. No strength claim is made from the first prototype. Training runs on HF Jobs; CPU inference and correctness checks run locally and on the 8840U. + +## Critical diagnosis + +The first heuristic incorrectly read `BuyResource.data.price`, which the engine does not provide. The resulting NaN comparison suppressed fuel buying. It also used the beginning of a price schedule instead of the slot indexed by remaining market stock. Both are fixed and covered by a test against the engine's actual cash deduction. The corrected heuristic wins 85.1% against the default bot over 960 games. Thus the default bot is only a sanity check. + +`../core-v2.cjs` preserves the old feature semantics solely for compatibility with old exported research artifacts. New strong models use the corrected core and this directory's features. Do not evaluate new models with old feature encoders. + +## Model information and strategy + +Schema 3 has 738 state features and 96 features per candidate action. All opponents' money is visible by user instruction. Hidden deck order, random seed, sealed bid amounts and queued plans are excluded. + +The observation explicitly includes all players' cities, plants, fuel, money, current order and remaining actors; per-resource replenishment for every step; current prices and capped refill; and generation capacity with current fuel. Territory features describe each player's presence in map-defined regions/islands and their remaining legal building slots. Building actions include the projected next order with highest-plant tie breaking. Terminal winning is the optimization objective; there is no reward for indiscriminately adding cities. + +`public-graph.cjs` exports map topology, owner vectors, slot rules, edges, islands and crossing costs for subsequent multi-map model work. UK/Ireland territory behavior is tested, but the current trained policy remains Germany/three players. Exporting generic map features does not establish playing strength on another map. + +## Opponents and training + +The economic opponent enumerates feasible plant/fuel combinations and considers purchase cost, income, generation capacity, resource replenishment and stockpiling. A rush variant and the corrected heuristic supply different styles. The residual policy starts with economic action scores and learns neural corrections, rather than initially relearning how to buy fuel from scratch. + +PPO collects complete episodes against a mixture of fixed bots, self-play and frozen earlier neural policies. The four learners vary seed, learning rate, entropy and prior regularization. Each is configured for 300 updates × 128 completed games. Development evaluation uses 96 games per opponent every 20 updates. It selects checkpoints; it is not the final test. + +A separate rollout-search opponent uses the engine's public-information scenario sampler and evaluates counterfactual actions across sampled unknown decks and sealed bids. Its choices are tested for invariance to the actual hidden deck and bids. The initial search benchmark is held separately from training. + +## Evidence required before declaring strength + +- Robust gains over the economic, corrected-heuristic, rush, and frozen neural opponents—not just the default bot. +- Independent matches against the search reference, with confidence intervals and each rule combination reported separately. +- Fresh final-test seeds, balanced seats, original/Recharged and open/sealed auctions, no silent dropping of failed or truncated games. +- Tactical and information-boundary tests, ONNX parity, and measured full-worker latency on the 8840U. +- Human/expert matches would still be needed to substantiate an expert-level claim. Other maps need training and validation, even though their topology can be encoded. + +## Runtime + +The initial whole-engine JavaScript simulation benchmark was already fast. Repeated economic and regional feature calculations were a larger bottleneck. Hoisting them out of candidate-action loops made the feature benchmark 2.2× faster while preserving the exact output hash across 1,786 positions. A Rust rewrite remains an option if later profiling warrants it. + +`infer.py` serves schema 3 over persistent JSONL; it preserves the same revision-validation obligation as the baseline worker. `evaluate.py` runs independent CPU matches. The current policies are research artifacts, not routed into production bot moves. diff --git a/ai/strong/benchmark-features.cjs b/ai/strong/benchmark-features.cjs new file mode 100644 index 0000000..39ec545 --- /dev/null +++ b/ai/strong/benchmark-features.cjs @@ -0,0 +1 @@ +const c=require('../core.cjs'),f=require('./features.cjs'),eco=require('./economics.cjs'),{createHash}=require('node:crypto');const h=createHash('sha256');let n=0,t=performance.now();for(let i=0;i<4;i++){const g=c.start('features-bench-'+i,i%2?'original':'recharged',i<2),rng=c.seedrandom('bench');while(!c.E.ended(g)&&n<5000){const p=g.currentPlayers[0],x=f.encode(g,p);h.update(JSON.stringify(x));n++;c.E.move(g,eco.choose(g,p,rng).action,p);}}console.log(JSON.stringify({states:n,seconds:(performance.now()-t)/1000,hash:h.digest('hex')})); diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs new file mode 100644 index 0000000..1251934 --- /dev/null +++ b/ai/strong/bridge.cjs @@ -0,0 +1,94 @@ +const c = require('../core.cjs'), + eco = require('./economics.cjs'), + f = require('./features.cjs'), + readline = require('node:readline'); +let envs = [], + sequence = 0; +const seed = process.env.SEED || 'strong-train'; +function applyBot(e, p) { + const role = e.roles[p]; + if (role === 'legacy') { + const old = Math.random; + Math.random = e.rng; + try { + c.E.moveAI(e.g, p); + } finally { + Math.random = old; + } + } else + c.E.move( + e.g, + role === 'heuristic' ? c.heuristic(e.g, p, e.rng).action : eco.choose(e.g, p, e.rng, role).action, + p + ); + e.steps++; +} +function advance(e) { + while ( + !c.E.ended(e.g) && + e.steps < 1600 && + !['learner', 'snapshot0', 'snapshot1', 'snapshot2'].includes(e.roles[e.g.currentPlayers[0]]) + ) + applyBot(e, e.g.currentPlayers[0]); +} +function observation(e) { + if (c.E.ended(e.g) || e.steps >= 1600) return null; + const seat = e.g.currentPlayers[0], + x = f.encode(e.g, seat); + delete x.moves; + return { ...x, episode: e.id, roles: e.roles, round: e.g.round }; +} +function reset(mode = 'mixed') { + const id = sequence++, + seat = Math.floor(id / 4) % 3, + kind = Math.floor(c.seedrandom(seed + '-opponents-' + id)() * 8); + const opponent = + mode === 'mixed' + ? ['economic', 'heuristic', 'rush', 'legacy', 'selfplay', 'snapshot0', 'snapshot1', 'snapshot2'][kind] + : mode; + const roles = + opponent === 'selfplay' + ? ['learner', 'learner', 'learner'] + : Array.from({ length: 3 }, (_, i) => (i === seat ? 'learner' : opponent)); + const e = { + id, + g: c.start(seed + '-' + id, id % 2 ? 'recharged' : 'original', id % 4 < 2), + roles, + rng: c.seedrandom(seed + '-bot-' + id), + steps: 0, + }; + advance(e); + return e; +} +(async () => { + for await (const line of readline.createInterface({ input: process.stdin })) { + try { + const q = JSON.parse(line), + ended = []; + if (q.op === 'reset') envs = Array.from({ length: q.n }, () => reset(q.mode)); + else if (q.op === 'step') + for (let i = 0; i < envs.length; i++) { + const e = envs[i]; + if (q.actions[i] === null) continue; + const seat = e.g.currentPlayers[0]; + c.E.move(e.g, c.candidates(e.g, seat)[q.actions[i]], seat); + e.steps++; + advance(e); + if (c.E.ended(e.g) || e.steps >= 1600) + ended.push({ + env: i, + episode: e.id, + truncated: !c.E.ended(e.g), + value: c.E.ended(e.g) ? c.outcome(e.g) : [0, 0, 0], + steps: e.steps, + roles: e.roles, + }); + } + else throw Error('unknown op'); + console.log(JSON.stringify({ observations: envs.map(observation), ended })); + } catch (err) { + console.error(err.stack); + process.exit(1); + } + } +})(); diff --git a/ai/strong/economics.cjs b/ai/strong/economics.cjs new file mode 100644 index 0000000..82344bf --- /dev/null +++ b/ai/strong/economics.cjs @@ -0,0 +1,198 @@ +// Public-information economic calculations. Never inspect the hidden deck or sealed bids. +const c = require('../core.cjs'); +const income = (g, n) => g.paymentTable[Math.max(0, Math.min(g.paymentTable.length - 1, n))]; +function replenishment(g, r, step = g.step) { + return g[r + 'Resupply'][g.players.length - 2][step - 1]; +} +function fuelVariants(pp) { + const base = [0, 0, 0, 0]; + if (pp.type === 4) return Array.from({ length: pp.cost + 1 }, (_, coal) => [coal, pp.cost - coal, 0, 0]); + if (pp.type < 4) base[pp.type] = pp.cost; + return [base]; +} +function plans(g, p, unused = false) { + let result = [{ power: 0, used: [0, 0, 0, 0], plants: [] }]; + for (const pp of p.powerPlants) { + if (unused && !p.powerPlantsNotUsed.includes(pp.number)) continue; + const next = [...result]; + for (const prev of result) + for (const need of fuelVariants(pp)) + next.push({ + power: prev.power + pp.citiesPowered, + used: prev.used.map((x, i) => x + need[i]), + plants: [...prev.plants, pp.number], + }); + result = next; + } + return result; +} +function purchaseCost(g, p, used) { + let cost = 0; + for (let i = 0; i < 4; i++) + for (let k = 0; k < Math.max(0, used[i] - p[c.RES[i] + 'Left']); k++) { + if (k >= g[c.RES[i] + 'Market']) return Infinity; + cost += c.resourcePrice(g, c.RES[i], k); + } + return cost; +} +function plan(g, p, target = p.cities.length, { buy = true, unused = false, budget = p.money, endgame = false } = {}) { + let best = { power: 0, used: [0, 0, 0, 0], plants: [], cost: 0, score: -Infinity }; + for (const option of plans(g, p, unused)) { + if (!buy && option.used.some((n, i) => n > p[c.RES[i] + 'Left'])) continue; + const cost = buy ? purchaseCost(g, p, option.used) : 0; + if (cost > budget) continue; + const powered = Math.min(target, option.power + (unused ? p.citiesPowered : 0)); + const replacement = option.used.reduce((s, n, i) => s + n * c.resourcePrice(g, c.RES[i]), 0); + const score = (endgame ? powered * 1000 : income(g, powered)) - cost - (buy ? 0 : replacement * 0.2); + if (score > best.score) best = { ...option, powered, cost, score }; + } + return best; +} +function demand(g, p) { + return plan(g, p, Math.max(p.cities.length, Math.min(c.capacity(p), p.cities.length + 3))).used; +} +function futurePressure(g, r) { + const i = c.RES.indexOf(r), + needed = g.players.reduce((sum, p) => sum + demand(g, p)[i], 0); + return needed - replenishment(g, r); +} +function context(g, seat) { + const p = g.players[seat], + cap = c.capacity(p), + maxCities = Math.max(...g.players.map((x) => x.cities.length)); + const imminent = maxCities >= g.citiesToEndGame - 3; + const target = Math.min( + g.citiesToEndGame, + Math.max(p.cities.length, Math.min(cap, p.cities.length + (p.cities.length ? 3 : 2))) + ); + const fuel = plan(g, p, target, { budget: Math.max(0, p.money - (p.cities.length ? 0 : 10)), endgame: imminent }); + return { p, cap, maxCities, imminent, target, fuel }; +} +function plantValue(g, p, pp) { + const before = plan(g, p, 22), + currentCap = c.capacity(p); + let best = -Infinity; + const portfolios = + p.powerPlants.length < 3 + ? [[...p.powerPlants, pp]] + : p.powerPlants.map((_, i) => [...p.powerPlants.filter((x, j) => i !== j), pp]); + for (const powerPlants of portfolios) { + const after = plan(g, { ...p, powerPlants }, 22), + gain = powerPlants.reduce((s, x) => s + x.citiesPowered, 0) - currentCap; + const fuelSaving = before.cost - after.cost; + const need = Math.max(0, p.cities.length + 3 - currentCap); + const value = pp.number * 0.55 + gain * (need > 0 ? 10 : 6) + fuelSaving * 2; + best = Math.max(best, value); + } + const reserve = p.cities.length === 0 ? 15 : Math.max(8, Math.min(35, p.cities.length * 1.5)); + return Math.max(0, Math.min(p.money - reserve, best)); +} +function scores(g, seat, actions = c.candidates(g, seat), style = 'economic') { + const x = context(g, seat), + p = x.p; + let production; + if (g.phase === c.E.Phase.Bureaucracy) + production = plan(g, p, p.cities.length, { + buy: false, + unused: true, + endgame: Math.max(...g.players.map((p) => p.cities.length)) >= g.citiesToEndGame, + }); + const building = g.phase === c.E.Phase.Building; + const possible = building ? plan(g, p, p.cities.length + 1, { buy: false }).powered : 0; + const availablePower = building ? plan(g, p, x.cap, { buy: false }).powered : 0; + const opponentPower = building + ? Math.max( + ...g.players + .filter((z) => z.id !== seat) + .map((z) => plan(g, z, z.cities.length + 2, { buy: false }).powered) + ) + : 0; + const bidWorth = g.chosenPowerPlant ? plantValue(g, p, g.chosenPowerPlant) : 0; + return actions.map((a) => { + const d = a.data; + switch (a.name) { + case 'ChoosePowerPlant': { + const pp = g.actualMarket.find((p) => p.number === d); + const v = plantValue(g, p, pp); + return v >= d ? 10 + (v - d) * 0.3 + pp.citiesPowered * 0.3 : -20; + } + case 'Bid': { + const v = bidWorth; + if (g.round === 1 && !actions.some((a) => a.name === 'Pass')) return -d; + return d <= v ? (g.options.fastBid ? 10 - Math.abs(d - v) * 0.5 : 10 - d * 0.2) : -30 - d; + } + case 'DiscardPowerPlant': { + const powerPlants = p.powerPlants.filter((pp) => pp.number !== d); + const pp = plan(g, { ...p, powerPlants }, 22); + return pp.power * 5 - pp.cost; + } + case 'BuyResource': { + const i = c.RES.indexOf(d.resource), + price = c.resourcePrice(g, d.resource); + if (p[d.resource + 'Left'] < x.fuel.used[i]) return 30 - price; + // Stock one extra round only when demand exceeds replenishment and today's price is low. + const surplus = p[d.resource + 'Left'] - x.fuel.used[i], + ownNeed = c.fuelDemand(g, p)[d.resource]; + if ( + style !== 'rush' && + ownNeed > 0 && + surplus < ownNeed && + price <= 2 && + p.money > 35 && + futurePressure(g, d.resource) > 0 + ) + return 4 - price; + return -20; + } + case 'Build': { + const next = p.cities.length + 1; + if (p.money > 140 || g.round > 18) return 10 - d.price * 0.1; + if (next >= g.citiesToEndGame && possible < opponentPower) return -30; + if (next <= x.cap && (next <= availablePower || x.imminent)) return 25 - d.price * 0.35; + if (style === 'rush' && p.money - d.price > 30) return 8 - d.price * 0.15; + return -20; + } + case 'UsePowerPlant': + return production.plants.includes(d.powerPlant) && + c.RES.every((r, i) => d.resourcesSpent.filter((x) => x === r).length <= production.used[i]) + ? 20 + + d.citiesPowered * 0.1 - + d.resourcesSpent.reduce((s, r) => s + c.resourcePrice(g, r), 0) * 0.01 + : -10; + case 'DiscardResources': + return p[d + 'Left'] - x.fuel.used[c.RES.indexOf(d)]; + case 'Pass': + return 0; + default: + return 0; + } + }); +} +function choose(g, seat, rng = () => 0.5, style = 'economic') { + const actions = c.candidates(g, seat), + values = scores(g, seat, actions, style); + let index = 0, + best = -Infinity; + values.forEach((x, i) => { + x += rng() * 0.001; + if (x > best) { + best = x; + index = i; + } + }); + return { index, action: actions[index] }; +} +module.exports = { + income, + replenishment, + fuelVariants, + plans, + purchaseCost, + plan, + demand, + futurePressure, + context, + plantValue, + scores, + choose, +}; diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py new file mode 100644 index 0000000..ee52648 --- /dev/null +++ b/ai/strong/evaluate.py @@ -0,0 +1,83 @@ +"""Independent CPU arena, with reserved seeds and per-rule results.""" + +import sys, argparse, json, time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +import numpy as np +from infer import Model +from pool import EnginePool + +p = argparse.ArgumentParser() +p.add_argument("model") +p.add_argument( + "--opponent", + default="economic", + choices=["economic", "heuristic", "rush", "legacy"], +) +p.add_argument("--games", type=int, default=480) +p.add_argument("--seed", default="strong-screening-v1") +p.add_argument("--output", required=True) +args = p.parse_args() +model = Model(args.model) +pool = EnginePool(4, seed=args.seed, script="ai/strong/bridge.cjs") +current = pool.call({"op": "reset", "n": args.games, "mode": args.opponent})[ + "observations" +] +rows = [] +latency = [] +start = time.perf_counter() +try: + while any(x is not None for x in current): + actions = [] + for x in current: + if x is None: + actions.append(None) + continue + t = time.perf_counter() + a, _ = model.predict(x["state"], x["actions"]) + latency.append(1000 * (time.perf_counter() - t)) + actions.append(a) + r = pool.call({"op": "step", "actions": actions}) + current = r["observations"] + for e in r["ended"]: + seat = e["roles"].index("learner") + rows.append( + { + **e, + "seat": seat, + "variant": "recharged" if e["episode"] % 2 else "original", + "sealed": e["episode"] % 4 < 2, + "win": e["value"][seat], + } + ) +finally: + pool.close() +report = { + "model": args.model, + "model_sha256": model.sha256, + "opponent": args.opponent, + "seed": args.seed, + "games": len(rows), + "win_rate": float(np.mean([r["win"] for r in rows])), + "truncated": sum(r["truncated"] for r in rows), + "seconds": time.perf_counter() - start, + "inference_p95_ms": float(np.percentile(latency, 95)), + "by_rules": [ + { + "variant": v, + "sealed": s, + "games": len([r for r in rows if r["variant"] == v and r["sealed"] == s]), + "win_rate": float( + np.mean( + [r["win"] for r in rows if r["variant"] == v and r["sealed"] == s] + ) + ), + } + for v in ["original", "recharged"] + for s in [False, True] + ], + "results": rows, +} +Path(args.output).write_text(json.dumps(report, indent=2)) +print(json.dumps({k: v for k, v in report.items() if k != "results"})) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json new file mode 100644 index 0000000..dd497d1 --- /dev/null +++ b/ai/strong/experiments.json @@ -0,0 +1,22 @@ +{ + "goal": "Strong play beyond the default bot; ongoing", + "source_archive": "strong-source-v3.tgz", + "source_dataset_commit": "d43f77890c221bdcf232d06e14fe02ec8f59cf54", + "model_repo": "coyotte508/powergrid-ai-germany-v1", + "jobs": { + "strong-smoke-v1": "6abd11a4fbc85ba68235b126", + "strong-league-v2-a": "6abd15cafbc85ba68235b345", + "strong-league-v2-b": "6abd146afbc85ba68235b28d", + "strong-league-v2-c": "6abd15cafbc85ba68235b347", + "strong-league-v2-d": "6abd15ca404719ba376134e5", + "search-reference-v1": "6abd1314404719ba376133b5" + }, + "cancelled_while_queued": [ + "6abd128efbc85ba68235b1a6", + "6abd146b404719ba37613448", + "6abd146bfbc85ba68235b291", + "6abd146bfbc85ba68235b28f" + ], + "heldout_final_seed_prefix": "strong-final-reserved-v1", + "final_seed_prefix_used": false +} diff --git a/ai/strong/features.cjs b/ai/strong/features.cjs new file mode 100644 index 0000000..17b8b24 --- /dev/null +++ b/ai/strong/features.cjs @@ -0,0 +1,82 @@ +const c = require('../core.cjs'), + eco = require('./economics.cjs'); +const SCHEMA = 3; +const spatial = require('./spatial.cjs'); +function observe(g, seat, geometry) { + const state = c.observe(g, seat), + order = [seat, (seat + 1) % 3, (seat + 2) % 3]; + for (const r of c.RES) { + const supplies = g[r + 'Resupply'][g.players.length - 2]; + state.push(...supplies.map((n) => n / 12), c.resourcePrice(g, r) / 20); + // Exact capped refill available now, and shared demand under full portfolio use. + state.push(Math.min(g[r + 'Supply'], eco.replenishment(g, r), g[r + 'Prices'].length - g[r + 'Market']) / 24); + } + state.push(g.currentPlayers.length / 3, ...order.map((i) => +g.currentPlayers.includes(i))); + for (const id of order) { + const p = g.players[id], + desired = eco.demand(g, p), + fuelled = eco.plan(g, p, 22, { buy: false }); + state.push( + c.capacity(p) / 22, + fuelled.power / 22, + ...desired.map((n) => n / 12), + ...p.powerPlants.slice(0, 4).map((pp) => +p.powerPlantsNotUsed.includes(pp.number)), + ...Array(Math.max(0, 4 - p.powerPlants.length)).fill(0) + ); + state.push(...Array.from({ length: 4 }, (_, i) => +(p.powerPlants[i]?.type === 6))); + const rank = g.playerOrder.indexOf(id); + state.push(rank / 2, (2 - rank) / 2, +!p.passed, +!p.skipAuction); + for (const r of c.RES) { + const i = c.RES.indexOf(r); + state.push(Math.max(0, desired[i] - p[r + 'Left']) / 12); + } + } + state.push(...g.paymentTable.slice(0, 23).map((n) => n / 200)); + if (!state.every(Number.isFinite)) throw Error('nonfinite strong observation'); + return [...state, ...spatial.stateFeatures(g, seat, geometry)]; +} +function encode(g, seat) { + const moves = c.candidates(g, seat), + prior = eco.scores(g, seat, moves), + p = g.players[seat]; + const best = Math.max(...prior); + const geometry = spatial.territories(g, seat), + worth = new Map(), + ownDemand = eco.demand(g, p); + const plantWorth = (pp) => { + if (!worth.has(pp.number)) worth.set(pp.number, eco.plantValue(g, p, pp)); + return worth.get(pp.number); + }; + const actions = moves.map((a, i) => { + const pp = a.name === 'ChoosePowerPlant' ? g.actualMarket.find((p) => p.number === a.data) : g.chosenPowerPlant; + const cost = + a.name === 'BuyResource' + ? c.resourcePrice(g, a.data.resource) + : a.name === 'Bid' + ? a.data + : a.data?.price || 0; + const extra = [ + Math.max(-10, Math.min(10, prior[i] / 10)), + +(prior[i] === best), + cost / Math.max(1, p.money), + Math.max(0, p.money - cost) / 200, + ]; + if (pp) extra.push(plantWorth(pp) / 200, pp.citiesPowered / 8, pp.cost / 4); + else extra.push(0, 0, 0); + if (a.name === 'BuyResource') { + const r = a.data.resource, + j = c.RES.indexOf(r); + extra.push(eco.replenishment(g, r) / 12, (ownDemand[j] - p[r + 'Left']) / 12); + } else extra.push(0, 0); + return [...c.actionFeatures(g, seat, a), ...extra, ...spatial.actionFeatures(g, seat, a, geometry)]; + }); + return { + state: observe(g, seat, geometry), + actions, + moves, + prior: prior.map((x) => Math.max(-10, Math.min(10, x / 10))), + teacher: prior.indexOf(best), + seat, + }; +} +module.exports = { SCHEMA, observe, encode }; diff --git a/ai/strong/infer.py b/ai/strong/infer.py new file mode 100644 index 0000000..3b4b164 --- /dev/null +++ b/ai/strong/infer.py @@ -0,0 +1,49 @@ +"""Persistent CPU ONNX worker for schema 3 public-information states.""" + +import sys, json, argparse, time +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +from infer import Model, Node + +p = argparse.ArgumentParser() +p.add_argument("model") +args = p.parse_args() +model = Model(args.model) +node = Node("strong/worker.cjs") +try: + for line in sys.stdin: + q = {} + try: + obj = json.loads(line) + if not isinstance(obj, dict): + raise ValueError("Expected object") + q = obj + start = time.perf_counter() + r = node.call(q) + if "error" in r: + raise ValueError(r["error"]) + index, values = model.predict(r["state"], r["actions"]) + print( + json.dumps( + { + "requestId": q.get("requestId"), + "revision": q.get("revision"), + "move": r["moves"][index], + "winProbabilities": values, + "valueStatus": "uncalibrated-training-opponents", + "playerOrder": r["playerOrder"], + "schema": 3, + "modelSha256": model.sha256, + "elapsedMs": 1000 * (time.perf_counter() - start), + } + ), + flush=True, + ) + except Exception as e: + print( + json.dumps({"requestId": q.get("requestId"), "error": str(e)}), + flush=True, + ) +finally: + node.close() diff --git a/ai/strong/launch-a.sh b/ai/strong/launch-a.sh new file mode 100644 index 0000000..9efe361 --- /dev/null +++ b/ai/strong/launch-a.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor a10g-large --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=strong-league-v2-a --env TRAIN_SEED=201 --env LR=.0001 --env ENTROPY=.01 --env ANCHOR=.01 --env UPDATES=300 --env EVAL_EVERY=20 \ + --env ENVS=128 --env WORKERS=8 --env BATCH_SIZE=512 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=strong-league-v2-a \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v3.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/launch-b.sh b/ai/strong/launch-b.sh new file mode 100644 index 0000000..a1dc035 --- /dev/null +++ b/ai/strong/launch-b.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor l4x1 --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=strong-league-v2-b --env TRAIN_SEED=202 --env LR=.0003 --env ENTROPY=.01 --env ANCHOR=.01 --env UPDATES=300 --env EVAL_EVERY=20 \ + --env ENVS=128 --env WORKERS=4 --env BATCH_SIZE=512 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=strong-league-v2-b \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v3.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/launch-c.sh b/ai/strong/launch-c.sh new file mode 100644 index 0000000..3130c3b --- /dev/null +++ b/ai/strong/launch-c.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor h200 --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=strong-league-v2-c --env TRAIN_SEED=203 --env LR=.0001 --env ENTROPY=.025 --env ANCHOR=.003 --env UPDATES=300 --env EVAL_EVERY=20 \ + --env ENVS=128 --env WORKERS=12 --env BATCH_SIZE=512 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=strong-league-v2-c \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v3.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/launch-d.sh b/ai/strong/launch-d.sh new file mode 100644 index 0000000..925cfa7 --- /dev/null +++ b/ai/strong/launch-d.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor a10g-large --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=strong-league-v2-d --env TRAIN_SEED=204 --env LR=.0003 --env ENTROPY=.025 --env ANCHOR=.003 --env UPDATES=300 --env EVAL_EVERY=20 \ + --env ENVS=128 --env WORKERS=8 --env BATCH_SIZE=512 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=strong-league-v2-d \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v3.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/launch-population.sh b/ai/strong/launch-population.sh new file mode 100644 index 0000000..d49110a --- /dev/null +++ b/ai/strong/launch-population.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor l4x4 --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=strong-league-v1 --env UPDATES=300 --env EVAL_EVERY=20 \ + --env ENVS=128 --env WORKERS=8 --env BATCH_SIZE=512 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=strong-league-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v2.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/population.py +' diff --git a/ai/strong/launch-search.sh b/ai/strong/launch-search.sh new file mode 100644 index 0000000..5eae366 --- /dev/null +++ b/ai/strong/launch-search.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=search-reference-v1 --env UPDATES=2 --env EVAL_EVERY=10 \ + --env ENVS=32 --env WORKERS=4 --env BATCH_SIZE=1024 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=search-reference-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"search-source-v1.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/search-benchmark.py +' diff --git a/ai/strong/launch-smoke.sh b/ai/strong/launch-smoke.sh new file mode 100644 index 0000000..8935c73 --- /dev/null +++ b/ai/strong/launch-smoke.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor l4x1 --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=strong-smoke-v1 --env UPDATES=2 --env EVAL_EVERY=10 \ + --env ENVS=32 --env WORKERS=4 --env BATCH_SIZE=1024 --env ROLLOUT_SAMPLES=8000 \ + --label project=powergrid-ai --label stage=strong-smoke-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v1.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/model.py b/ai/strong/model.py new file mode 100644 index 0000000..bb5df46 --- /dev/null +++ b/ai/strong/model.py @@ -0,0 +1,45 @@ +import numpy as np +import torch +from torch import nn + + +class Policy(nn.Module): + def __init__(self, sd=738, ad=96, width=384): + super().__init__() + self.state = nn.Sequential( + nn.Linear(sd, width), + nn.LayerNorm(width), + nn.SiLU(), + nn.Linear(width, width), + nn.SiLU(), + ) + self.action = nn.Sequential(nn.Linear(ad, 128), nn.SiLU()) + self.score = nn.Sequential( + nn.Linear(width + 128, 256), nn.SiLU(), nn.Linear(256, 1) + ) + self.value = nn.Sequential(nn.Linear(width, 128), nn.SiLU(), nn.Linear(128, 3)) + nn.init.zeros_(self.score[-1].weight) + nn.init.zeros_(self.score[-1].bias) + + def forward(self, state, actions, mask): + s = self.state(state) + a = self.action(actions) + residual = self.score( + torch.cat((s[:, None, :].expand(-1, a.shape[1], -1), a), -1) + ).squeeze(-1) + # Start from a competent public-information policy; learn corrections. + logits = actions[:, :, 74] * 2 + residual + return logits.masked_fill(~mask, -1e9), self.value(s).softmax(-1) + + +def tensors(rows, device): + n = len(rows) + m = max(len(r["actions"]) for r in rows) + ad = len(rows[0]["actions"][0]) + state = np.asarray([r["state"] for r in rows], np.float32) + actions = np.zeros((n, m, ad), np.float32) + mask = np.zeros((n, m), bool) + for i, r in enumerate(rows): + actions[i, : len(r["actions"])] = r["actions"] + mask[i, : len(r["actions"])] = True + return tuple(torch.from_numpy(a).to(device) for a in [state, actions, mask]) diff --git a/ai/strong/population.py b/ai/strong/population.py new file mode 100644 index 0000000..db5e649 --- /dev/null +++ b/ai/strong/population.py @@ -0,0 +1,32 @@ +"""Independent learners on four GPUs; each learns against a frozen-policy league.""" + +import os, subprocess, json + +configs = [ + ("a", "0.0001", ".01", ".01"), + ("b", "0.0003", ".01", ".01"), + ("c", "0.0001", ".025", ".003"), + ("d", "0.0003", ".025", ".003"), +] +processes = [] +for i, (name, lr, entropy, anchor) in enumerate(configs): + env = { + **os.environ, + "CUDA_VISIBLE_DEVICES": str(i), + "RUN_NAME": "strong-league-v1-" + name, + "TRAIN_SEED": str(201 + i), + "LR": lr, + "ENTROPY": entropy, + "ANCHOR": anchor, + } + processes.append( + (name, subprocess.Popen(["python", "-u", "ai/strong/train.py"], env=env)) + ) +failed = [] +for name, p in processes: + code = p.wait() + if code: + failed.append({"learner": name, "exit": code}) +print(json.dumps({"population_completed": not failed, "failures": failed}), flush=True) +if failed: + raise SystemExit(1) diff --git a/ai/strong/public-graph.cjs b/ai/strong/public-graph.cjs new file mode 100644 index 0000000..46ec691 --- /dev/null +++ b/ai/strong/public-graph.cjs @@ -0,0 +1,53 @@ +// Explicit map topology for multi-map policy work. Only public game fields are read. +function encode(g, seat) { + const order = Array.from({ length: g.players.length }, (_, i) => (seat + i) % g.players.length); + const cities = [...g.map.cities].sort((a, b) => a.name.localeCompare(b.name)); + const index = new Map(cities.map((c, i) => [c.name, i])); + const regions = [...new Set(cities.map((c) => c.region || 'main'))].sort(), + islands = [...new Set(cities.map((c) => c.island || 'main'))].sort(); + const nodes = cities.map((city) => { + const owners = order.map((id) => +g.players[id].cities.some((c) => c.name === city.name)), + occupied = owners.reduce((a, b) => a + b, 0); + const capacity = city.singleOccupancy ? 1 : city.slotCosts?.length ?? 3, + slots = city.singleOccupancy ? 1 : city.stepSlots?.[g.step - 1] ?? g.step; + const permanentBlocked = !!g.blockedCities?.includes(city.name), + available = !permanentBlocked && !(city.transregional && g.step < 2); + return { + name: city.name, + region: regions.indexOf(city.region || 'main'), + island: islands.indexOf(city.island || 'main'), + owners, + openSlots: available ? Math.max(0, Math.min(capacity, slots) - occupied) : 0, + futureSlots: permanentBlocked ? 0 : Math.max(0, capacity - occupied), + slotCosts: city.slotCosts || [10, 15, 20], + stepSlots: city.stepSlots || [1, 2, 3], + transregional: !!city.transregional, + nuclearBanned: !!g.map.noUraniumRegions?.includes(city.region), + blocked: permanentBlocked, + }; + }); + const edges = g.map.connections + .filter((e) => e.nodes.every((n) => index.has(n))) + .map((e) => ({ a: index.get(e.nodes[0]), b: index.get(e.nodes[1]), cost: e.cost })); + return { + nodes, + edges, + regions, + islands, + crossIslandSurcharge: g.map.crossIslandSurcharge || 0, + playerOrder: order.map((id) => g.playerOrder.indexOf(id)), + currentPlayers: order.map((id) => g.currentPlayers.includes(id)), + players: order.map((id) => ({ + cities: g.players[id].cities.length, + money: g.players[id].money, + powerPlants: g.players[id].powerPlants.map((p) => ({ + number: p.number, + type: p.type, + cost: p.cost, + citiesPowered: p.citiesPowered, + })), + fuel: ['coal', 'oil', 'garbage', 'uranium'].map((r) => g.players[id][r + 'Left']), + })), + }; +} +module.exports = { encode }; diff --git a/ai/strong/search-benchmark.py b/ai/strong/search-benchmark.py new file mode 100644 index 0000000..0d6068f --- /dev/null +++ b/ai/strong/search-benchmark.py @@ -0,0 +1,40 @@ +import os, json, subprocess, concurrent.futures +from pathlib import Path +from huggingface_hub import HfApi + + +def run(pair): + seed, opponent = pair + result = subprocess.run( + ["node", "ai/strong/tournament.cjs", "search", opponent], + env={**os.environ, "SEEDS": "1", "SEED_START": str(seed)}, + text=True, + capture_output=True, + check=True, + ) + report = json.loads(result.stdout) + print( + json.dumps({"seed": seed, "opponent": opponent, "win": report["win"]}), + flush=True, + ) + return report + + +with concurrent.futures.ThreadPoolExecutor(24) as pool: + reports = list( + pool.map( + run, + [ + (seed, opponent) + for seed in range(20) + for opponent in ["economic", "heuristic"] + ], + ) + ) +p = Path("search-evaluation.json") +p.write_text(json.dumps(reports)) +HfApi().upload_file( + repo_id=os.environ["HF_MODEL_REPO"], + path_or_fileobj=str(p), + path_in_repo="runs/search-reference-v1/evaluation.json", +) diff --git a/ai/strong/search.cjs b/ai/strong/search.cjs new file mode 100644 index 0000000..5e8579f --- /dev/null +++ b/ai/strong/search.cjs @@ -0,0 +1,53 @@ +// Public-belief rollout search. The live draw pile and sealed bids are never replayed. +const c = require('../core.cjs'), + eco = require('./economics.cjs'); +const { createAnalysisScenario } = require('../../engine/dist/src/analysis.js'); +function shortlist(g, seat, limit = 5) { + const a = c.candidates(g, seat), + v = eco.scores(g, seat, a), + indices = [...a.keys()].sort((i, j) => v[j] - v[i]); + const chosen = new Set(indices.slice(0, Math.max(1, limit - 2))); + const pass = a.findIndex((x) => x.name === 'Pass'); + if (pass >= 0) chosen.add(pass); + chosen.add(c.heuristic(g, seat).index); + // A sampled middle bid helps find strategic bids not selected by the greedy prior. + const bids = indices.filter((i) => a[i].name === 'Bid'); + if (bids.length > 4) chosen.add(bids[Math.floor(bids.length / 2)]); + return [...chosen].slice(0, limit); +} +function choose(g, seat, { samples = 6, candidates = 5, seed = 'public-search', maxSteps = 1200 } = {}) { + const actions = c.candidates(g, seat), + options = shortlist(g, seat, candidates); + if (options.length === 1) return { index: options[0], action: actions[options[0]], evaluations: 0 }; + const totals = Object.fromEntries(options.map((i) => [i, 0])); + let evaluations = 0, + truncated = 0; + for (let sample = 0; sample < samples; sample++) { + const scenario = createAnalysisScenario(g, { player: seat, seed: seed + '-' + sample }); + for (const index of options) { + const sim = structuredClone(scenario), + rng = c.seedrandom(seed + '-rollout-' + sample); + c.E.move(sim, structuredClone(actions[index]), seat); + let step = 0; + while (!c.E.ended(sim) && step++ < maxSteps) { + const p = sim.currentPlayers[0]; + const move = sample % 2 ? c.heuristic(sim, p, rng).action : eco.choose(sim, p, rng).action; + c.E.move(sim, move, p); + } + if (c.E.ended(sim)) totals[index] += c.outcome(sim)[seat]; + else truncated++; + evaluations++; + } + } + const prior = eco.scores(g, seat, actions); + const index = options.sort((a, b) => totals[b] - totals[a] || prior[b] - prior[a])[0]; + return { + index, + action: actions[index], + evaluations, + truncated, + winEstimate: totals[index] / samples, + values: totals, + }; +} +module.exports = { choose, shortlist }; diff --git a/ai/strong/spatial.cjs b/ai/strong/spatial.cjs new file mode 100644 index 0000000..d6b3452 --- /dev/null +++ b/ai/strong/spatial.cjs @@ -0,0 +1,78 @@ +// Map-derived territory features. Region and island labels come from the engine. +function orderAfterBuild(g, seat) { + return g.players + .map((p) => ({ + id: p.id, + cities: p.cities.length + (p.id === seat ? 1 : 0), + plant: Math.max(0, ...p.powerPlants.map((x) => x.number)), + })) + .sort((a, b) => b.cities - a.cities || b.plant - a.plant) + .map((p) => p.id); +} +function territories(g, seat) { + const order = Array.from({ length: g.players.length }, (_, i) => (seat + i) % g.players.length); + const groups = (key) => + [...new Set(g.map.cities.map((c) => c[key] || 'main'))].sort().map((name) => { + const cities = g.map.cities.filter((c) => (c[key] || 'main') === name); + let empty = 0, + open = 0, + totalFree = 0; + for (const city of cities) { + const occupied = g.players.filter((p) => p.cities.some((c) => c.name === city.name)).length; + const slots = city.singleOccupancy ? 1 : city.stepSlots?.[g.step - 1] ?? g.step, + capacity = city.singleOccupancy ? 1 : city.slotCosts?.length ?? 3; + const blocked = g.blockedCities?.includes(city.name) || (city.transregional && g.step < 2); + empty += +(!occupied && !blocked); + open += blocked ? 0 : Math.max(0, Math.min(slots, capacity) - occupied); + totalFree += blocked ? 0 : Math.max(0, capacity - occupied); + } + return { + name, + size: cities.length, + empty, + open, + totalFree, + owned: order.map( + (id) => g.players[id].cities.filter((c) => cities.some((x) => x.name === c.name)).length + ), + }; + }); + return { regions: groups('region'), islands: groups('island') }; +} +function stateFeatures(g, seat, context) { + const t = context || territories(g, seat), + v = []; + for (const [groups, max] of [ + [t.regions, 8], + [t.islands, 4], + ]) + for (let i = 0; i < max; i++) { + const x = groups[i]; + v.push( + ...(x + ? [x.size / 64, x.empty / 64, x.open / 64, x.totalFree / 128, ...x.owned.map((n) => n / 22)] + : Array(4 + g.players.length).fill(0)) + ); + } + v.push((g.map.crossIslandSurcharge || 0) / 100); + return v; +} +function actionFeatures(g, seat, action, context) { + const order = Array.from({ length: g.players.length }, (_, i) => (seat + i) % g.players.length), + newOrder = orderAfterBuild(g, seat); + if (action.name !== 'Build') return Array(4 + 3 * g.players.length).fill(0); + const city = g.map.cities.find((c) => c.name === action.data.name), + t = context || territories(g, seat), + region = t.regions.find((x) => x.name === (city.region || 'main')), + island = t.islands.find((x) => x.name === (city.island || 'main')); + return [ + ...order.map((id) => newOrder.indexOf(id) / Math.max(1, g.players.length - 1)), + ...region.owned.map((n) => n / 22), + ...island.owned.map((n) => n / 22), + region.open / 64, + island.open / 64, + +(island.owned[0] === 0), + g.map.connections.filter((e) => e.nodes.includes(city.name)).length / 8, + ]; +} +module.exports = { territories, stateFeatures, actionFeatures, orderAfterBuild }; diff --git a/ai/strong/test.cjs b/ai/strong/test.cjs new file mode 100644 index 0000000..d666b46 --- /dev/null +++ b/ai/strong/test.cjs @@ -0,0 +1,95 @@ +const test = require('node:test'), + assert = require('node:assert/strict'), + c = require('../core.cjs'), + f = require('./features.cjs'), + spatial = require('./spatial.cjs'), + eco = require('./economics.cjs'); +test('restock, acting players, holdings and cities are observable; sealed values are not', () => { + const g = c.start('information', 'recharged', true), + seat = g.currentPlayers[0], + original = f.encode(g, seat); + g.players[(seat + 1) % 3].bid = 999; + g.currentBid = 999; + g.powerPlantsDeck.reverse(); + g.seed = 'secret'; + assert.deepEqual(f.encode(g, seat), original); + g.coalResupply[1][0]++; + assert.notDeepEqual(f.observe(g, seat), original.state); + const before = f.observe(g, seat); + g.players[(seat + 1) % 3].cities.push({ name: g.map.cities[0].name, position: 0 }); + assert.notDeepEqual(f.observe(g, seat), before); + assert.equal(original.state.length, 738); + assert.ok(original.actions.every((a) => a.length === 96 && a.every(Number.isFinite))); +}); +test('UK/Ireland tracks opponent presence and empty slots on both islands', () => { + const g = c.E.setup(3, { map: 'UK & Ireland' }, 'islands'), + gb = g.map.cities.find((c) => c.island === 'gb'), + ie = g.map.cities.find((c) => c.island === 'ie'); + const initial = spatial.territories(g, 0); + g.players[1].cities.push({ name: gb.name, position: 0 }); + let t = spatial.territories(g, 0); + assert.equal(t.islands.find((x) => x.name === 'gb').owned[1], 1); + assert.equal(t.islands.find((x) => x.name === 'ie').owned[1], 0); + g.players[1].cities.push({ name: ie.name, position: 0 }); + t = spatial.territories(g, 0); + assert.ok(t.islands.every((x) => x.owned[1] === 1)); + for (const island of t.islands) { + const old = initial.islands.find((x) => x.name === island.name); + assert.equal(island.empty, old.empty - 1); + assert.equal(island.open, old.open - 1); + } +}); +test('projected order uses cities and highest-plant tie break', () => { + const g = c.start('order'); + g.players[0].cities = [{ name: 'a' }]; + g.players[1].cities = [{ name: 'b' }, { name: 'c' }]; + g.players[0].powerPlants = [{ number: 20 }]; + g.players[1].powerPlants = [{ number: 10 }]; + assert.equal(spatial.orderAfterBuild(g, 0)[0], 0); +}); +test('economic production consumes a feasible fuel combination and completes games', () => { + for (let i = 0; i < 12; i++) { + const g = c.start('strong-legal-' + i, i % 2 ? 'recharged' : 'original', i % 4 < 2), + rng = c.seedrandom('tie' + i); + let steps = 0; + while (!c.E.ended(g) && steps++ < 1800) { + const p = g.currentPlayers[0], + x = eco.choose(g, p, rng); + assert.ok(Number.isFinite(eco.scores(g, p, [x.action])[0])); + c.E.move(g, x.action, p); + } + assert.ok(c.E.ended(g)); + } +}); + +test('search choices do not change with hidden deck order or sealed bid amounts', () => { + const search = require('./search.cjs'), + g = c.start('search-info', 'original', true); + let p = g.currentPlayers[0]; + c.E.move(g, c.candidates(g, p)[0], p); + p = g.currentPlayers[0]; + const first = search.choose(g, p, { samples: 2, candidates: 3, seed: 'same-belief', maxSteps: 700 }); + g.powerPlantsDeck.reverse(); + g.players.forEach((x, i) => { + if (i !== p) x.bid = 123; + }); + g.currentBid = 456; + g.hiddenLog = [{ secret: 'not observable' }]; + const second = search.choose(g, p, { samples: 2, candidates: 3, seed: 'same-belief', maxSteps: 700 }); + assert.equal(first.index, second.index); + assert.deepEqual(first.values, second.values); +}); + +test('public topology preserves map edges, ownership and island crossing rule', () => { + const graph = require('./public-graph.cjs'); + for (const map of ['Germany', 'UK & Ireland', 'USA', 'France']) { + const g = c.E.setup(3, { map }, 'graph'); + const x = graph.encode(g, 0); + assert.equal(x.nodes.length, g.map.cities.length); + assert.ok(x.edges.every((e) => e.a >= 0 && e.b >= 0 && e.cost >= 0)); + g.seed = 'private'; + g.powerPlantsDeck.reverse(); + g.players[1].bid = 999; + assert.deepEqual(graph.encode(g, 0), x); + } +}); diff --git a/ai/strong/tournament.cjs b/ai/strong/tournament.cjs new file mode 100644 index 0000000..e332755 --- /dev/null +++ b/ai/strong/tournament.cjs @@ -0,0 +1,74 @@ +const c = require('../core.cjs'), + eco = require('./economics.cjs'), + search = require('./search.cjs'); +const seeds = +(process.env.SEEDS || 20), + candidate = process.argv[2] || 'economic', + opponent = process.argv[3] || 'heuristic'; +function play(g, p, type, rng) { + if (type === 'search') { + const legal = c.candidates(g, p), + strategic = legal.length > 1 && legal.some((a) => ['ChoosePowerPlant', 'Bid', 'Build'].includes(a.name)); + return c.E.move( + g, + strategic + ? search.choose(g, p, { + samples: 4, + candidates: 5, + seed: 'search-' + g.round + '-' + p + '-' + Math.floor(rng() * 1e9), + }).action + : eco.choose(g, p, rng).action, + p + ); + } + if (type === 'legacy') { + const old = Math.random; + Math.random = rng; + try { + return c.E.moveAI(g, p); + } finally { + Math.random = old; + } + } + return c.E.move(g, type === 'heuristic' ? c.heuristic(g, p, rng).action : eco.choose(g, p, rng, type).action, p); +} +let results = []; +for (const variant of ['original', 'recharged']) + for (const sealed of [false, true]) { + for (let seed = +(process.env.SEED_START || 0); seed < +(process.env.SEED_START || 0) + seeds; seed++) + for (let seat = 0; seat < 3; seat++) { + let g = c.start('strong-dev-' + seed, variant, sealed), + rng = c.seedrandom('strong-' + seed), + steps = 0; + while (!c.E.ended(g) && steps++ < 1600) { + const p = g.currentPlayers[0]; + g = play(g, p, p === seat ? candidate : opponent, rng); + } + results.push({ + variant, + sealed, + seed, + seat, + steps, + truncated: !c.E.ended(g), + win: c.E.ended(g) ? c.outcome(g)[seat] : 0, + }); + } + const rows = results.filter((r) => r.variant === variant && r.sealed === sealed); + console.error( + JSON.stringify({ + variant, + sealed, + win: rows.reduce((s, r) => s + r.win, 0) / rows.length, + truncated: rows.filter((r) => r.truncated).length, + }) + ); + } +console.log( + JSON.stringify({ + candidate, + opponent, + seeds, + win: results.reduce((s, r) => s + r.win, 0) / results.length, + results, + }) +); diff --git a/ai/strong/train.py b/ai/strong/train.py new file mode 100644 index 0000000..09d16e7 --- /dev/null +++ b/ai/strong/train.py @@ -0,0 +1,287 @@ +"""Complete-episode PPO against a mixture of economic bots and self-play. +All optimization runs on HF Jobs. No unfinished episodes cross policy updates. +""" + +import os, sys, json, time, random, copy +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +import numpy as np +import torch +from torch.distributions import Categorical +from model import Policy, tensors +from pool import EnginePool +from huggingface_hub import HfApi + +seed = int(os.getenv("TRAIN_SEED", "101")) +random.seed(seed) +np.random.seed(seed) +torch.manual_seed(seed) +torch.set_num_threads(2) +device = "cuda" +assert torch.cuda.is_available(), "Training must run on a GPU HF Job" +net = Policy().to(device) +optimizer = torch.optim.AdamW( + net.parameters(), lr=float(os.getenv("LR", "0.00015")), weight_decay=1e-5 +) +run = os.getenv("RUN_NAME", "strong-smoke") +out = Path("ai/runs") / run +out.mkdir(parents=True, exist_ok=True) +workers = int(os.getenv("WORKERS", "4")) +nenv = int(os.getenv("ENVS", "64")) +batchsize = int(os.getenv("BATCH_SIZE", "512")) +updates = int(os.getenv("UPDATES", "10")) +rollout = EnginePool( + workers, seed=f"strong-train-{seed}", script="ai/strong/bridge.cjs" +) +snapshots = [copy.deepcopy(net).eval()] +metrics = [] +best = -1 + + +def save(name, export=False): + torch.save( + { + "state_dim": 738, + "action_dim": 96, + "schema": 3, + "state_dict": {k: v.detach().cpu() for k, v in net.state_dict().items()}, + }, + out / (name + ".pt"), + ) + if export: + clone = copy.deepcopy(net).cpu().eval() + torch.onnx.export( + clone, + ( + torch.zeros(1, 738), + torch.zeros(1, 8, 96), + torch.ones(1, 8, dtype=torch.bool), + ), + str(out / (name + ".onnx")), + input_names=["state", "actions", "mask"], + output_names=["logits", "value"], + dynamic_axes={ + "state": {0: "batch"}, + "actions": {0: "batch", 1: "candidates"}, + "mask": {0: "batch", 1: "candidates"}, + "logits": {0: "batch", 1: "candidates"}, + "value": {0: "batch"}, + }, + opset_version=17, + dynamo=False, + ) + (out / "metrics.json").write_text(json.dumps(metrics, indent=2)) + (out / "schema.json").write_text( + json.dumps( + { + "version": 3, + "state_dim": 738, + "action_dim": 96, + "players": 3, + "map": "Germany", + "information": "all money public, sealed bids/deck/queued plans excluded", + "run": run, + "seed": seed, + } + ) + ) + HfApi().upload_folder( + repo_id=os.environ["HF_MODEL_REPO"], + folder_path=str(out), + path_in_repo="runs/" + run, + ignore_patterns=["*.tmp"], + ) + + +def evaluate(update): + pool = EnginePool(4, seed="strong-development-v1", script="ai/strong/bridge.cjs") + result = {} + try: + for mode in ["economic", "heuristic", "rush", "legacy"]: + current = pool.call({"op": "reset", "n": 96, "mode": mode})["observations"] + ends = [] + while any(x is not None for x in current): + live = [i for i, x in enumerate(current) if x is not None] + rows = [current[i] for i in live] + with torch.no_grad(): + logits, _ = net(*tensors(rows, device)) + chosen = logits.argmax(-1).cpu().tolist() + actions = [None] * len(current) + for i, a in zip(live, chosen): + actions[i] = a + r = pool.call({"op": "step", "actions": actions}) + current = r["observations"] + ends.extend(r["ended"]) + wins = [ + sum( + e["value"][i] + for i, role in enumerate(e["roles"]) + if role == "learner" + ) + for e in ends + ] + result[mode] = { + "win": float(np.mean(wins)), + "truncated": sum(e["truncated"] for e in ends), + "games": len(ends), + } + finally: + pool.close() + print( + json.dumps( + {"stage": "evaluation", "run": run, "update": update, "results": result} + ), + flush=True, + ) + return result + + +try: + print( + json.dumps( + { + "run": run, + "parameters": sum(p.numel() for p in net.parameters()), + "workers": workers, + "envs": nenv, + "gpu": torch.cuda.get_device_name(), + } + ), + flush=True, + ) + for update in range(updates): + start = time.perf_counter() + current = rollout.call({"op": "reset", "n": nenv, "mode": "mixed"})[ + "observations" + ] + pending = [[] for _ in range(nenv)] + batch = [] + endings = [] + decisions = 0 + net.eval() + while any(x is not None for x in current): + live = [i for i, x in enumerate(current) if x is not None] + rows = [current[i] for i in live] + choice = [0] * len(rows) + logps = [0.0] * len(rows) + values = [[0.0, 0.0, 0.0]] * len(rows) + roles = {r["roles"][r["seat"]] for r in rows} + for role in roles: + indices = [ + j for j, r in enumerate(rows) if r["roles"][r["seat"]] == role + ] + actor = ( + net + if role == "learner" + else snapshots[int(role[-1]) % len(snapshots)] + ) + with torch.no_grad(): + logits, vs = actor(*tensors([rows[j] for j in indices], device)) + distribution = Categorical(logits=logits) + selected = ( + distribution.sample() + if role == "learner" + else logits.argmax(-1) + ) + logs = distribution.log_prob(selected).cpu().tolist() + vals = vs.cpu().tolist() + selected = selected.cpu().tolist() + for j, a, lp, v in zip(indices, selected, logs, vals): + choice[j] = a + logps[j] = lp + values[j] = v + actions = [None] * nenv + for j, i in enumerate(live): + actions[i] = choice[j] + if current[i]["roles"][current[i]["seat"]] != "learner": + continue + pending[i].append( + { + **current[i], + "choice": choice[j], + "oldlogp": logps[j], + "oldvalue": values[j][0], + } + ) + decisions += 1 + reply = rollout.call({"op": "step", "actions": actions}) + current = reply["observations"] + for end in reply["ended"]: + endings.append(end) + if not end["truncated"]: + for r in pending[end["env"]]: + r["value"] = [ + end["value"][(r["seat"] + j) % 3] for j in range(3) + ] + r["advantage"] = r["value"][0] - r["oldvalue"] + batch.append(r) + pending[end["env"]] = [] + rollout_seconds = time.perf_counter() - start + if not batch: + raise RuntimeError("No completed training episodes") + advantages = np.array([r["advantage"] for r in batch]) + mean = advantages.mean() + std = advantages.std() + 1e-6 + losses = [] + net.train() + for epoch in range(3): + random.shuffle(batch) + for k in range(0, len(batch), batchsize): + rows = batch[k : k + batchsize] + x = tensors(rows, device) + logits, value = net(*x) + dist = Categorical(logits=logits) + act = torch.tensor([r["choice"] for r in rows], device=device) + old = torch.tensor([r["oldlogp"] for r in rows], device=device) + adv = torch.tensor( + [(r["advantage"] - mean) / std for r in rows], + device=device, + dtype=torch.float32, + ) + target = torch.tensor([r["value"] for r in rows], device=device) + ratio = (dist.log_prob(act) - old).exp() + pg = -torch.minimum(ratio * adv, ratio.clamp(0.8, 1.2) * adv).mean() + anchor = (x[1][:, :, 74] * 2).masked_fill(~x[2], -1e9).softmax(-1) + kl = torch.nn.functional.kl_div( + logits.log_softmax(-1), anchor, reduction="batchmean" + ) + loss = ( + pg + + 0.5 * ((value - target) ** 2).mean() + - float(os.getenv("ENTROPY", ".01")) * dist.entropy().mean() + + float(os.getenv("ANCHOR", ".01")) * kl + ) + optimizer.zero_grad() + loss.backward() + torch.nn.utils.clip_grad_norm_(net.parameters(), 1) + optimizer.step() + losses.append(float(loss.detach())) + metric = { + "stage": "train", + "run": run, + "update": update, + "episodes": len(endings), + "truncated": sum(x["truncated"] for x in endings), + "samples": len(batch), + "rollout_seconds": rollout_seconds, + "seconds": time.perf_counter() - start, + "loss": float(np.mean(losses)), + } + metrics.append(metric) + print(json.dumps(metric), flush=True) + if update % int(os.getenv("EVAL_EVERY", "10")) == 0 or update == updates - 1: + net.eval() + evaluation = evaluate(update) + metrics.append({"stage": "evaluation", "update": update, **evaluation}) + score = np.mean( + [evaluation[x]["win"] for x in ["economic", "heuristic", "rush"]] + ) + if score > best: + best = score + snapshots.append(copy.deepcopy(net).eval()) + snapshots = snapshots[-3:] + save("best", export=True) + save("latest", export=True) +finally: + rollout.close() diff --git a/ai/strong/worker.cjs b/ai/strong/worker.cjs new file mode 100644 index 0000000..fdcb1fe --- /dev/null +++ b/ai/strong/worker.cjs @@ -0,0 +1,16 @@ +const f = require('./features.cjs'), + readline = require('node:readline'); +(async () => { + for await (const line of readline.createInterface({ input: process.stdin })) { + try { + const q = JSON.parse(line), + g = q.state, + p = q.player; + if (!Number.isInteger(p) || !g.currentPlayers.includes(p)) throw Error('Player cannot act'); + const x = f.encode(g, p); + console.log(JSON.stringify({ ...x, playerOrder: [p, (p + 1) % 3, (p + 2) % 3] })); + } catch (e) { + console.log(JSON.stringify({ error: e.message })); + } + } +})(); diff --git a/ai/test.cjs b/ai/test.cjs index 9f19526..f929ad8 100644 --- a/ai/test.cjs +++ b/ai/test.cjs @@ -79,3 +79,24 @@ test('Recharged replacement cities have distinct action features', () => { ); } }); + +test('fuel purchase teacher uses actual market price and buys required fuel', () => { + let g = c.start('fuel-regression'), + rng = c.seedrandom('fuel'); + while (g.phase !== c.E.Phase.Resources) { + const p = g.currentPlayers[0]; + g = c.E.move(g, c.heuristic(g, p, rng).action, p); + } + const p = g.currentPlayers[0], + candidate = c.candidates(g, p).find((a) => a.name === 'BuyResource'); + assert.ok(candidate, 'a fuel-burning plant must need resources'); + assert.equal(candidate.data.price, undefined, 'engine deliberately omits price'); + assert.equal(c.heuristic(g, p, rng).action.name, 'BuyResource'); + const before = g.players[p].money, + price = c.resourcePrice(g, candidate.data.resource); + assert.ok(Number.isFinite(price) && price > 0); + assert.equal(c.actionFeatures(g, p, candidate)[10], price / 500); + g = c.E.move(g, candidate, p); + assert.equal(before - g.players[p].money, price); + assert.equal(c.resourcePrice(g, 'uranium'), 14); +}); From 822e1307d60a5c780b82800f7891f1e5f2f249c5 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 16:31:52 +0200 Subject: [PATCH 004/184] Add search supervision, paired arenas and CPU-guided inference --- .gitignore | 1 + ai/pool.py | 6 +- ai/strong/README.md | 14 ++ ai/strong/arena_statistics.py | 27 ++++ ai/strong/benchmark-serving.py | 70 +++++++++ ai/strong/bridge.cjs | 44 +++++- ai/strong/distill.py | 205 ++++++++++++++++++++++++++ ai/strong/distillation_targets.py | 24 +++ ai/strong/evaluate.py | 57 +++++-- ai/strong/experiments.json | 39 ++++- ai/strong/export.py | 39 +++++ ai/strong/generate-search-data.py | 59 ++++++++ ai/strong/infer.py | 25 +++- ai/strong/launch-distill-v2.sh | 21 +++ ai/strong/launch-distill.sh | 19 +++ ai/strong/launch-guided-evaluation.sh | 18 +++ ai/strong/launch-search-data-v2.sh | 20 +++ ai/strong/launch-search-data.sh | 20 +++ ai/strong/launch-search-evaluation.sh | 18 +++ ai/strong/model.py | 8 +- ai/strong/search-teacher.cjs | 65 ++++++++ ai/strong/search.cjs | 10 +- ai/strong/serving-fixtures.cjs | 20 +++ ai/strong/test.cjs | 12 +- ai/strong/worker.cjs | 18 +++ 25 files changed, 835 insertions(+), 24 deletions(-) create mode 100644 ai/strong/arena_statistics.py create mode 100644 ai/strong/benchmark-serving.py create mode 100644 ai/strong/distill.py create mode 100644 ai/strong/distillation_targets.py create mode 100644 ai/strong/export.py create mode 100644 ai/strong/generate-search-data.py create mode 100644 ai/strong/launch-distill-v2.sh create mode 100644 ai/strong/launch-distill.sh create mode 100644 ai/strong/launch-guided-evaluation.sh create mode 100644 ai/strong/launch-search-data-v2.sh create mode 100644 ai/strong/launch-search-data.sh create mode 100644 ai/strong/launch-search-evaluation.sh create mode 100644 ai/strong/search-teacher.cjs create mode 100644 ai/strong/serving-fixtures.cjs diff --git a/.gitignore b/.gitignore index 7354c4b..5b066eb 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ ai/.venv/ source-bundle/ ai/__pycache__/ +ai/strong/__pycache__/ serving-bundle/ diff --git a/ai/pool.py b/ai/pool.py index a252984..bcbc3d2 100644 --- a/ai/pool.py +++ b/ai/pool.py @@ -39,7 +39,11 @@ class EnginePool: if n < workers: raise ValueError("Need at least one environment per worker") self.sizes = [n // workers + (i < n % workers) for i in range(workers)] - requests = [{**request, "n": n} for n in self.sizes] + requests = [] + offset = 0 + for n in self.sizes: + requests.append({**request, "n": n, "offset": offset}) + offset += n else: requests = [] offset = 0 diff --git a/ai/strong/README.md b/ai/strong/README.md index f2efed5..2822477 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -24,6 +24,14 @@ PPO collects complete episodes against a mixture of fixed bots, self-play and fr A separate rollout-search opponent uses the engine's public-information scenario sampler and evaluates counterfactual actions across sampled unknown decks and sealed bids. Its choices are tested for invariance to the actual hidden deck and bids. The initial search benchmark is held separately from training. +The search reference scored 64.8% against the economic bot and 76.3% against the corrected heuristic, 240 games each with no truncations. Bootstrap 95% intervals, clustered by the 20 independent deals, were [57.9%, 71.7%] and [70.8%, 81.3%]. The B learner's update-20 checkpoint scored 42.2% against the economic bot on 480 fresh paired games (40 deals; interval [38.1%, 46.3%]). These are development/screening results, not a final strength claim; the comparison also uses different deals. + +Four HF CPU jobs generated a separate search-teacher dataset: 512 games, 25,268 strategic positions, 6,769 disagreements with the economic teacher, zero truncated games. `distill.py` trains on HF GPUs, splitting whole games for validation and selecting checkpoints using actual arena performance. Its seeds do not overlap the reference benchmark, screening, or reserved final test. + +The first distillation run deteriorated after epoch 5. Its epoch-30 model scored 8.6% against the economic bot on 480 screening games. Restricting its learned corrections to auction/build decisions raised that to 22.3% on exactly the same deals, still worse than the economic prior. This isolates harmful changes in unsupervised phases as one contributor, not a complete explanation. The next dataset covers every phase and uses 12 search samples instead of four. Hard labels and distributions over counterfactual action values are separate experiments; no improvement is assumed in advance. + +The high-exploration league runs C and D were stopped after sustained regression around updates 60–80, retaining their best checkpoints. A and B continue. The neural B20 checkpoint scored 23.8% against two search opponents over 240 paired screening games (20 deals; 95% interval [17.1%, 30.4%]). Thus it has not passed the strength gate. + ## Evidence required before declaring strength - Robust gains over the economic, corrected-heuristic, rush, and frozen neural opponents—not just the default bot. @@ -37,3 +45,9 @@ A separate rollout-search opponent uses the engine's public-information scenario The initial whole-engine JavaScript simulation benchmark was already fast. Repeated economic and regional feature calculations were a larger bottleneck. Hoisting them out of candidate-action loops made the feature benchmark 2.2× faster while preserving the exact output hash across 1,786 positions. A Rust rewrite remains an option if later profiling warrants it. `infer.py` serves schema 3 over persistent JSONL; it preserves the same revision-validation obligation as the baseline worker. `evaluate.py` runs independent CPU matches. The current policies are research artifacts, not routed into production bot moves. + +The arena supports `--opponent search` and `--opponent-model frozen.onnx`. Every deal is repeated across three candidate seats and four rule combinations. Results retain the deal identifier; confidence intervals resample deals, not correlated seat repeats. A same-checkpoint-in-all-seats test yields exactly 1/3 for every rule combination, including with uneven worker batches. + +`serving-fixtures.cjs` and `benchmark-serving.py` check full JSONL round trips, legal responses, request/revision preservation and latency across all phases. The update-20 B model's ONNX logits matched PyTorch within 4.1e-6 on 39 search positions, with all argmax actions identical. CPU serving is still a research installation and its value outputs are uncalibrated. + +On the 8840U, all 427 fixture requests returned legal moves: warm round-trip median 1.78 ms, p95 3.80 ms, cold start 167 ms. Optional 16-sample public-belief search, guided by the model's proposed move, had a p95 of 704 ms on 43 sampled requests, all legal. The guided variant is under independent arena evaluation; runtime feasibility alone is not evidence of strength. The isolated research installation is `~/powergrid-ai-strong` and has no production routing. diff --git a/ai/strong/arena_statistics.py b/ai/strong/arena_statistics.py new file mode 100644 index 0000000..8e9fbb5 --- /dev/null +++ b/ai/strong/arena_statistics.py @@ -0,0 +1,27 @@ +"""Uncertainty over independent deals, keeping seat/rule repeats together.""" + +import numpy as np + + +def win_summary(rows, key="gameSeed"): + groups = {} + for row in rows: + groups.setdefault(row[key], []).append(float(row["win"])) + totals = np.asarray([sum(v) for v in groups.values()]) + counts = np.asarray([len(v) for v in groups.values()]) + result = { + "games": len(rows), + "independent_seeds": len(groups), + "win_rate": float(totals.sum() / counts.sum()), + "truncated": sum(row["truncated"] for row in rows), + } + if len(groups) >= 2: + rng = np.random.default_rng(8501) + picks = rng.integers(len(groups), size=(10000, len(groups))) + draws = totals[picks].sum(axis=1) / counts[picks].sum(axis=1) + result["seed_bootstrap_95_interval"] = np.quantile( + draws, [0.025, 0.975] + ).tolist() + else: + result["seed_bootstrap_95_interval"] = None + return result diff --git a/ai/strong/benchmark-serving.py b/ai/strong/benchmark-serving.py new file mode 100644 index 0000000..41c78cc --- /dev/null +++ b/ai/strong/benchmark-serving.py @@ -0,0 +1,70 @@ +"""Validate legal responses and time the complete persistent CPU worker.""" + +import argparse +import json +from pathlib import Path +import subprocess +import sys +import time +import numpy as np + +p = argparse.ArgumentParser() +p.add_argument("model") +p.add_argument("fixtures") +p.add_argument("--output", required=True) +p.add_argument("--search-samples", type=int, default=0) +p.add_argument("--stride", type=int, default=1) +args = p.parse_args() +worker = subprocess.Popen( + [ + sys.executable, + str(Path(__file__).with_name("infer.py")), + args.model, + "--search-samples", + str(args.search_samples), + ], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + text=True, + bufsize=1, +) +latencies, inner = [], [] +sha = None +try: + with open(args.fixtures) as source: + for i, line in enumerate(source): + if i % args.stride: + continue + fixture = json.loads(line) + request = fixture["request"] + start = time.perf_counter() + worker.stdin.write(json.dumps(request) + "\n") + worker.stdin.flush() + result = json.loads(worker.stdout.readline()) + latencies.append(1000 * (time.perf_counter() - start)) + assert "error" not in result, result + assert result["move"] in fixture["legal"], result + assert result["requestId"] == request["requestId"] + assert result["revision"] == request["revision"] + assert result["schema"] == 3 + assert result["playerOrder"][0] == request["player"] + assert abs(sum(result["winProbabilities"]) - 1) < 1e-5 + assert sha is None or sha == result["modelSha256"] + sha = result["modelSha256"] + inner.append(result["elapsedMs"]) +finally: + worker.stdin.close() + worker.wait(timeout=10) + worker.stdout.close() +report = { + "positions": len(latencies), + "model_sha256": sha, + "all_moves_legal": True, + "search_samples": args.search_samples, + "cold_start_ms": latencies[0], + "warm_roundtrip_p50_ms": float(np.percentile(latencies[1:], 50)), + "warm_roundtrip_p95_ms": float(np.percentile(latencies[1:], 95)), + "worker_p95_ms": float(np.percentile(inner[1:], 95)), +} +Path(args.output).write_text(json.dumps(report, indent=2)) +print(json.dumps(report)) diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index 1251934..cca2a89 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -15,6 +15,20 @@ function applyBot(e, p) { } finally { Math.random = old; } + } else if (role === 'search') { + const legal = c.candidates(e.g, p), + strategic = legal.length > 1 && legal.some((a) => ['ChoosePowerPlant', 'Bid', 'Build'].includes(a.name)); + c.E.move( + e.g, + strategic + ? require('./search.cjs').choose(e.g, p, { + samples: 4, + candidates: 5, + seed: 'arena-search-' + e.g.round + '-' + p + '-' + Math.floor(e.rng() * 1e9), + }).action + : eco.choose(e.g, p, e.rng).action, + p + ); } else c.E.move( e.g, @@ -38,8 +52,8 @@ function observation(e) { delete x.moves; return { ...x, episode: e.id, roles: e.roles, round: e.g.round }; } -function reset(mode = 'mixed') { - const id = sequence++, +function reset(mode = 'mixed', arenaSeed, arenaId) { + const id = arenaSeed === undefined ? sequence++ : arenaId, seat = Math.floor(id / 4) % 3, kind = Math.floor(c.seedrandom(seed + '-opponents-' + id)() * 8); const opponent = @@ -50,11 +64,13 @@ function reset(mode = 'mixed') { opponent === 'selfplay' ? ['learner', 'learner', 'learner'] : Array.from({ length: 3 }, (_, i) => (i === seat ? 'learner' : opponent)); + const gameSeed = arenaSeed === undefined ? seed + '-' + id : arenaSeed + '-' + Math.floor(id / 12); const e = { id, - g: c.start(seed + '-' + id, id % 2 ? 'recharged' : 'original', id % 4 < 2), + gameSeed, + g: c.start(gameSeed, id % 2 ? 'recharged' : 'original', id % 4 < 2), roles, - rng: c.seedrandom(seed + '-bot-' + id), + rng: c.seedrandom(arenaSeed === undefined ? seed + '-bot-' + id : gameSeed + '-bot'), steps: 0, }; advance(e); @@ -65,19 +81,35 @@ function reset(mode = 'mixed') { try { const q = JSON.parse(line), ended = []; - if (q.op === 'reset') envs = Array.from({ length: q.n }, () => reset(q.mode)); + if (q.op === 'reset') + envs = Array.from({ length: q.n }, (_, i) => reset(q.mode, q.arenaSeed, (q.offset || 0) + i)); else if (q.op === 'step') for (let i = 0; i < envs.length; i++) { const e = envs[i]; if (q.actions[i] === null) continue; const seat = e.g.currentPlayers[0]; - c.E.move(e.g, c.candidates(e.g, seat)[q.actions[i]], seat); + const legal = c.candidates(e.g, seat), + choice = q.actions[i]; + const strategic = + legal.length > 1 && legal.some((a) => ['ChoosePowerPlant', 'Bid', 'Build'].includes(a.name)); + const index = typeof choice === 'object' ? choice.proposal : choice; + const action = + typeof choice === 'object' && strategic + ? require('./search.cjs').choose(e.g, seat, { + samples: choice.searchSamples, + candidates: 6, + extraCandidates: [index], + seed: 'arena-guided-' + e.id + '-' + e.steps, + }).action + : legal[index]; + c.E.move(e.g, action, seat); e.steps++; advance(e); if (c.E.ended(e.g) || e.steps >= 1600) ended.push({ env: i, episode: e.id, + gameSeed: e.gameSeed, truncated: !c.E.ended(e.g), value: c.E.ended(e.g) ? c.outcome(e.g) : [0, 0, 0], steps: e.steps, diff --git a/ai/strong/distill.py b/ai/strong/distill.py new file mode 100644 index 0000000..3a061a1 --- /dev/null +++ b/ai/strong/distill.py @@ -0,0 +1,205 @@ +"""HF GPU job: distill public-belief search, then measure actual playing strength.""" + +import copy +import gzip +import json +import os +from pathlib import Path +import random +import subprocess +import sys + +import numpy as np +import torch +from huggingface_hub import HfApi, hf_hub_download + +from model import Policy, tensors +from distillation_targets import policy_targets + +assert torch.cuda.is_available(), "Training must run on a GPU HF Job" +torch.set_num_threads(2) +seed = int(os.getenv("TRAIN_SEED", "310")) +random.seed(seed) +np.random.seed(seed) +torch.manual_seed(seed) +run = os.getenv("RUN_NAME", "search-distillation-v1") +out = Path("ai/runs") / run +out.mkdir(parents=True, exist_ok=True) +device = "cuda" +net = Policy().to(device) +train, validation = [], [] +dataset_revisions = [] +version = os.getenv("DATA_VERSION", "search-teacher-v1") +target_mode = os.getenv("TARGET_MODE", "hard") +assert target_mode in ["hard", "soft"] +for shard in range(int(os.getenv("SHARDS", "4"))): + path = hf_hub_download( + os.environ["HF_DATA_REPO"], + f"{version}/{version}-{shard}.jsonl.gz", + repo_type="dataset", + ) + dataset_revisions.append({"shard": shard, "revision": Path(path).parents[1].name}) + with gzip.open(path, "rt") as source: + for line in source: + game = json.loads(line) + if game["truncated"]: + continue + # Keep whole games together, never split positions from one game. + target = validation if game["id"] % 5 == 0 else train + for row in game["rows"]: + row["state"] = np.asarray(row["state"], np.float32) + row["actions"] = np.asarray(row["actions"], np.float32) + target.append(row) +assert train and validation +optimizer = torch.optim.AdamW( + net.parameters(), lr=float(os.getenv("LR", ".0003")), weight_decay=1e-4 +) +metrics = [] +best = -1 +batchsize = int(os.getenv("BATCH_SIZE", "256")) + + +def export(name): + torch.save( + { + "schema": 3, + "state_dim": 738, + "action_dim": 96, + "state_dict": {k: v.detach().cpu() for k, v in net.state_dict().items()}, + }, + out / f"{name}.pt", + ) + clone = copy.deepcopy(net).cpu().eval() + torch.onnx.export( + clone, + ( + torch.zeros(1, 738), + torch.zeros(1, 8, 96), + torch.ones(1, 8, dtype=torch.bool), + ), + str(out / f"{name}.onnx"), + input_names=["state", "actions", "mask"], + output_names=["logits", "value"], + dynamic_axes={ + "state": {0: "batch"}, + "actions": {0: "batch", 1: "candidates"}, + "mask": {0: "batch", 1: "candidates"}, + "logits": {0: "batch", 1: "candidates"}, + "value": {0: "batch"}, + }, + opset_version=17, + dynamo=False, + ) + + +def validate(): + correct, disagreement_correct, disagreements, count = 0, 0, 0, 0 + with torch.no_grad(): + for k in range(0, len(validation), batchsize): + rows = validation[k : k + batchsize] + predicted = net(*tensors(rows, device))[0].argmax(-1).cpu().tolist() + for row, chosen in zip(rows, predicted): + correct += chosen == row["target"] + count += 1 + if not row["teacherAgrees"]: + disagreements += 1 + disagreement_correct += chosen == row["target"] + return { + "positions": count, + "accuracy": correct / count, + "search_disagreements": disagreements, + "disagreement_accuracy": disagreement_correct / max(1, disagreements), + } + + +for epoch in range(int(os.getenv("EPOCHS", "30")) + 1): + losses = [] + if epoch: + net.train() + random.shuffle(train) + for k in range(0, len(train), batchsize): + rows = train[k : k + batchsize] + logits, value = net(*tensors(rows, device)) + targets = torch.from_numpy( + policy_targets(rows, logits.shape[1], soft=target_mode == "soft") + ).to(device) + weights = torch.tensor( + [ + 1.0 + if r["teacherAgrees"] + else float(os.getenv("DISAGREEMENT_WEIGHT", "3")) + for r in rows + ], + device=device, + ) + ce = -(targets * logits.log_softmax(-1)).sum(-1) + returns = torch.tensor([r["value"] for r in rows], device=device) + loss = (ce * weights).sum() / weights.sum() + 0.2 * ( + (value - returns) ** 2 + ).mean() + optimizer.zero_grad() + loss.backward() + torch.nn.utils.clip_grad_norm_(net.parameters(), 1) + optimizer.step() + losses.append(float(loss.detach())) + net.eval() + metric = { + "epoch": epoch, + "loss": float(np.mean(losses)) if losses else None, + "validation": validate(), + } + if epoch % 5 == 0: + export("latest") + results = {} + for opponent in ["economic", "heuristic", "rush"]: + result = subprocess.run( + [ + sys.executable, + "ai/strong/evaluate.py", + str(out / "latest.onnx"), + "--opponent", + opponent, + "--games", + "96", + "--workers", + "4", + "--seed", + "search-distill-development-v1", + "--output", + str(out / f"{opponent}.json"), + ], + text=True, + capture_output=True, + check=True, + ) + results[opponent] = json.loads(result.stdout) + metric["arena"] = results + score = np.mean([r["win_rate"] for r in results.values()]) + if score > best: + best = score + export("best") + metrics.append(metric) + (out / "metrics.json").write_text(json.dumps(metrics, indent=2)) + (out / "schema.json").write_text( + json.dumps( + { + "version": 3, + "players": 3, + "map": "Germany", + "run": run, + "training_positions": len(train), + "validation_positions": len(validation), + "dataset_revisions": dataset_revisions, + "dataset_version": version, + "target_mode": target_mode, + } + ) + ) + HfApi().upload_folder( + repo_id=os.environ["HF_MODEL_REPO"], + folder_path=str(out), + path_in_repo="runs/" + run, + ) + else: + metrics.append(metric) + print(json.dumps(metric), flush=True) diff --git a/ai/strong/distillation_targets.py b/ai/strong/distillation_targets.py new file mode 100644 index 0000000..fbeec99 --- /dev/null +++ b/ai/strong/distillation_targets.py @@ -0,0 +1,24 @@ +"""Targets retain uncertainty across sampled counterfactual search actions.""" + +import numpy as np + + +def policy_targets(rows, candidates, soft=False): + targets = np.zeros((len(rows), candidates), dtype=np.float32) + for i, row in enumerate(rows): + estimates = row.get("searchValues", []) + if not soft or not estimates: + targets[i, row["target"]] = 1 + continue + indices = np.asarray([x[0] for x in estimates], dtype=np.int64) + values = np.asarray([x[1] for x in estimates], dtype=np.float32) + assert len(set(indices.tolist())) == len(indices) + assert np.all((indices >= 0) & (indices < len(row["actions"]))) + prior = np.asarray(row["actions"], dtype=np.float32)[indices, 74] + # When rollouts cannot distinguish the actions, retain the economic prior. + scores = ( + prior * 2 if values.max() == values.min() else values * 8 + prior * 0.15 + ) + weights = np.exp(scores - scores.max()) + targets[i, indices] = weights / weights.sum() + return targets diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index ee52648..abc2fcb 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -7,23 +7,42 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1])) import numpy as np from infer import Model from pool import EnginePool +from arena_statistics import win_summary p = argparse.ArgumentParser() p.add_argument("model") p.add_argument( "--opponent", default="economic", - choices=["economic", "heuristic", "rush", "legacy"], + choices=["economic", "heuristic", "rush", "legacy", "search"], +) +p.add_argument("--opponent-model", help="Frozen ONNX policy in both opponent seats") +p.add_argument("--workers", type=int, default=4) +p.add_argument( + "--search-samples", + type=int, + default=0, + help="Public-belief search guided by the candidate model", ) p.add_argument("--games", type=int, default=480) p.add_argument("--seed", default="strong-screening-v1") p.add_argument("--output", required=True) args = p.parse_args() +if not 0 <= args.search_samples <= 64: + p.error("--search-samples must be 0..64") model = Model(args.model) -pool = EnginePool(4, seed=args.seed, script="ai/strong/bridge.cjs") -current = pool.call({"op": "reset", "n": args.games, "mode": args.opponent})[ - "observations" -] +if args.games < 12 or args.games % 12: + p.error("--games must be a positive multiple of 12 for paired rules and seats") +opponent_model = Model(args.opponent_model) if args.opponent_model else None +pool = EnginePool(args.workers, seed=args.seed, script="ai/strong/bridge.cjs") +current = pool.call( + { + "op": "reset", + "n": args.games, + "mode": "snapshot0" if opponent_model else args.opponent, + "arenaSeed": args.seed, + } +)["observations"] rows = [] latency = [] start = time.perf_counter() @@ -35,9 +54,15 @@ try: actions.append(None) continue t = time.perf_counter() - a, _ = model.predict(x["state"], x["actions"]) - latency.append(1000 * (time.perf_counter() - t)) - actions.append(a) + actor = model if x["roles"][x["seat"]] == "learner" else opponent_model + a, _ = actor.predict(x["state"], x["actions"]) + if actor is model: + latency.append(1000 * (time.perf_counter() - t)) + actions.append( + {"proposal": a, "searchSamples": args.search_samples} + if actor is model and args.search_samples + else a + ) r = pool.call({"op": "step", "actions": actions}) current = r["observations"] for e in r["ended"]: @@ -56,7 +81,10 @@ finally: report = { "model": args.model, "model_sha256": model.sha256, - "opponent": args.opponent, + "opponent": args.opponent_model or args.opponent, + "opponent_sha256": opponent_model.sha256 if opponent_model else None, + "paired_seats": True, + "candidate_search_samples": args.search_samples, "seed": args.seed, "games": len(rows), "win_rate": float(np.mean([r["win"] for r in rows])), @@ -79,5 +107,16 @@ report = { ], "results": rows, } +report.update(win_summary(rows)) +for group in report["by_rules"]: + group.update( + win_summary( + [ + r + for r in rows + if r["variant"] == group["variant"] and r["sealed"] == group["sealed"] + ] + ) + ) Path(args.output).write_text(json.dumps(report, indent=2)) print(json.dumps({k: v for k, v in report.items() if k != "results"})) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index dd497d1..599f788 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -9,7 +9,22 @@ "strong-league-v2-b": "6abd146afbc85ba68235b28d", "strong-league-v2-c": "6abd15cafbc85ba68235b347", "strong-league-v2-d": "6abd15ca404719ba376134e5", - "search-reference-v1": "6abd1314404719ba376133b5" + "search-reference-v1": "6abd1314404719ba376133b5", + "search-teacher-v1-0": "6abd187efbc85ba68235b480", + "search-teacher-v1-1": "6abd187ffbc85ba68235b482", + "search-teacher-v1-2": "6abd187f404719ba376135cd", + "search-teacher-v1-3": "6abd1880404719ba376135cf", + "b20-search-screening": "6abd18bb404719ba376135d8", + "search-distillation-v1": "6abd1992404719ba376135ec", + "search-teacher-v2-0": "6abd1c1a404719ba3761362b", + "search-teacher-v2-1": "6abd1c1b404719ba3761362d", + "search-teacher-v2-2": "6abd1c1cfbc85ba68235b51d", + "search-teacher-v2-3": "6abd1c1dfbc85ba68235b51f", + "search-teacher-v2-4": "6abd1c1d404719ba3761362f", + "search-teacher-v2-5": "6abd1c1e404719ba37613631", + "search-teacher-v2-6": "6abd1c1f404719ba37613633", + "search-teacher-v2-7": "6abd1c20404719ba37613635", + "b20-guided-search-screening": "6abd1c21fbc85ba68235b521" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -18,5 +33,25 @@ "6abd146bfbc85ba68235b28f" ], "heldout_final_seed_prefix": "strong-final-reserved-v1", - "final_seed_prefix_used": false + "final_seed_prefix_used": false, + "search_teacher_source": { + "archive": "strong-source-v4.tgz", + "commit": "76d8631d933163a9731319a59341e9e4251dfd2d" + }, + "distillation_source": { + "archive": "strong-source-v5.tgz", + "commit": "ab52f6ec30783174b97882b24fe61063f8fbf116" + }, + "expanded_teacher_source": { + "archive": "strong-source-v6.tgz", + "commit": "cc79acffc12ad4cc1daffbad20b024d2e1f4fe98" + }, + "stopped_for_sustained_regression": [ + "6abd15cafbc85ba68235b347", + "6abd15ca404719ba376134e5" + ], + "all_phase_distillation_source": { + "archive": "strong-source-v7.tgz", + "commit": "0862207a0f62cb75edfd0e6ecbc472cdc190bcd0" + } } diff --git a/ai/strong/export.py b/ai/strong/export.py new file mode 100644 index 0000000..89313fa --- /dev/null +++ b/ai/strong/export.py @@ -0,0 +1,39 @@ +"""CPU-only checkpoint conversion; no gradient updates.""" + +import argparse +import json +from pathlib import Path +import torch +from model import Policy + +p = argparse.ArgumentParser() +p.add_argument("checkpoint") +p.add_argument("output") +p.add_argument("--strategic-only", action="store_true") +args = p.parse_args() +torch.set_num_threads(1) +checkpoint = torch.load(args.checkpoint, map_location="cpu", weights_only=True) +strategic_only = args.strategic_only or checkpoint.get("strategic_only", False) +net = Policy(strategic_only=strategic_only).eval() +net.load_state_dict(checkpoint["state_dict"]) +torch.onnx.export( + net, + (torch.zeros(1, 738), torch.zeros(1, 8, 96), torch.ones(1, 8, dtype=torch.bool)), + args.output, + input_names=["state", "actions", "mask"], + output_names=["logits", "value"], + dynamic_axes={ + "state": {0: "batch"}, + "actions": {0: "batch", 1: "candidates"}, + "mask": {0: "batch", 1: "candidates"}, + "logits": {0: "batch", 1: "candidates"}, + "value": {0: "batch"}, + }, + opset_version=17, + dynamo=False, +) +Path(args.output + ".json").write_text( + json.dumps( + {"source": args.checkpoint, "strategic_only": strategic_only, "schema": 3} + ) +) diff --git a/ai/strong/generate-search-data.py b/ai/strong/generate-search-data.py new file mode 100644 index 0000000..9362df3 --- /dev/null +++ b/ai/strong/generate-search-data.py @@ -0,0 +1,59 @@ +"""HF CPU job: independent games produce a versioned, private teacher shard.""" + +import concurrent.futures +import gzip +import json +import os +from pathlib import Path +import subprocess +from huggingface_hub import HfApi + +shard = int(os.environ["SHARD"]) +games = int(os.getenv("GAMES", "128")) +version = os.getenv("DATA_VERSION", "search-teacher-v1") +output = Path(f"{version}-{shard}.jsonl.gz") +counts = {"games": 0, "positions": 0, "teacher_disagreements": 0, "truncated": 0} + + +def generate(game): + result = subprocess.run( + ["node", "ai/strong/search-teacher.cjs", str(game)], + text=True, + capture_output=True, + check=True, + ) + return json.loads(result.stdout) + + +with concurrent.futures.ThreadPoolExecutor( + int(os.getenv("DATA_WORKERS", "24")) +) as pool: + futures = [pool.submit(generate, shard * games + i) for i in range(games)] + with gzip.open(output, "wt") as stream: + for future in concurrent.futures.as_completed(futures): + game = future.result() + counts["games"] += 1 + counts["truncated"] += game["truncated"] + # Keep truncated metadata, but never turn incomplete outcomes into targets. + if game["truncated"]: + game["rows"] = [] + counts["positions"] += len(game["rows"]) + counts["teacher_disagreements"] += sum( + not r["teacherAgrees"] for r in game["rows"] + ) + stream.write(json.dumps(game, separators=(",", ":")) + "\n") + print(json.dumps({"shard": shard, **counts}), flush=True) +api = HfApi() +repo = os.environ["HF_DATA_REPO"] +api.upload_file( + repo_id=repo, + repo_type="dataset", + path_or_fileobj=str(output), + path_in_repo=version + "/" + output.name, +) +api.upload_file( + repo_id=repo, + repo_type="dataset", + path_or_fileobj=json.dumps({"shard": shard, "schema": 3, **counts}).encode(), + path_in_repo=f"{version}/shard-{shard}-metrics.json", +) diff --git a/ai/strong/infer.py b/ai/strong/infer.py index 3b4b164..7a5880e 100644 --- a/ai/strong/infer.py +++ b/ai/strong/infer.py @@ -8,7 +8,10 @@ from infer import Model, Node p = argparse.ArgumentParser() p.add_argument("model") +p.add_argument("--search-samples", type=int, default=0) args = p.parse_args() +if not 0 <= args.search_samples <= 64: + p.error("--search-samples must be 0..64") model = Model(args.model) node = Node("strong/worker.cjs") try: @@ -20,10 +23,23 @@ try: raise ValueError("Expected object") q = obj start = time.perf_counter() - r = node.call(q) + r = node.call({**q, "op": "rank"}) if "error" in r: raise ValueError(r["error"]) index, values = model.predict(r["state"], r["actions"]) + search = None + if args.search_samples: + search = node.call( + { + **q, + "op": "search", + "proposal": index, + "samples": args.search_samples, + } + ) + if "error" in search: + raise ValueError(search["error"]) + index = search["index"] print( json.dumps( { @@ -34,6 +50,13 @@ try: "valueStatus": "uncalibrated-training-opponents", "playerOrder": r["playerOrder"], "schema": 3, + "search": { + k: v + for k, v in search.items() + if k in ["evaluations", "truncated", "winEstimate"] + } + if search + else None, "modelSha256": model.sha256, "elapsedMs": 1000 * (time.perf_counter() - start), } diff --git a/ai/strong/launch-distill-v2.sh b/ai/strong/launch-distill-v2.sh new file mode 100644 index 0000000..c6075ee --- /dev/null +++ b/ai/strong/launch-distill-v2.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail +mode=${1:-hard} +[[ "$mode" == hard || "$mode" == soft ]] +hf jobs run --detach --flavor a10g-large --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME="search-distillation-v2-$mode" --env TARGET_MODE="$mode" --env TRAIN_SEED=310 --env EPOCHS=20 --env DATA_VERSION=search-teacher-v2 --env SHARDS=8 --env DISAGREEMENT_WEIGHT=2 \ + --label project=powergrid-ai --label stage="search-distillation-v2-$mode" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v7.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/distill.py +' diff --git a/ai/strong/launch-distill.sh b/ai/strong/launch-distill.sh new file mode 100644 index 0000000..a069bee --- /dev/null +++ b/ai/strong/launch-distill.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor a10g-large --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=search-distillation-v1 --env TRAIN_SEED=310 --env EPOCHS=30 \ + --label project=powergrid-ai --label stage=search-distillation-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v5.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/distill.py +' diff --git a/ai/strong/launch-guided-evaluation.sh b/ai/strong/launch-guided-evaluation.sh new file mode 100644 index 0000000..1eb7a32 --- /dev/null +++ b/ai/strong/launch-guided-evaluation.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --label project=powergrid-ai --label stage=b20-guided-search-screening \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v6.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +python -c "from huggingface_hub import hf_hub_download; hf_hub_download(\"coyotte508/powergrid-ai-germany-v1\",\"runs/strong-league-v2-b/best.onnx\",revision=\"f9dfad5bde9862bc41aa42d77d9622621d70e8ce\",local_dir=\"models\")" +python ai/strong/evaluate.py models/runs/strong-league-v2-b/best.onnx --opponent search --search-samples 16 --games 96 --workers 24 --seed strong-search-screening-v1 --output evaluation.json +python -c "import os;from huggingface_hub import HfApi;HfApi().upload_file(repo_id=os.environ[\"HF_MODEL_REPO\"],path_or_fileobj=\"evaluation.json\",path_in_repo=\"runs/b20-guided-search-screening/evaluation.json\")" +' diff --git a/ai/strong/launch-search-data-v2.sh b/ai/strong/launch-search-data-v2.sh new file mode 100644 index 0000000..2f9fcbb --- /dev/null +++ b/ai/strong/launch-search-data-v2.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +shard=${1:?Specify numeric shard} +[[ "$shard" =~ ^[0-9]+$ ]] +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env SHARD="$shard" --env GAMES=256 --env DATA_WORKERS=24 --env SEARCH_SAMPLES=12 --env DATA_VERSION=search-teacher-v2 --env INCLUDE_ALL_PHASES=1 \ + --label project=powergrid-ai --label stage="search-teacher-v2-$shard" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v6.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/generate-search-data.py +' diff --git a/ai/strong/launch-search-data.sh b/ai/strong/launch-search-data.sh new file mode 100644 index 0000000..ade5f70 --- /dev/null +++ b/ai/strong/launch-search-data.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +shard=${1:?Specify numeric shard} +[[ "$shard" =~ ^[0-9]+$ ]] +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env SHARD="$shard" --env GAMES=128 --env DATA_WORKERS=24 --env SEARCH_SAMPLES=4 \ + --label project=powergrid-ai --label stage="search-teacher-v1-$shard" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v4.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/generate-search-data.py +' diff --git a/ai/strong/launch-search-evaluation.sh b/ai/strong/launch-search-evaluation.sh new file mode 100644 index 0000000..5624f20 --- /dev/null +++ b/ai/strong/launch-search-evaluation.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --label project=powergrid-ai --label stage=b20-search-screening \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v4.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +python -c "from huggingface_hub import hf_hub_download; hf_hub_download(\"coyotte508/powergrid-ai-germany-v1\",\"runs/strong-league-v2-b/best.onnx\",revision=\"f9dfad5bde9862bc41aa42d77d9622621d70e8ce\",local_dir=\"models\")" +python ai/strong/evaluate.py models/runs/strong-league-v2-b/best.onnx --opponent search --games 240 --workers 24 --seed strong-search-screening-v1 --output evaluation.json +python -c "import os;from huggingface_hub import HfApi;HfApi().upload_file(repo_id=os.environ[\"HF_MODEL_REPO\"],path_or_fileobj=\"evaluation.json\",path_in_repo=\"runs/b20-search-screening/evaluation.json\")" +' diff --git a/ai/strong/model.py b/ai/strong/model.py index bb5df46..72b8963 100644 --- a/ai/strong/model.py +++ b/ai/strong/model.py @@ -4,8 +4,9 @@ from torch import nn class Policy(nn.Module): - def __init__(self, sd=738, ad=96, width=384): + def __init__(self, sd=738, ad=96, width=384, strategic_only=False): super().__init__() + self.strategic_only = strategic_only self.state = nn.Sequential( nn.Linear(sd, width), nn.LayerNorm(width), @@ -27,6 +28,11 @@ class Policy(nn.Module): residual = self.score( torch.cat((s[:, None, :].expand(-1, a.shape[1], -1), a), -1) ).squeeze(-1) + if self.strategic_only: + strategic = ( + (actions[:, :, 0] + actions[:, :, 1] + actions[:, :, 5]) > 0 + ) & mask + residual = residual * strategic.any(dim=1, keepdim=True) # Start from a competent public-information policy; learn corrections. logits = actions[:, :, 74] * 2 + residual return logits.masked_fill(~mask, -1e9), self.value(s).softmax(-1) diff --git a/ai/strong/search-teacher.cjs b/ai/strong/search-teacher.cjs new file mode 100644 index 0000000..f0609dd --- /dev/null +++ b/ai/strong/search-teacher.cjs @@ -0,0 +1,65 @@ +// Generate public-belief search supervision; learning itself runs in HF Jobs. +const c = require('../core.cjs'), + eco = require('./economics.cjs'), + search = require('./search.cjs'), + features = require('./features.cjs'); +const id = Number(process.argv[2] || 0), + seed = (process.env.DATA_VERSION || 'search-teacher-v1') + '-' + id, + g = c.start(seed, id % 2 ? 'recharged' : 'original', id % 4 < 2), + seat = Math.floor(id / 4) % 3, + rng = c.seedrandom(seed + '-choices'), + samples = Number(process.env.SEARCH_SAMPLES || 4), + rows = []; +let steps = 0; +while (!c.E.ended(g) && steps < 1600) { + const p = g.currentPlayers[0], + legal = c.candidates(g, p), + strategic = legal.length > 1 && legal.some((a) => ['ChoosePowerPlant', 'Bid', 'Build'].includes(a.name)); + let action; + if (p === seat && strategic) { + const result = search.choose(g, p, { samples, candidates: 5, seed: seed + '-decision-' + steps }); + action = result.action; + if (result.evaluations && !result.truncated) { + const x = features.encode(g, p); + rows.push({ + state: x.state, + actions: x.actions, + target: result.index, + searchValues: Object.entries(result.values).map(([index, total]) => [Number(index), total / samples]), + teacherAgrees: result.index === x.teacher, + phase: g.phase, + round: g.round, + seat, + }); + } + } else { + const opponent = ['economic', 'heuristic', 'rush'][Math.floor(id / 12) % 3]; + action = + p !== seat && opponent === 'heuristic' + ? c.heuristic(g, p, rng).action + : eco.choose(g, p, rng, p === seat ? 'economic' : opponent).action; + if (p === seat && legal.length > 1 && process.env.INCLUDE_ALL_PHASES === '1') { + const x = features.encode(g, p), + target = x.moves.findIndex((a) => JSON.stringify(a) === JSON.stringify(action)); + if (target < 0) throw Error('Teacher selected an unrepresented action'); + rows.push({ + state: x.state, + actions: x.actions, + target, + searchValues: [], + teacherAgrees: true, + phase: g.phase, + round: g.round, + seat, + }); + } + } + c.E.move(g, action, p); + steps++; +} +const truncated = !c.E.ended(g), + value = truncated ? [0, 0, 0] : c.outcome(g), + relativeValue = Array.from({ length: 3 }, (_, i) => value[(seat + i) % 3]); +console.log( + JSON.stringify({ id, seed, steps, truncated, value, rows: rows.map((r) => ({ ...r, value: relativeValue })) }) +); diff --git a/ai/strong/search.cjs b/ai/strong/search.cjs index 5e8579f..4f174a2 100644 --- a/ai/strong/search.cjs +++ b/ai/strong/search.cjs @@ -15,9 +15,15 @@ function shortlist(g, seat, limit = 5) { if (bids.length > 4) chosen.add(bids[Math.floor(bids.length / 2)]); return [...chosen].slice(0, limit); } -function choose(g, seat, { samples = 6, candidates = 5, seed = 'public-search', maxSteps = 1200 } = {}) { +function choose( + g, + seat, + { samples = 6, candidates = 5, seed = 'public-search', maxSteps = 1200, extraCandidates = [] } = {} +) { const actions = c.candidates(g, seat), - options = shortlist(g, seat, candidates); + options = [...new Set([...shortlist(g, seat, candidates), ...extraCandidates])]; + if (options.some((i) => !Number.isInteger(i) || i < 0 || i >= actions.length)) + throw Error('Invalid search proposal'); if (options.length === 1) return { index: options[0], action: actions[options[0]], evaluations: 0 }; const totals = Object.fromEntries(options.map((i) => [i, 0])); let evaluations = 0, diff --git a/ai/strong/serving-fixtures.cjs b/ai/strong/serving-fixtures.cjs new file mode 100644 index 0000000..2bfc2a3 --- /dev/null +++ b/ai/strong/serving-fixtures.cjs @@ -0,0 +1,20 @@ +const c = require('../core.cjs'), + eco = require('./economics.cjs'); +for (let game = 0; game < 4; game++) { + const g = c.start('strong-serving-' + game, game % 2 ? 'recharged' : 'original', game < 2), + rng = c.seedrandom('strong-serving-ties-' + game); + let step = 0; + while (!c.E.ended(g) && step < 1600) { + const player = g.currentPlayers[0]; + if (step % 4 === 0) + console.log( + JSON.stringify({ + request: { state: g, player, requestId: `${game}-${step}`, revision: step }, + legal: c.candidates(g, player), + }) + ); + c.E.move(g, eco.choose(g, player, rng).action, player); + step++; + } + if (!c.E.ended(g)) throw Error('Fixture game did not finish'); +} diff --git a/ai/strong/test.cjs b/ai/strong/test.cjs index d666b46..fd9d177 100644 --- a/ai/strong/test.cjs +++ b/ai/strong/test.cjs @@ -68,14 +68,22 @@ test('search choices do not change with hidden deck order or sealed bid amounts' let p = g.currentPlayers[0]; c.E.move(g, c.candidates(g, p)[0], p); p = g.currentPlayers[0]; - const first = search.choose(g, p, { samples: 2, candidates: 3, seed: 'same-belief', maxSteps: 700 }); + const options = { + samples: 2, + candidates: 3, + seed: 'same-belief', + maxSteps: 700, + extraCandidates: [c.candidates(g, p).length - 1], + }; + const first = search.choose(g, p, options); g.powerPlantsDeck.reverse(); + g.seed = 'different-private-seed'; g.players.forEach((x, i) => { if (i !== p) x.bid = 123; }); g.currentBid = 456; g.hiddenLog = [{ secret: 'not observable' }]; - const second = search.choose(g, p, { samples: 2, candidates: 3, seed: 'same-belief', maxSteps: 700 }); + const second = search.choose(g, p, options); assert.equal(first.index, second.index); assert.deepEqual(first.values, second.values); }); diff --git a/ai/strong/worker.cjs b/ai/strong/worker.cjs index fdcb1fe..360789e 100644 --- a/ai/strong/worker.cjs +++ b/ai/strong/worker.cjs @@ -8,6 +8,24 @@ const f = require('./features.cjs'), p = q.player; if (!Number.isInteger(p) || !g.currentPlayers.includes(p)) throw Error('Player cannot act'); const x = f.encode(g, p); + if (q.op === 'search') { + if (!Number.isInteger(q.proposal) || q.proposal < 0 || q.proposal >= x.moves.length) + throw Error('Invalid search proposal'); + if (!Number.isInteger(q.samples) || q.samples < 1 || q.samples > 64) + throw Error('Search samples must be 1..64'); + const strategic = + x.moves.length > 1 && x.moves.some((a) => ['ChoosePowerPlant', 'Bid', 'Build'].includes(a.name)); + const result = strategic + ? require('./search.cjs').choose(g, p, { + samples: q.samples, + candidates: 6, + extraCandidates: [q.proposal], + seed: 'serving-' + (q.requestId || 'public'), + }) + : { index: q.proposal, action: x.moves[q.proposal], evaluations: 0 }; + console.log(JSON.stringify(result)); + continue; + } console.log(JSON.stringify({ ...x, playerOrder: [p, (p + 1) % 3, (p + 2) % 3] })); } catch (e) { console.log(JSON.stringify({ error: e.message })); From 586021568a38f3ba344fc74bbe6f2338a5a6870d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 17:30:34 +0200 Subject: [PATCH 005/184] Version strategic observations and expand search evaluation --- ai/strong/README.md | 16 ++- ai/strong/arena-job.py | 45 +++++++ ai/strong/benchmark-serving.py | 5 +- ai/strong/bridge.cjs | 62 +++++++-- ai/strong/check-export.py | 69 ++++++++++ ai/strong/combine-arenas.py | 51 ++++++++ ai/strong/distill.py | 8 ++ ai/strong/economics-v3_0.cjs | 199 +++++++++++++++++++++++++++++ ai/strong/economics.cjs | 7 + ai/strong/encoders.cjs | 7 + ai/strong/evaluate.py | 55 ++++++-- ai/strong/experiments.json | 57 ++++++++- ai/strong/export.py | 2 + ai/strong/feature_contract.py | 26 ++++ ai/strong/features-v3_0.cjs | 84 ++++++++++++ ai/strong/features.cjs | 6 +- ai/strong/geographic-proposals.cjs | 42 ++++++ ai/strong/infer.py | 10 +- ai/strong/launch-arena.sh | 20 +++ ai/strong/launch-distill-v3.sh | 21 +++ ai/strong/launch-guided-b160-16.sh | 18 +++ ai/strong/launch-guided-b160-48.sh | 18 +++ ai/strong/launch-refine-full.sh | 20 +++ ai/strong/launch-refine-search.sh | 20 +++ ai/strong/launch-search-data-v3.sh | 20 +++ ai/strong/search-teacher.cjs | 10 +- ai/strong/search.cjs | 34 ++++- ai/strong/test.cjs | 55 ++++++++ ai/strong/train.py | 69 +++++++++- ai/strong/worker.cjs | 5 +- 30 files changed, 1020 insertions(+), 41 deletions(-) create mode 100644 ai/strong/arena-job.py create mode 100644 ai/strong/check-export.py create mode 100644 ai/strong/combine-arenas.py create mode 100644 ai/strong/economics-v3_0.cjs create mode 100644 ai/strong/encoders.cjs create mode 100644 ai/strong/feature_contract.py create mode 100644 ai/strong/features-v3_0.cjs create mode 100644 ai/strong/geographic-proposals.cjs create mode 100644 ai/strong/launch-arena.sh create mode 100644 ai/strong/launch-distill-v3.sh create mode 100644 ai/strong/launch-guided-b160-16.sh create mode 100644 ai/strong/launch-guided-b160-48.sh create mode 100644 ai/strong/launch-refine-full.sh create mode 100644 ai/strong/launch-refine-search.sh create mode 100644 ai/strong/launch-search-data-v3.sh diff --git a/ai/strong/README.md b/ai/strong/README.md index 2822477..3fce864 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -12,6 +12,8 @@ The first heuristic incorrectly read `BuyResource.data.price`, which the engine Schema 3 has 738 state features and 96 features per candidate action. All opponents' money is visible by user instruction. Hidden deck order, random seed, sealed bid amounts and queued plans are excluded. +Feature revision `3.1-uranium39` corrects the effective uranium refill after plant 39 has been bought in Recharged Germany (also handled by the helper for Italy). The engine's persistent flag matters even after that plant is discarded. A test compares the feature's predicted refill with a real engine round transition. Older checkpoints use frozen revision `3.0`; the arena and worker select the matching encoder from ONNX metadata. The old encoder's output was verified byte-for-byte against the archived runtime over 427 positions. Unknown revisions and mismatched data fail explicitly. Revision 3.0 datasets and source bundles are retained for reproducibility, not silently reinterpreted. + The observation explicitly includes all players' cities, plants, fuel, money, current order and remaining actors; per-resource replenishment for every step; current prices and capped refill; and generation capacity with current fuel. Territory features describe each player's presence in map-defined regions/islands and their remaining legal building slots. Building actions include the projected next order with highest-plant tie breaking. Terminal winning is the optimization objective; there is no reward for indiscriminately adding cities. `public-graph.cjs` exports map topology, owner vectors, slot rules, edges, islands and crossing costs for subsequent multi-map model work. UK/Ireland territory behavior is tested, but the current trained policy remains Germany/three players. Exporting generic map features does not establish playing strength on another map. @@ -30,7 +32,11 @@ Four HF CPU jobs generated a separate search-teacher dataset: 512 games, 25,268 The first distillation run deteriorated after epoch 5. Its epoch-30 model scored 8.6% against the economic bot on 480 screening games. Restricting its learned corrections to auction/build decisions raised that to 22.3% on exactly the same deals, still worse than the economic prior. This isolates harmful changes in unsupervised phases as one contributor, not a complete explanation. The next dataset covers every phase and uses 12 search samples instead of four. Hard labels and distributions over counterfactual action values are separate experiments; no improvement is assumed in advance. -The high-exploration league runs C and D were stopped after sustained regression around updates 60–80, retaining their best checkpoints. A and B continue. The neural B20 checkpoint scored 23.8% against two search opponents over 240 paired screening games (20 deals; 95% interval [17.1%, 30.4%]). Thus it has not passed the strength gate. +The high-exploration league runs C and D were stopped after sustained regression around updates 60–80, retaining their best checkpoints. B completed all 300 updates; A continues. The neural B20 checkpoint scored 23.8% against two search opponents over 240 paired screening games (20 deals; 95% interval [17.1%, 30.4%]). Thus it has not passed the strength gate. + +B160 subsequently scored 46.0% against the economic bot and 40.4% against two B20 neural opponents, each over 480 paired screening games (40 independent deals) with no truncations. B20 with 16-sample search scored 47.9% against two four-sample search opponents on 96 screening games (eight deals; interval [36.5%, 59.4%]), but its original/open subset was only 25%; broader evaluation is needed. These runs use their archived revision-3.0 runtime. B160 scored 47.9% with 16 samples and 61.5% with 48 samples against the four-sample reference, each over 96 games/eight deals. The 48-sample interval is [53.6%, 71.4%]; all four rule subsets exceeded 54%. This remains a small development test against a limited reference. + +The corrected revision-3.1 dataset (`search-teacher-v3`) contains 247,104 decisions from 2,048 complete games, with 33,130 search/economic disagreements and no truncations. It includes all phases and uses 12 search samples per strategic decision. Hard-label and uncertainty-preserving distillation completed separately on HF Jobs. Their best checkpoints scored 37.9% and 42.5%, respectively, against the corrected economic opponent over 480 paired screening games each. The corrected soft-label checkpoint is the starting point for two new PPO refinements, with an anchor to its initial policy; one includes search opponents and restricts learned corrections to strategic phases. The new dataset replaces the intermediate revision-3.0 all-phase dataset for corrected-model training. ## Evidence required before declaring strength @@ -51,3 +57,11 @@ The arena supports `--opponent search` and `--opponent-model frozen.onnx`. Every `serving-fixtures.cjs` and `benchmark-serving.py` check full JSONL round trips, legal responses, request/revision preservation and latency across all phases. The update-20 B model's ONNX logits matched PyTorch within 4.1e-6 on 39 search positions, with all argmax actions identical. CPU serving is still a research installation and its value outputs are uncalibrated. On the 8840U, all 427 fixture requests returned legal moves: warm round-trip median 1.78 ms, p95 3.80 ms, cold start 167 ms. Optional 16-sample public-belief search, guided by the model's proposed move, had a p95 of 704 ms on 43 sampled requests, all legal. The guided variant is under independent arena evaluation; runtime feasibility alone is not evidence of strength. The isolated research installation is `~/powergrid-ai-strong` and has no production routing. + +## Current deeper evaluation + +Optional geographic proposals broaden build shortlists using connection costs and nearby available expansion sites, while preserving the classic reference for reproducibility. The independent `search_geo` opponent uses 16 sampled worlds and six proposals. Three configurations (B160/48 samples, corrected soft/48, corrected soft/16) each have four HF CPU shards of 48 games against it, sharing deals across configurations. These are development tests; reserved final seeds remain unused. Source v11 is pinned in `experiments.json`. + +The corrected soft model passed PyTorch/ONNX parity across all 427 fixture positions: all actions identical, maximum logit error 3.82e-5 and value error 2.15e-6. On the 8840U, all requests were legal, with 1.87 ms median and 3.45 ms p95 full-worker response. With 48-sample geographic search, a smaller 43-position sample had a 2.02-second p95 and all legal moves. These timings support feasibility, not playing strength. + +A bounded cache of static plant/fuel combinations was tested and removed: feature/search output hashes stayed identical, but measured runtime increased. No cache is included in source v11. diff --git a/ai/strong/arena-job.py b/ai/strong/arena-job.py new file mode 100644 index 0000000..7c6ba6b --- /dev/null +++ b/ai/strong/arena-job.py @@ -0,0 +1,45 @@ +"""Pinned-checkpoint CPU evaluation on HF Jobs.""" + +import os +from pathlib import Path +import subprocess +import sys +from huggingface_hub import HfApi, hf_hub_download + +repo = os.environ["HF_MODEL_REPO"] +model = hf_hub_download( + repo, os.environ["MODEL_PATH"], revision=os.environ["MODEL_REVISION"] +) +command = [ + sys.executable, + "ai/strong/evaluate.py", + model, + "--opponent", + os.environ.get("OPPONENT", "search_geo"), + "--games", + os.environ.get("GAMES", "48"), + "--workers", + os.environ.get("WORKERS", "24"), + "--seed", + os.environ["EVAL_SEED"], + "--search-samples", + os.environ.get("SEARCH_SAMPLES", "0"), + "--output", + "evaluation.json", +] +if os.getenv("GEOGRAPHY") == "1": + command.append("--geographic-search") +if os.getenv("OPPONENT_MODEL_PATH"): + opponent = hf_hub_download( + repo, + os.environ["OPPONENT_MODEL_PATH"], + revision=os.environ["OPPONENT_MODEL_REVISION"], + ) + command.extend(["--opponent-model", opponent]) +subprocess.run(command, check=True) +assert Path("evaluation.json").exists() +HfApi().upload_file( + repo_id=repo, + path_or_fileobj="evaluation.json", + path_in_repo=f"runs/{os.environ['RUN_NAME']}/evaluation.json", +) diff --git a/ai/strong/benchmark-serving.py b/ai/strong/benchmark-serving.py index 41c78cc..11851af 100644 --- a/ai/strong/benchmark-serving.py +++ b/ai/strong/benchmark-serving.py @@ -14,6 +14,7 @@ p.add_argument("fixtures") p.add_argument("--output", required=True) p.add_argument("--search-samples", type=int, default=0) p.add_argument("--stride", type=int, default=1) +p.add_argument("--geographic-search", action="store_true") args = p.parse_args() worker = subprocess.Popen( [ @@ -22,7 +23,8 @@ worker = subprocess.Popen( args.model, "--search-samples", str(args.search_samples), - ], + ] + + (["--geographic-search"] if args.geographic_search else []), stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True, @@ -61,6 +63,7 @@ report = { "model_sha256": sha, "all_moves_legal": True, "search_samples": args.search_samples, + "geographic_search": args.geographic_search, "cold_start_ms": latencies[0], "warm_roundtrip_p50_ms": float(np.percentile(latencies[1:], 50)), "warm_roundtrip_p95_ms": float(np.percentile(latencies[1:], 95)), diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index cca2a89..2b566b5 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -1,6 +1,6 @@ const c = require('../core.cjs'), eco = require('./economics.cjs'), - f = require('./features.cjs'), + encoders = require('./encoders.cjs'), readline = require('node:readline'); let envs = [], sequence = 0; @@ -15,15 +15,16 @@ function applyBot(e, p) { } finally { Math.random = old; } - } else if (role === 'search') { + } else if (role === 'search' || role === 'search_geo') { const legal = c.candidates(e.g, p), strategic = legal.length > 1 && legal.some((a) => ['ChoosePowerPlant', 'Bid', 'Build'].includes(a.name)); c.E.move( e.g, strategic ? require('./search.cjs').choose(e.g, p, { - samples: 4, - candidates: 5, + samples: role === 'search_geo' ? 16 : 4, + candidates: role === 'search_geo' ? 6 : 5, + geography: role === 'search_geo', seed: 'arena-search-' + e.g.round + '-' + p + '-' + Math.floor(e.rng() * 1e9), }).action : eco.choose(e.g, p, e.rng).action, @@ -48,17 +49,43 @@ function advance(e) { function observation(e) { if (c.E.ended(e.g) || e.steps >= 1600) return null; const seat = e.g.currentPlayers[0], - x = f.encode(e.g, seat); + x = encoders.forRevision(e.featureRevisions[e.roles[seat]]).encode(e.g, seat); delete x.moves; return { ...x, episode: e.id, roles: e.roles, round: e.g.round }; } -function reset(mode = 'mixed', arenaSeed, arenaId) { +function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { + if ( + ![ + 'mixed', + 'mixed_search', + 'economic', + 'heuristic', + 'rush', + 'legacy', + 'selfplay', + 'snapshot0', + 'snapshot1', + 'snapshot2', + 'search', + 'search_geo', + ].includes(mode) + ) + throw Error('Unknown opponent mode: ' + mode); const id = arenaSeed === undefined ? sequence++ : arenaId, seat = Math.floor(id / 4) % 3, kind = Math.floor(c.seedrandom(seed + '-opponents-' + id)() * 8); const opponent = - mode === 'mixed' - ? ['economic', 'heuristic', 'rush', 'legacy', 'selfplay', 'snapshot0', 'snapshot1', 'snapshot2'][kind] + mode === 'mixed' || mode === 'mixed_search' + ? [ + 'economic', + 'heuristic', + 'rush', + mode === 'mixed_search' ? 'search' : 'legacy', + 'selfplay', + 'snapshot0', + 'snapshot1', + 'snapshot2', + ][kind] : mode; const roles = opponent === 'selfplay' @@ -72,6 +99,8 @@ function reset(mode = 'mixed', arenaSeed, arenaId) { roles, rng: c.seedrandom(arenaSeed === undefined ? seed + '-bot-' + id : gameSeed + '-bot'), steps: 0, + policyMoves: {}, + featureRevisions, }; advance(e); return e; @@ -82,7 +111,9 @@ function reset(mode = 'mixed', arenaSeed, arenaId) { const q = JSON.parse(line), ended = []; if (q.op === 'reset') - envs = Array.from({ length: q.n }, (_, i) => reset(q.mode, q.arenaSeed, (q.offset || 0) + i)); + envs = Array.from({ length: q.n }, (_, i) => + reset(q.mode, q.arenaSeed, (q.offset || 0) + i, q.featureRevisions) + ); else if (q.op === 'step') for (let i = 0; i < envs.length; i++) { const e = envs[i]; @@ -99,10 +130,12 @@ function reset(mode = 'mixed', arenaSeed, arenaId) { samples: choice.searchSamples, candidates: 6, extraCandidates: [index], + geography: !!choice.geography, seed: 'arena-guided-' + e.id + '-' + e.steps, }).action : legal[index]; c.E.move(e.g, action, seat); + if (e.roles[seat] === 'learner') e.policyMoves[action.name] = (e.policyMoves[action.name] || 0) + 1; e.steps++; advance(e); if (c.E.ended(e.g) || e.steps >= 1600) @@ -114,6 +147,17 @@ function reset(mode = 'mixed', arenaSeed, arenaId) { value: c.E.ended(e.g) ? c.outcome(e.g) : [0, 0, 0], steps: e.steps, roles: e.roles, + policyMoves: e.policyMoves, + final: { + round: e.g.round, + players: e.g.players.map((p) => ({ + cities: p.cities.length, + powered: p.citiesPowered, + money: p.money, + capacity: c.capacity(p), + plants: p.powerPlants.map((pp) => pp.number), + })), + }, }); } else throw Error('unknown op'); diff --git a/ai/strong/check-export.py b/ai/strong/check-export.py new file mode 100644 index 0000000..39b478b --- /dev/null +++ b/ai/strong/check-export.py @@ -0,0 +1,69 @@ +"""Check an exported policy against its checkpoint on real engine positions.""" + +import argparse +import hashlib +import json +from pathlib import Path +import subprocess +import numpy as np +import onnxruntime as ort +import torch +from feature_contract import METADATA_KEY +from model import Policy, tensors + +p = argparse.ArgumentParser() +p.add_argument("checkpoint") +p.add_argument("model") +p.add_argument("fixtures") +p.add_argument("--output", required=True) +a = p.parse_args() +torch.set_num_threads(1) +checkpoint = torch.load(a.checkpoint, map_location="cpu", weights_only=True) +net = Policy(strategic_only=checkpoint.get("strategic_only", False)).eval() +net.load_state_dict(checkpoint["state_dict"]) +options = ort.SessionOptions() +options.intra_op_num_threads = 1 +session = ort.InferenceSession(a.model, options, providers=["CPUExecutionProvider"]) +revision = session.get_modelmeta().custom_metadata_map.get(METADATA_KEY, "3.0") +assert revision == checkpoint.get("feature_revision", "3.0") +worker = subprocess.Popen( + ["node", str(Path(__file__).with_name("worker.cjs"))], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + text=True, +) +errors = [0.0, 0.0] +count = 0 +try: + for line in Path(a.fixtures).read_text().splitlines(): + request = json.loads(line)["request"] + request["featureRevision"] = revision + worker.stdin.write(json.dumps(request) + "\n") + worker.stdin.flush() + row = json.loads(worker.stdout.readline()) + assert "error" not in row, row + inputs = tensors([row], "cpu") + with torch.inference_mode(): + expected = [x.numpy() for x in net(*inputs)] + actual = session.run( + None, dict(zip(["state", "actions", "mask"], [x.numpy() for x in inputs])) + ) + for i in range(2): + errors[i] = max(errors[i], float(np.max(np.abs(expected[i] - actual[i])))) + np.testing.assert_allclose(actual[i], expected[i], rtol=1e-4, atol=1e-5) + assert np.argmax(actual[0]) == np.argmax(expected[0]) + count += 1 +finally: + worker.stdin.close() + worker.wait(timeout=10) + worker.stdout.close() +report = { + "positions": count, + "feature_revision": revision, + "model_sha256": hashlib.sha256(Path(a.model).read_bytes()).hexdigest(), + "max_logit_error": errors[0], + "max_value_error": errors[1], + "all_actions_match": True, +} +Path(a.output).write_text(json.dumps(report, indent=2) + "\n") +print(json.dumps(report)) diff --git a/ai/strong/combine-arenas.py b/ai/strong/combine-arenas.py new file mode 100644 index 0000000..6be1443 --- /dev/null +++ b/ai/strong/combine-arenas.py @@ -0,0 +1,51 @@ +"""Combine disjoint paired arena shards without treating seat repeats as independent.""" + +import argparse +import json +from pathlib import Path +from arena_statistics import win_summary + +p = argparse.ArgumentParser() +p.add_argument("reports", nargs="+") +p.add_argument("--output", required=True) +a = p.parse_args() +reports = [json.loads(Path(x).read_text()) for x in a.reports] +keys = [ + "model_sha256", + "model_feature_revision", + "encoder_feature_revision", + "opponent", + "opponent_sha256", + "opponent_feature_revision", + "paired_seats", + "candidate_search_samples", + "candidate_geographic_search", +] +config = {k: reports[0][k] for k in keys} +rows = [] +seen = set() +for report in reports: + assert {k: report[k] for k in keys} == config, "Incompatible arena settings" + assert report["paired_seats"] and len(report["results"]) == report["games"] + for row in report["results"]: + key = (row["gameSeed"], row["variant"], row["sealed"], row["seat"]) + assert key not in seen, f"Duplicate match: {key}" + seen.add(key) + rows.append(row) +for deal in {r["gameSeed"] for r in rows}: + assert sum(r["gameSeed"] == deal for r in rows) == 12, "Incomplete paired deal" +result = { + **config, + "sources": a.reports, + **win_summary(rows), + "by_rules": [], + "results": rows, +} +for variant in ["original", "recharged"]: + for sealed in [False, True]: + group = [r for r in rows if r["variant"] == variant and r["sealed"] == sealed] + result["by_rules"].append( + {"variant": variant, "sealed": sealed, **win_summary(group)} + ) +Path(a.output).write_text(json.dumps(result, indent=2) + "\n") +print(json.dumps({k: v for k, v in result.items() if k != "results"})) diff --git a/ai/strong/distill.py b/ai/strong/distill.py index 3a061a1..67798ba 100644 --- a/ai/strong/distill.py +++ b/ai/strong/distill.py @@ -15,6 +15,7 @@ from huggingface_hub import HfApi, hf_hub_download from model import Policy, tensors from distillation_targets import policy_targets +from feature_contract import FEATURE_REVISION, embed_revision assert torch.cuda.is_available(), "Training must run on a GPU HF Job" torch.set_num_threads(2) @@ -42,6 +43,10 @@ for shard in range(int(os.getenv("SHARDS", "4"))): with gzip.open(path, "rt") as source: for line in source: game = json.loads(line) + if game.get("featureRevision", "3.0") != FEATURE_REVISION: + raise ValueError( + "Dataset uses a different feature revision; use its archived encoder or regenerate" + ) if game["truncated"]: continue # Keep whole games together, never split positions from one game. @@ -63,6 +68,7 @@ def export(name): torch.save( { "schema": 3, + "feature_revision": FEATURE_REVISION, "state_dim": 738, "action_dim": 96, "state_dict": {k: v.detach().cpu() for k, v in net.state_dict().items()}, @@ -90,6 +96,7 @@ def export(name): opset_version=17, dynamo=False, ) + embed_revision(out / f"{name}.onnx") def validate(): @@ -184,6 +191,7 @@ for epoch in range(int(os.getenv("EPOCHS", "30")) + 1): json.dumps( { "version": 3, + "feature_revision": FEATURE_REVISION, "players": 3, "map": "Germany", "run": run, diff --git a/ai/strong/economics-v3_0.cjs b/ai/strong/economics-v3_0.cjs new file mode 100644 index 0000000..d6b0c6c --- /dev/null +++ b/ai/strong/economics-v3_0.cjs @@ -0,0 +1,199 @@ +// Frozen economic features for historical checkpoints. +// Public-information economic calculations. Never inspect the hidden deck or sealed bids. +const c = require('../core.cjs'); +const income = (g, n) => g.paymentTable[Math.max(0, Math.min(g.paymentTable.length - 1, n))]; +function replenishment(g, r, step = g.step) { + return g[r + 'Resupply'][g.players.length - 2][step - 1]; +} +function fuelVariants(pp) { + const base = [0, 0, 0, 0]; + if (pp.type === 4) return Array.from({ length: pp.cost + 1 }, (_, coal) => [coal, pp.cost - coal, 0, 0]); + if (pp.type < 4) base[pp.type] = pp.cost; + return [base]; +} +function plans(g, p, unused = false) { + let result = [{ power: 0, used: [0, 0, 0, 0], plants: [] }]; + for (const pp of p.powerPlants) { + if (unused && !p.powerPlantsNotUsed.includes(pp.number)) continue; + const next = [...result]; + for (const prev of result) + for (const need of fuelVariants(pp)) + next.push({ + power: prev.power + pp.citiesPowered, + used: prev.used.map((x, i) => x + need[i]), + plants: [...prev.plants, pp.number], + }); + result = next; + } + return result; +} +function purchaseCost(g, p, used) { + let cost = 0; + for (let i = 0; i < 4; i++) + for (let k = 0; k < Math.max(0, used[i] - p[c.RES[i] + 'Left']); k++) { + if (k >= g[c.RES[i] + 'Market']) return Infinity; + cost += c.resourcePrice(g, c.RES[i], k); + } + return cost; +} +function plan(g, p, target = p.cities.length, { buy = true, unused = false, budget = p.money, endgame = false } = {}) { + let best = { power: 0, used: [0, 0, 0, 0], plants: [], cost: 0, score: -Infinity }; + for (const option of plans(g, p, unused)) { + if (!buy && option.used.some((n, i) => n > p[c.RES[i] + 'Left'])) continue; + const cost = buy ? purchaseCost(g, p, option.used) : 0; + if (cost > budget) continue; + const powered = Math.min(target, option.power + (unused ? p.citiesPowered : 0)); + const replacement = option.used.reduce((s, n, i) => s + n * c.resourcePrice(g, c.RES[i]), 0); + const score = (endgame ? powered * 1000 : income(g, powered)) - cost - (buy ? 0 : replacement * 0.2); + if (score > best.score) best = { ...option, powered, cost, score }; + } + return best; +} +function demand(g, p) { + return plan(g, p, Math.max(p.cities.length, Math.min(c.capacity(p), p.cities.length + 3))).used; +} +function futurePressure(g, r) { + const i = c.RES.indexOf(r), + needed = g.players.reduce((sum, p) => sum + demand(g, p)[i], 0); + return needed - replenishment(g, r); +} +function context(g, seat) { + const p = g.players[seat], + cap = c.capacity(p), + maxCities = Math.max(...g.players.map((x) => x.cities.length)); + const imminent = maxCities >= g.citiesToEndGame - 3; + const target = Math.min( + g.citiesToEndGame, + Math.max(p.cities.length, Math.min(cap, p.cities.length + (p.cities.length ? 3 : 2))) + ); + const fuel = plan(g, p, target, { budget: Math.max(0, p.money - (p.cities.length ? 0 : 10)), endgame: imminent }); + return { p, cap, maxCities, imminent, target, fuel }; +} +function plantValue(g, p, pp) { + const before = plan(g, p, 22), + currentCap = c.capacity(p); + let best = -Infinity; + const portfolios = + p.powerPlants.length < 3 + ? [[...p.powerPlants, pp]] + : p.powerPlants.map((_, i) => [...p.powerPlants.filter((x, j) => i !== j), pp]); + for (const powerPlants of portfolios) { + const after = plan(g, { ...p, powerPlants }, 22), + gain = powerPlants.reduce((s, x) => s + x.citiesPowered, 0) - currentCap; + const fuelSaving = before.cost - after.cost; + const need = Math.max(0, p.cities.length + 3 - currentCap); + const value = pp.number * 0.55 + gain * (need > 0 ? 10 : 6) + fuelSaving * 2; + best = Math.max(best, value); + } + const reserve = p.cities.length === 0 ? 15 : Math.max(8, Math.min(35, p.cities.length * 1.5)); + return Math.max(0, Math.min(p.money - reserve, best)); +} +function scores(g, seat, actions = c.candidates(g, seat), style = 'economic') { + const x = context(g, seat), + p = x.p; + let production; + if (g.phase === c.E.Phase.Bureaucracy) + production = plan(g, p, p.cities.length, { + buy: false, + unused: true, + endgame: Math.max(...g.players.map((p) => p.cities.length)) >= g.citiesToEndGame, + }); + const building = g.phase === c.E.Phase.Building; + const possible = building ? plan(g, p, p.cities.length + 1, { buy: false }).powered : 0; + const availablePower = building ? plan(g, p, x.cap, { buy: false }).powered : 0; + const opponentPower = building + ? Math.max( + ...g.players + .filter((z) => z.id !== seat) + .map((z) => plan(g, z, z.cities.length + 2, { buy: false }).powered) + ) + : 0; + const bidWorth = g.chosenPowerPlant ? plantValue(g, p, g.chosenPowerPlant) : 0; + return actions.map((a) => { + const d = a.data; + switch (a.name) { + case 'ChoosePowerPlant': { + const pp = g.actualMarket.find((p) => p.number === d); + const v = plantValue(g, p, pp); + return v >= d ? 10 + (v - d) * 0.3 + pp.citiesPowered * 0.3 : -20; + } + case 'Bid': { + const v = bidWorth; + if (g.round === 1 && !actions.some((a) => a.name === 'Pass')) return -d; + return d <= v ? (g.options.fastBid ? 10 - Math.abs(d - v) * 0.5 : 10 - d * 0.2) : -30 - d; + } + case 'DiscardPowerPlant': { + const powerPlants = p.powerPlants.filter((pp) => pp.number !== d); + const pp = plan(g, { ...p, powerPlants }, 22); + return pp.power * 5 - pp.cost; + } + case 'BuyResource': { + const i = c.RES.indexOf(d.resource), + price = c.resourcePrice(g, d.resource); + if (p[d.resource + 'Left'] < x.fuel.used[i]) return 30 - price; + // Stock one extra round only when demand exceeds replenishment and today's price is low. + const surplus = p[d.resource + 'Left'] - x.fuel.used[i], + ownNeed = c.fuelDemand(g, p)[d.resource]; + if ( + style !== 'rush' && + ownNeed > 0 && + surplus < ownNeed && + price <= 2 && + p.money > 35 && + futurePressure(g, d.resource) > 0 + ) + return 4 - price; + return -20; + } + case 'Build': { + const next = p.cities.length + 1; + if (p.money > 140 || g.round > 18) return 10 - d.price * 0.1; + if (next >= g.citiesToEndGame && possible < opponentPower) return -30; + if (next <= x.cap && (next <= availablePower || x.imminent)) return 25 - d.price * 0.35; + if (style === 'rush' && p.money - d.price > 30) return 8 - d.price * 0.15; + return -20; + } + case 'UsePowerPlant': + return production.plants.includes(d.powerPlant) && + c.RES.every((r, i) => d.resourcesSpent.filter((x) => x === r).length <= production.used[i]) + ? 20 + + d.citiesPowered * 0.1 - + d.resourcesSpent.reduce((s, r) => s + c.resourcePrice(g, r), 0) * 0.01 + : -10; + case 'DiscardResources': + return p[d + 'Left'] - x.fuel.used[c.RES.indexOf(d)]; + case 'Pass': + return 0; + default: + return 0; + } + }); +} +function choose(g, seat, rng = () => 0.5, style = 'economic') { + const actions = c.candidates(g, seat), + values = scores(g, seat, actions, style); + let index = 0, + best = -Infinity; + values.forEach((x, i) => { + x += rng() * 0.001; + if (x > best) { + best = x; + index = i; + } + }); + return { index, action: actions[index] }; +} +module.exports = { + income, + replenishment, + fuelVariants, + plans, + purchaseCost, + plan, + demand, + futurePressure, + context, + plantValue, + scores, + choose, +}; diff --git a/ai/strong/economics.cjs b/ai/strong/economics.cjs index 82344bf..0211f56 100644 --- a/ai/strong/economics.cjs +++ b/ai/strong/economics.cjs @@ -2,6 +2,13 @@ const c = require('../core.cjs'); const income = (g, n) => g.paymentTable[Math.max(0, Math.min(g.paymentTable.length - 1, n))]; function replenishment(g, r, step = g.step) { + if ( + r === 'uranium' && + g.options.variant === 'recharged' && + ['Germany', 'Italy'].includes(g.options.map) && + g.card39Bought + ) + return 0; return g[r + 'Resupply'][g.players.length - 2][step - 1]; } function fuelVariants(pp) { diff --git a/ai/strong/encoders.cjs b/ai/strong/encoders.cjs new file mode 100644 index 0000000..8a5deab --- /dev/null +++ b/ai/strong/encoders.cjs @@ -0,0 +1,7 @@ +const current = require('./features.cjs'); +function forRevision(revision = current.FEATURE_REVISION) { + if (revision === current.FEATURE_REVISION) return current; + if (revision === '3.0') return require('./features-v3_0.cjs'); + throw Error('Unsupported feature revision: ' + revision); +} +module.exports = { forRevision }; diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index abc2fcb..fa362af 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -8,16 +8,18 @@ import numpy as np from infer import Model from pool import EnginePool from arena_statistics import win_summary +from feature_contract import FEATURE_REVISION, check_revision, model_revision p = argparse.ArgumentParser() p.add_argument("model") p.add_argument( "--opponent", default="economic", - choices=["economic", "heuristic", "rush", "legacy", "search"], + choices=["economic", "heuristic", "rush", "legacy", "search", "search_geo"], ) p.add_argument("--opponent-model", help="Frozen ONNX policy in both opponent seats") p.add_argument("--workers", type=int, default=4) +p.add_argument("--geographic-search", action="store_true") p.add_argument( "--search-samples", type=int, @@ -27,22 +29,42 @@ p.add_argument( p.add_argument("--games", type=int, default=480) p.add_argument("--seed", default="strong-screening-v1") p.add_argument("--output", required=True) +p.add_argument( + "--allow-feature-transfer", + action="store_true", + help="Explicit research-only encoder transfer", +) args = p.parse_args() if not 0 <= args.search_samples <= 64: p.error("--search-samples must be 0..64") +if args.geographic_search and not args.search_samples: + p.error("--geographic-search requires positive --search-samples") model = Model(args.model) if args.games < 12 or args.games % 12: p.error("--games must be a positive multiple of 12 for paired rules and seats") opponent_model = Model(args.opponent_model) if args.opponent_model else None pool = EnginePool(args.workers, seed=args.seed, script="ai/strong/bridge.cjs") -current = pool.call( - { - "op": "reset", - "n": args.games, - "mode": "snapshot0" if opponent_model else args.opponent, - "arenaSeed": args.seed, - } -)["observations"] +feature_revision = ( + FEATURE_REVISION if args.allow_feature_transfer else model_revision(model) +) +feature_revisions = ( + {} if args.allow_feature_transfer else {"learner": model_revision(model)} +) +if opponent_model and not args.allow_feature_transfer: + feature_revisions["snapshot0"] = model_revision(opponent_model) +try: + current = pool.call( + { + "op": "reset", + "n": args.games, + "mode": "snapshot0" if opponent_model else args.opponent, + "arenaSeed": args.seed, + "featureRevisions": feature_revisions, + } + )["observations"] +except BaseException: + pool.close() + raise rows = [] latency = [] start = time.perf_counter() @@ -55,11 +77,18 @@ try: continue t = time.perf_counter() actor = model if x["roles"][x["seat"]] == "learner" else opponent_model + check_revision( + actor, x.get("featureRevision", "3.0"), args.allow_feature_transfer + ) a, _ = actor.predict(x["state"], x["actions"]) if actor is model: latency.append(1000 * (time.perf_counter() - t)) actions.append( - {"proposal": a, "searchSamples": args.search_samples} + { + "proposal": a, + "searchSamples": args.search_samples, + "geography": args.geographic_search, + } if actor is model and args.search_samples else a ) @@ -81,10 +110,16 @@ finally: report = { "model": args.model, "model_sha256": model.sha256, + "model_feature_revision": model_revision(model), + "encoder_feature_revision": feature_revision, "opponent": args.opponent_model or args.opponent, "opponent_sha256": opponent_model.sha256 if opponent_model else None, + "opponent_feature_revision": model_revision(opponent_model) + if opponent_model + else None, "paired_seats": True, "candidate_search_samples": args.search_samples, + "candidate_geographic_search": args.geographic_search, "seed": args.seed, "games": len(rows), "win_rate": float(np.mean([r["win"] for r in rows])), diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 599f788..7ec4dbd 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -24,7 +24,33 @@ "search-teacher-v2-5": "6abd1c1e404719ba37613631", "search-teacher-v2-6": "6abd1c1f404719ba37613633", "search-teacher-v2-7": "6abd1c20404719ba37613635", - "b20-guided-search-screening": "6abd1c21fbc85ba68235b521" + "b20-guided-search-screening": "6abd1c21fbc85ba68235b521", + "search-teacher-v3-0": "6abd1fcffbc85ba68235b664", + "search-teacher-v3-1": "6abd1fd0fbc85ba68235b666", + "search-teacher-v3-2": "6abd1fd1404719ba3761371b", + "search-teacher-v3-3": "6abd1fd2404719ba3761371d", + "search-teacher-v3-4": "6abd1fd2404719ba3761371f", + "search-teacher-v3-5": "6abd1fd3404719ba37613721", + "search-teacher-v3-6": "6abd1fd4fbc85ba68235b668", + "search-teacher-v3-7": "6abd1fd5fbc85ba68235b66a", + "b160-guided-16-screening": "6abd2167fbc85ba68235b71e", + "b160-guided-48-screening": "6abd2167404719ba376137a3", + "search-distillation-v3-hard": "6abd2239404719ba376137c0", + "search-distillation-v3-soft": "6abd223a404719ba376137c2", + "strong-refine-v1-full": "6abd2782404719ba3761385e", + "strong-refine-v1-search": "6abd2783404719ba37613860", + "geo-screen-v2-soft48-0": "6abd2a7cfbc85ba68235b99b", + "geo-screen-v2-soft48-1": "6abd2a7d404719ba376138f9", + "geo-screen-v2-soft48-2": "6abd2a7e404719ba376138fb", + "geo-screen-v2-soft48-3": "6abd2a7f404719ba37613900", + "geo-screen-v2-b16048-0": "6abd2a7f404719ba37613902", + "geo-screen-v2-b16048-1": "6abd2a80404719ba37613904", + "geo-screen-v2-b16048-2": "6abd2a81404719ba37613906", + "geo-screen-v2-b16048-3": "6abd2a81404719ba37613908", + "geo-screen-v2-soft16-0": "6abd2a82fbc85ba68235b99f", + "geo-screen-v2-soft16-1": "6abd2a83404719ba3761390a", + "geo-screen-v2-soft16-2": "6abd2a83404719ba3761390c", + "geo-screen-v2-soft16-3": "6abd2a84404719ba3761390e" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -46,12 +72,33 @@ "archive": "strong-source-v6.tgz", "commit": "cc79acffc12ad4cc1daffbad20b024d2e1f4fe98" }, - "stopped_for_sustained_regression": [ - "6abd15cafbc85ba68235b347", - "6abd15ca404719ba376134e5" - ], + "stopped_for_sustained_regression": ["6abd15cafbc85ba68235b347", "6abd15ca404719ba376134e5"], "all_phase_distillation_source": { "archive": "strong-source-v7.tgz", "commit": "0862207a0f62cb75edfd0e6ecbc472cdc190bcd0" + }, + "corrected_teacher_source": { + "archive": "strong-source-v8.tgz", + "commit": "afd0e368d939b996d02efc8eb24e653b47ca0bd4", + "feature_revision": "3.1-uranium39" + }, + "superseded_training_data": { + "search-teacher-v2": "Feature revision 3.0 omits Recharged uranium cutoff; retain for reproducibility but use v3 for corrected training" + }, + "checkpoints": { + "b20": { + "model_commit": "f9dfad5bde9862bc41aa42d77d9622621d70e8ce", + "sha256": "f9a5d4f206c03d34acb99b3263234a8d00cefdd6ae1a8dc4e353bd4d1ae9a07b", + "feature_revision": "3.0" + }, + "b160": { + "model_commit": "55e2354f08c8088edd1f6634e1bb7d903dbfaf94", + "sha256": "3a4748c0511a7f65311611969330d2d1423a2b88ba81cfc212b4956d6a1ab891", + "feature_revision": "3.0" + } + }, + "geographic_arena_source": { + "archive": "strong-source-v11.tgz", + "commit": "49c872954eaf7761a3ac3453acbf737f569849b2" } } diff --git a/ai/strong/export.py b/ai/strong/export.py index 89313fa..27ffff7 100644 --- a/ai/strong/export.py +++ b/ai/strong/export.py @@ -5,6 +5,7 @@ import json from pathlib import Path import torch from model import Policy +from feature_contract import embed_revision p = argparse.ArgumentParser() p.add_argument("checkpoint") @@ -32,6 +33,7 @@ torch.onnx.export( opset_version=17, dynamo=False, ) +embed_revision(args.output, checkpoint.get("feature_revision", "3.0")) Path(args.output + ".json").write_text( json.dumps( {"source": args.checkpoint, "strategic_only": strategic_only, "schema": 3} diff --git a/ai/strong/feature_contract.py b/ai/strong/feature_contract.py new file mode 100644 index 0000000..7869e5d --- /dev/null +++ b/ai/strong/feature_contract.py @@ -0,0 +1,26 @@ +"""Keep checkpoints paired with the exact meaning of their input features.""" + +FEATURE_REVISION = "3.1-uranium39" +METADATA_KEY = "powergrid.feature_revision" + + +def model_revision(model): + return model.session.get_modelmeta().custom_metadata_map.get(METADATA_KEY, "3.0") + + +def check_revision(model, observed, allow_transfer=False): + trained = model_revision(model) + if trained != observed and not allow_transfer: + raise ValueError( + f"Feature revision mismatch: model {trained}, encoder {observed}" + ) + + +def embed_revision(path, revision=FEATURE_REVISION): + import onnx + + model = onnx.load(str(path)) + props = {p.key: p.value for p in model.metadata_props} + props[METADATA_KEY] = revision + onnx.helper.set_model_props(model, props) + onnx.save(model, str(path)) diff --git a/ai/strong/features-v3_0.cjs b/ai/strong/features-v3_0.cjs new file mode 100644 index 0000000..94be715 --- /dev/null +++ b/ai/strong/features-v3_0.cjs @@ -0,0 +1,84 @@ +// Frozen encoder for historical checkpoints; do not update its semantics. +const c = require('../core.cjs'), + eco = require('./economics-v3_0.cjs'); +const SCHEMA = 3; +const spatial = require('./spatial.cjs'); +function observe(g, seat, geometry) { + const state = c.observe(g, seat), + order = [seat, (seat + 1) % 3, (seat + 2) % 3]; + for (const r of c.RES) { + const supplies = g[r + 'Resupply'][g.players.length - 2]; + state.push(...supplies.map((n) => n / 12), c.resourcePrice(g, r) / 20); + // Exact capped refill available now, and shared demand under full portfolio use. + state.push(Math.min(g[r + 'Supply'], eco.replenishment(g, r), g[r + 'Prices'].length - g[r + 'Market']) / 24); + } + state.push(g.currentPlayers.length / 3, ...order.map((i) => +g.currentPlayers.includes(i))); + for (const id of order) { + const p = g.players[id], + desired = eco.demand(g, p), + fuelled = eco.plan(g, p, 22, { buy: false }); + state.push( + c.capacity(p) / 22, + fuelled.power / 22, + ...desired.map((n) => n / 12), + ...p.powerPlants.slice(0, 4).map((pp) => +p.powerPlantsNotUsed.includes(pp.number)), + ...Array(Math.max(0, 4 - p.powerPlants.length)).fill(0) + ); + state.push(...Array.from({ length: 4 }, (_, i) => +(p.powerPlants[i]?.type === 6))); + const rank = g.playerOrder.indexOf(id); + state.push(rank / 2, (2 - rank) / 2, +!p.passed, +!p.skipAuction); + for (const r of c.RES) { + const i = c.RES.indexOf(r); + state.push(Math.max(0, desired[i] - p[r + 'Left']) / 12); + } + } + state.push(...g.paymentTable.slice(0, 23).map((n) => n / 200)); + if (!state.every(Number.isFinite)) throw Error('nonfinite strong observation'); + return [...state, ...spatial.stateFeatures(g, seat, geometry)]; +} +function encode(g, seat) { + const moves = c.candidates(g, seat), + prior = eco.scores(g, seat, moves), + p = g.players[seat]; + const best = Math.max(...prior); + const geometry = spatial.territories(g, seat), + worth = new Map(), + ownDemand = eco.demand(g, p); + const plantWorth = (pp) => { + if (!worth.has(pp.number)) worth.set(pp.number, eco.plantValue(g, p, pp)); + return worth.get(pp.number); + }; + const actions = moves.map((a, i) => { + const pp = a.name === 'ChoosePowerPlant' ? g.actualMarket.find((p) => p.number === a.data) : g.chosenPowerPlant; + const cost = + a.name === 'BuyResource' + ? c.resourcePrice(g, a.data.resource) + : a.name === 'Bid' + ? a.data + : a.data?.price || 0; + const extra = [ + Math.max(-10, Math.min(10, prior[i] / 10)), + +(prior[i] === best), + cost / Math.max(1, p.money), + Math.max(0, p.money - cost) / 200, + ]; + if (pp) extra.push(plantWorth(pp) / 200, pp.citiesPowered / 8, pp.cost / 4); + else extra.push(0, 0, 0); + if (a.name === 'BuyResource') { + const r = a.data.resource, + j = c.RES.indexOf(r); + extra.push(eco.replenishment(g, r) / 12, (ownDemand[j] - p[r + 'Left']) / 12); + } else extra.push(0, 0); + return [...c.actionFeatures(g, seat, a), ...extra, ...spatial.actionFeatures(g, seat, a, geometry)]; + }); + return { + featureRevision: '3.0', + state: observe(g, seat, geometry), + actions, + moves, + prior: prior.map((x) => Math.max(-10, Math.min(10, x / 10))), + teacher: prior.indexOf(best), + seat, + }; +} +module.exports = { SCHEMA, observe, encode }; diff --git a/ai/strong/features.cjs b/ai/strong/features.cjs index 17b8b24..73f61a2 100644 --- a/ai/strong/features.cjs +++ b/ai/strong/features.cjs @@ -1,12 +1,13 @@ const c = require('../core.cjs'), eco = require('./economics.cjs'); const SCHEMA = 3; +const FEATURE_REVISION = '3.1-uranium39'; const spatial = require('./spatial.cjs'); function observe(g, seat, geometry) { const state = c.observe(g, seat), order = [seat, (seat + 1) % 3, (seat + 2) % 3]; for (const r of c.RES) { - const supplies = g[r + 'Resupply'][g.players.length - 2]; + const supplies = [1, 2, 3].map((step) => eco.replenishment(g, r, step)); state.push(...supplies.map((n) => n / 12), c.resourcePrice(g, r) / 20); // Exact capped refill available now, and shared demand under full portfolio use. state.push(Math.min(g[r + 'Supply'], eco.replenishment(g, r), g[r + 'Prices'].length - g[r + 'Market']) / 24); @@ -71,6 +72,7 @@ function encode(g, seat) { return [...c.actionFeatures(g, seat, a), ...extra, ...spatial.actionFeatures(g, seat, a, geometry)]; }); return { + featureRevision: FEATURE_REVISION, state: observe(g, seat, geometry), actions, moves, @@ -79,4 +81,4 @@ function encode(g, seat) { seat, }; } -module.exports = { SCHEMA, observe, encode }; +module.exports = { SCHEMA, FEATURE_REVISION, observe, encode }; diff --git a/ai/strong/geographic-proposals.cjs b/ai/strong/geographic-proposals.cjs new file mode 100644 index 0000000..6e2ba1c --- /dev/null +++ b/ai/strong/geographic-proposals.cjs @@ -0,0 +1,42 @@ +// Proposal diversity only: the rules engine and rollout outcomes choose the move. +const graph = require('./public-graph.cjs'); +const cache = new WeakMap(); +function distances(map, topology) { + if (cache.has(map)) return cache.get(map); + const n = topology.nodes.length, + matrix = Array.from({ length: n }, (_, i) => Array.from({ length: n }, (_, j) => (i === j ? 0 : Infinity))); + for (const edge of topology.edges) { + matrix[edge.a][edge.b] = Math.min(matrix[edge.a][edge.b], edge.cost); + matrix[edge.b][edge.a] = Math.min(matrix[edge.b][edge.a], edge.cost); + } + for (let k = 0; k < n; k++) + for (let i = 0; i < n; i++) + for (let j = 0; j < n; j++) matrix[i][j] = Math.min(matrix[i][j], matrix[i][k] + matrix[k][j]); + cache.set(map, matrix); + return matrix; +} +function rank(g, seat, actions) { + const topology = graph.encode(g, seat), + matrix = distances(g.map, topology), + index = new Map(topology.nodes.map((n, i) => [n.name, i])), + open = topology.nodes + .map((node, i) => ({ node, i })) + .filter(({ node }) => node.openSlots > 0 && !node.owners[0]); + return actions + .flatMap((action, i) => { + if (action.name !== 'Build') return []; + const at = index.get(action.data.name), + node = topology.nodes[at], + growth = open + .filter(({ i }) => i !== at) + .map(({ i }) => matrix[at][i]) + .filter(Number.isFinite) + .sort((a, b) => a - b) + .slice(0, 3); + const score = + action.data.price + (growth.length ? growth.reduce((a, b) => a + b, 0) / growth.length : 1000); + return [{ index: i, region: node.region, island: node.island, score }]; + }) + .sort((a, b) => a.score - b.score || a.index - b.index); +} +module.exports = { rank }; diff --git a/ai/strong/infer.py b/ai/strong/infer.py index 7a5880e..960c666 100644 --- a/ai/strong/infer.py +++ b/ai/strong/infer.py @@ -5,13 +5,17 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from infer import Model, Node +from feature_contract import check_revision, model_revision p = argparse.ArgumentParser() p.add_argument("model") p.add_argument("--search-samples", type=int, default=0) +p.add_argument("--geographic-search", action="store_true") args = p.parse_args() if not 0 <= args.search_samples <= 64: p.error("--search-samples must be 0..64") +if args.geographic_search and not args.search_samples: + p.error("--geographic-search requires positive --search-samples") model = Model(args.model) node = Node("strong/worker.cjs") try: @@ -23,9 +27,10 @@ try: raise ValueError("Expected object") q = obj start = time.perf_counter() - r = node.call({**q, "op": "rank"}) + r = node.call({**q, "op": "rank", "featureRevision": model_revision(model)}) if "error" in r: raise ValueError(r["error"]) + check_revision(model, r.get("featureRevision", "3.0")) index, values = model.predict(r["state"], r["actions"]) search = None if args.search_samples: @@ -35,6 +40,8 @@ try: "op": "search", "proposal": index, "samples": args.search_samples, + "featureRevision": model_revision(model), + "geography": args.geographic_search, } ) if "error" in search: @@ -50,6 +57,7 @@ try: "valueStatus": "uncalibrated-training-opponents", "playerOrder": r["playerOrder"], "schema": 3, + "featureRevision": r["featureRevision"], "search": { k: v for k, v in search.items() diff --git a/ai/strong/launch-arena.sh b/ai/strong/launch-arena.sh new file mode 100644 index 0000000..5c30d5b --- /dev/null +++ b/ai/strong/launch-arena.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +# name model-path revision opponent samples geography games seed +hf jobs run --detach --flavor cpu-performance --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME="${1:?name}" --env MODEL_PATH="${2:?model path}" --env MODEL_REVISION="${3:?revision}" \ + --env OPPONENT="${4:?opponent}" --env SEARCH_SAMPLES="${5:?samples}" --env GEOGRAPHY="${6:?geography}" \ + --env GAMES="${7:?games}" --env EVAL_SEED="${8:?seed}" --env WORKERS=24 \ + --label project=powergrid-ai --label stage="$1" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v11.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +python -u ai/strong/arena-job.py +' diff --git a/ai/strong/launch-distill-v3.sh b/ai/strong/launch-distill-v3.sh new file mode 100644 index 0000000..af5d446 --- /dev/null +++ b/ai/strong/launch-distill-v3.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail +mode=${1:-hard} +[[ "$mode" == hard || "$mode" == soft ]] +hf jobs run --detach --flavor a10g-large --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME="search-distillation-v3-$mode" --env TARGET_MODE="$mode" --env TRAIN_SEED=310 --env EPOCHS=20 --env DATA_VERSION=search-teacher-v3 --env SHARDS=8 --env DISAGREEMENT_WEIGHT=2 \ + --label project=powergrid-ai --label stage="search-distillation-v3-$mode" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v8.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/distill.py +' diff --git a/ai/strong/launch-guided-b160-16.sh b/ai/strong/launch-guided-b160-16.sh new file mode 100644 index 0000000..097f09a --- /dev/null +++ b/ai/strong/launch-guided-b160-16.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --label project=powergrid-ai --label stage=b160-guided-16-screening \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v6.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +python -c "from huggingface_hub import hf_hub_download; hf_hub_download(\"coyotte508/powergrid-ai-germany-v1\",\"runs/strong-league-v2-b/best.onnx\",revision=\"55e2354f08c8088edd1f6634e1bb7d903dbfaf94\",local_dir=\"models\")" +python ai/strong/evaluate.py models/runs/strong-league-v2-b/best.onnx --opponent search --search-samples 16 --games 96 --workers 24 --seed strong-search-screening-v1 --output evaluation.json +python -c "import os;from huggingface_hub import HfApi;HfApi().upload_file(repo_id=os.environ[\"HF_MODEL_REPO\"],path_or_fileobj=\"evaluation.json\",path_in_repo=\"runs/b160-guided-16-screening/evaluation.json\")" +' diff --git a/ai/strong/launch-guided-b160-48.sh b/ai/strong/launch-guided-b160-48.sh new file mode 100644 index 0000000..1f9aae6 --- /dev/null +++ b/ai/strong/launch-guided-b160-48.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --label project=powergrid-ai --label stage=b160-guided-48-screening \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnxruntime +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v6.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +python -c "from huggingface_hub import hf_hub_download; hf_hub_download(\"coyotte508/powergrid-ai-germany-v1\",\"runs/strong-league-v2-b/best.onnx\",revision=\"55e2354f08c8088edd1f6634e1bb7d903dbfaf94\",local_dir=\"models\")" +python ai/strong/evaluate.py models/runs/strong-league-v2-b/best.onnx --opponent search --search-samples 48 --games 96 --workers 24 --seed strong-search-screening-v1 --output evaluation.json +python -c "import os;from huggingface_hub import HfApi;HfApi().upload_file(repo_id=os.environ[\"HF_MODEL_REPO\"],path_or_fileobj=\"evaluation.json\",path_in_repo=\"runs/b160-guided-48-screening/evaluation.json\")" +' diff --git a/ai/strong/launch-refine-full.sh b/ai/strong/launch-refine-full.sh new file mode 100644 index 0000000..06a0b5f --- /dev/null +++ b/ai/strong/launch-refine-full.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor a10g-large --timeout 4h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env INIT_CHECKPOINT=runs/search-distillation-v3-soft/best.pt --env INIT_REVISION=45a839c001fce2fe3dd9b1f5c7a523db8ceee890 --env ANCHOR_POLICY=initial \ + --env RUN_NAME=strong-refine-v1-full --env TRAIN_SEED=410 --env LR=.0001 --env ENTROPY=.005 --env ANCHOR=.03 --env UPDATES=120 --env EVAL_EVERY=10 \ + --env ENVS=128 --env WORKERS=8 --env BATCH_SIZE=512 \ + --label project=powergrid-ai --label stage=strong-refine-v1-full \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v10.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/launch-refine-search.sh b/ai/strong/launch-refine-search.sh new file mode 100644 index 0000000..1ceba90 --- /dev/null +++ b/ai/strong/launch-refine-search.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor h200 --timeout 4h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env INIT_CHECKPOINT=runs/search-distillation-v3-soft/best.pt --env INIT_REVISION=45a839c001fce2fe3dd9b1f5c7a523db8ceee890 --env ANCHOR_POLICY=initial --env OPPONENT_MODE=mixed_search --env STRATEGIC_ONLY=1 \ + --env RUN_NAME=strong-refine-v1-search --env TRAIN_SEED=411 --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.05 --env UPDATES=80 --env EVAL_EVERY=10 \ + --env ENVS=128 --env WORKERS=20 --env BATCH_SIZE=512 \ + --label project=powergrid-ai --label stage=strong-refine-v1-search \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v10.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/launch-search-data-v3.sh b/ai/strong/launch-search-data-v3.sh new file mode 100644 index 0000000..2b8df66 --- /dev/null +++ b/ai/strong/launch-search-data-v3.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +shard=${1:?Specify numeric shard} +[[ "$shard" =~ ^[0-9]+$ ]] +hf jobs run --detach --flavor cpu-performance --timeout 2h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env SHARD="$shard" --env GAMES=256 --env DATA_WORKERS=24 --env SEARCH_SAMPLES=12 --env DATA_VERSION=search-teacher-v3 --env INCLUDE_ALL_PHASES=1 \ + --label project=powergrid-ai --label stage="search-teacher-v3-$shard" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v8.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/generate-search-data.py +' diff --git a/ai/strong/search-teacher.cjs b/ai/strong/search-teacher.cjs index f0609dd..c559708 100644 --- a/ai/strong/search-teacher.cjs +++ b/ai/strong/search-teacher.cjs @@ -61,5 +61,13 @@ const truncated = !c.E.ended(g), value = truncated ? [0, 0, 0] : c.outcome(g), relativeValue = Array.from({ length: 3 }, (_, i) => value[(seat + i) % 3]); console.log( - JSON.stringify({ id, seed, steps, truncated, value, rows: rows.map((r) => ({ ...r, value: relativeValue })) }) + JSON.stringify({ + id, + seed, + featureRevision: features.FEATURE_REVISION, + steps, + truncated, + value, + rows: rows.map((r) => ({ ...r, value: relativeValue })), + }) ); diff --git a/ai/strong/search.cjs b/ai/strong/search.cjs index 4f174a2..97ff255 100644 --- a/ai/strong/search.cjs +++ b/ai/strong/search.cjs @@ -2,10 +2,31 @@ const c = require('../core.cjs'), eco = require('./economics.cjs'); const { createAnalysisScenario } = require('../../engine/dist/src/analysis.js'); -function shortlist(g, seat, limit = 5) { +function shortlist(g, seat, limit = 5, geography = false) { const a = c.candidates(g, seat), v = eco.scores(g, seat, a), indices = [...a.keys()].sort((i, j) => v[j] - v[i]); + if (geography && a.some((x) => x.name === 'Build')) { + const ranked = require('./geographic-proposals.cjs').rank(g, seat, a), + chosen = new Set([indices[0]]), + add = (index) => { + if (index >= 0 && chosen.size < limit) chosen.add(index); + }; + add(a.findIndex((x) => x.name === 'Pass')); + add(c.heuristic(g, seat).index); + // Cover different islands/regions before filling equal-price ties. + for (const key of ['island', 'region']) { + const seen = new Set(); + for (const x of ranked) + if (!seen.has(x[key])) { + add(x.index); + seen.add(x[key]); + } + } + for (const x of ranked) add(x.index); + for (const i of indices) add(i); + return [...chosen]; + } const chosen = new Set(indices.slice(0, Math.max(1, limit - 2))); const pass = a.findIndex((x) => x.name === 'Pass'); if (pass >= 0) chosen.add(pass); @@ -18,10 +39,17 @@ function shortlist(g, seat, limit = 5) { function choose( g, seat, - { samples = 6, candidates = 5, seed = 'public-search', maxSteps = 1200, extraCandidates = [] } = {} + { + samples = 6, + candidates = 5, + seed = 'public-search', + maxSteps = 1200, + extraCandidates = [], + geography = false, + } = {} ) { const actions = c.candidates(g, seat), - options = [...new Set([...shortlist(g, seat, candidates), ...extraCandidates])]; + options = [...new Set([...shortlist(g, seat, candidates, geography), ...extraCandidates])]; if (options.some((i) => !Number.isInteger(i) || i < 0 || i >= actions.length)) throw Error('Invalid search proposal'); if (options.length === 1) return { index: options[0], action: actions[options[0]], evaluations: 0 }; diff --git a/ai/strong/test.cjs b/ai/strong/test.cjs index fd9d177..91377d1 100644 --- a/ai/strong/test.cjs +++ b/ai/strong/test.cjs @@ -39,6 +39,33 @@ test('UK/Ireland tracks opponent presence and empty slots on both islands', () = assert.equal(island.open, old.open - 1); } }); +test('effective uranium replenishment matches the engine after Recharged plant 39', () => { + for (const variant of ['original', 'recharged']) { + const g = c.start('uranium-refill-rule', variant), + before = f.observe(g, g.currentPlayers[0]); + g.card39Bought = true; + // The persistent rule applies even when nobody currently owns plant 39. + assert.ok(g.players.every((p) => !p.powerPlants.some((pp) => pp.number === 39))); + const expected = variant === 'recharged' ? 0 : g.uraniumResupply[1][0]; + assert.equal(eco.replenishment(g, 'uranium'), expected); + if (variant === 'recharged') { + assert.notDeepEqual(f.observe(g, g.currentPlayers[0]), before); + assert.deepEqual( + [1, 2, 3].map((step) => eco.replenishment(g, 'uranium', step)), + [0, 0, 0] + ); + } + g.uraniumMarket = 0; + g.uraniumSupply = 12; + let steps = 0; + while (g.round === 1 && steps++ < 300) { + const p = g.currentPlayers[0]; + c.E.move(g, eco.choose(g, p).action, p); + } + assert.equal(g.round, 2); + assert.equal(g.uraniumMarket, expected); + } +}); test('projected order uses cities and highest-plant tie break', () => { const g = c.start('order'); g.players[0].cities = [{ name: 'a' }]; @@ -101,3 +128,31 @@ test('public topology preserves map edges, ownership and island crossing rule', assert.deepEqual(graph.encode(g, 0), x); } }); + +test('geographic search proposals cover starting regions and ignore hidden information', () => { + const search = require('./search.cjs'), + g = c.start('geographic-start'); + let steps = 0; + while (g.phase !== c.E.Phase.Building && steps++ < 300) { + const p = g.currentPlayers[0]; + c.E.move(g, eco.choose(g, p).action, p); + } + assert.equal(g.phase, c.E.Phase.Building); + const p = g.currentPlayers[0], + actions = c.candidates(g, p), + selected = search.shortlist(g, p, 6, true); + const region = (a) => g.map.cities.find((x) => x.name === a.data.name).region; + const available = new Set(actions.filter((a) => a.name === 'Build').map(region)); + const covered = new Set( + selected + .map((i) => actions[i]) + .filter((a) => a.name === 'Build') + .map(region) + ); + assert.deepEqual(covered, available); + assert.ok(selected.length <= 6); + assert.ok(selected.some((i) => actions[i].name === 'Pass')); + g.seed = 'private'; + g.powerPlantsDeck.reverse(); + assert.deepEqual(search.shortlist(g, p, 6, true), selected); +}); diff --git a/ai/strong/train.py b/ai/strong/train.py index 09d16e7..7cba6ba 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -11,7 +11,8 @@ import torch from torch.distributions import Categorical from model import Policy, tensors from pool import EnginePool -from huggingface_hub import HfApi +from huggingface_hub import HfApi, hf_hub_download +from feature_contract import FEATURE_REVISION, embed_revision seed = int(os.getenv("TRAIN_SEED", "101")) random.seed(seed) @@ -20,7 +21,28 @@ torch.manual_seed(seed) torch.set_num_threads(2) device = "cuda" assert torch.cuda.is_available(), "Training must run on a GPU HF Job" -net = Policy().to(device) +initial_checkpoint = os.getenv("INIT_CHECKPOINT") +initial_revision = os.getenv("INIT_REVISION") +checkpoint = None +if initial_checkpoint: + if not initial_revision: + raise ValueError("Pin INIT_REVISION when continuing a checkpoint") + checkpoint = torch.load( + hf_hub_download( + os.environ["HF_MODEL_REPO"], initial_checkpoint, revision=initial_revision + ), + map_location="cpu", + weights_only=True, + ) + if checkpoint.get("feature_revision", "3.0") != FEATURE_REVISION: + raise ValueError("Initial checkpoint requires a different feature encoder") +strategic_only = os.getenv("STRATEGIC_ONLY", "0") == "1" +net = Policy(strategic_only=strategic_only).to(device) +if checkpoint: + net.load_state_dict(checkpoint["state_dict"]) +initial_anchor = ( + copy.deepcopy(net).eval() if os.getenv("ANCHOR_POLICY") == "initial" else None +) optimizer = torch.optim.AdamW( net.parameters(), lr=float(os.getenv("LR", "0.00015")), weight_decay=1e-5 ) @@ -37,6 +59,7 @@ rollout = EnginePool( snapshots = [copy.deepcopy(net).eval()] metrics = [] best = -1 +update = -1 def save(name, export=False): @@ -45,6 +68,11 @@ def save(name, export=False): "state_dim": 738, "action_dim": 96, "schema": 3, + "feature_revision": FEATURE_REVISION, + "strategic_only": strategic_only, + "update": update, + "initial_checkpoint": initial_checkpoint, + "initial_revision": initial_revision, "state_dict": {k: v.detach().cpu() for k, v in net.state_dict().items()}, }, out / (name + ".pt"), @@ -71,11 +99,13 @@ def save(name, export=False): opset_version=17, dynamo=False, ) + embed_revision(out / (name + ".onnx")) (out / "metrics.json").write_text(json.dumps(metrics, indent=2)) (out / "schema.json").write_text( json.dumps( { "version": 3, + "feature_revision": FEATURE_REVISION, "state_dim": 738, "action_dim": 96, "players": 3, @@ -83,6 +113,9 @@ def save(name, export=False): "information": "all money public, sealed bids/deck/queued plans excluded", "run": run, "seed": seed, + "initial_checkpoint": initial_checkpoint, + "initial_revision": initial_revision, + "strategic_only": strategic_only, } ) ) @@ -150,11 +183,19 @@ try: ), flush=True, ) + if initial_checkpoint: + net.eval() + evaluation = evaluate(-1) + metrics.append({"stage": "evaluation", "update": -1, **evaluation}) + best = float( + np.mean([evaluation[x]["win"] for x in ["economic", "heuristic", "rush"]]) + ) + save("best", export=True) for update in range(updates): start = time.perf_counter() - current = rollout.call({"op": "reset", "n": nenv, "mode": "mixed"})[ - "observations" - ] + current = rollout.call( + {"op": "reset", "n": nenv, "mode": os.getenv("OPPONENT_MODE", "mixed")} + )["observations"] pending = [[] for _ in range(nenv)] batch = [] endings = [] @@ -242,7 +283,11 @@ try: target = torch.tensor([r["value"] for r in rows], device=device) ratio = (dist.log_prob(act) - old).exp() pg = -torch.minimum(ratio * adv, ratio.clamp(0.8, 1.2) * adv).mean() - anchor = (x[1][:, :, 74] * 2).masked_fill(~x[2], -1e9).softmax(-1) + if initial_anchor is not None: + with torch.no_grad(): + anchor = initial_anchor(*x)[0].softmax(-1) + else: + anchor = (x[1][:, :, 74] * 2).masked_fill(~x[2], -1e9).softmax(-1) kl = torch.nn.functional.kl_div( logits.log_softmax(-1), anchor, reduction="batchmean" ) @@ -268,6 +313,18 @@ try: "seconds": time.perf_counter() - start, "loss": float(np.mean(losses)), } + opponent_outcomes = {} + for ending in endings: + if ending["roles"].count("learner") != 1: + continue + opponent = next(r for r in ending["roles"] if r != "learner") + group = opponent_outcomes.setdefault( + opponent, {"games": 0, "wins": 0, "truncated": 0} + ) + group["games"] += 1 + group["wins"] += ending["value"][ending["roles"].index("learner")] + group["truncated"] += ending["truncated"] + metric["training_opponents"] = opponent_outcomes metrics.append(metric) print(json.dumps(metric), flush=True) if update % int(os.getenv("EVAL_EVERY", "10")) == 0 or update == updates - 1: diff --git a/ai/strong/worker.cjs b/ai/strong/worker.cjs index 360789e..50ca0e3 100644 --- a/ai/strong/worker.cjs +++ b/ai/strong/worker.cjs @@ -1,4 +1,4 @@ -const f = require('./features.cjs'), +const encoders = require('./encoders.cjs'), readline = require('node:readline'); (async () => { for await (const line of readline.createInterface({ input: process.stdin })) { @@ -7,7 +7,7 @@ const f = require('./features.cjs'), g = q.state, p = q.player; if (!Number.isInteger(p) || !g.currentPlayers.includes(p)) throw Error('Player cannot act'); - const x = f.encode(g, p); + const x = encoders.forRevision(q.featureRevision).encode(g, p); if (q.op === 'search') { if (!Number.isInteger(q.proposal) || q.proposal < 0 || q.proposal >= x.moves.length) throw Error('Invalid search proposal'); @@ -20,6 +20,7 @@ const f = require('./features.cjs'), samples: q.samples, candidates: 6, extraCandidates: [q.proposal], + geography: !!q.geography, seed: 'serving-' + (q.requestId || 'public'), }) : { index: q.proposal, action: x.moves[q.proposal], evaluations: 0 }; From 8d991f9c8540045606a32c1f9d31eee8dbe6a1b2 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 17:33:29 +0200 Subject: [PATCH 006/184] Record paired screening jobs for new checkpoints --- ai/strong/experiments.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 7ec4dbd..b080167 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -50,7 +50,9 @@ "geo-screen-v2-soft16-0": "6abd2a82fbc85ba68235b99f", "geo-screen-v2-soft16-1": "6abd2a83404719ba3761390a", "geo-screen-v2-soft16-2": "6abd2a83404719ba3761390c", - "geo-screen-v2-soft16-3": "6abd2a84404719ba3761390e" + "geo-screen-v2-soft16-3": "6abd2a84404719ba3761390e", + "a260-economic-screen": "6abd2b6efbc85ba68235ba0b", + "refine30-economic-screen": "6abd2b6e404719ba37613961" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -72,7 +74,10 @@ "archive": "strong-source-v6.tgz", "commit": "cc79acffc12ad4cc1daffbad20b024d2e1f4fe98" }, - "stopped_for_sustained_regression": ["6abd15cafbc85ba68235b347", "6abd15ca404719ba376134e5"], + "stopped_for_sustained_regression": [ + "6abd15cafbc85ba68235b347", + "6abd15ca404719ba376134e5" + ], "all_phase_distillation_source": { "archive": "strong-source-v7.tgz", "commit": "0862207a0f62cb75edfd0e6ecbc472cdc190bcd0" @@ -100,5 +105,10 @@ "geographic_arena_source": { "archive": "strong-source-v11.tgz", "commit": "49c872954eaf7761a3ac3453acbf737f569849b2" - } + }, + "new_candidate_revision": "b38515c29e57826de05b55b645c29591e4a886bf", + "cancelled_wrong_screening_seed": [ + "6abd2b51404719ba37613954", + "6abd2b51404719ba37613956" + ] } From 7d5be47d2bf09ea45cd32807f7a8b1ab1104dca7 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 17:37:48 +0200 Subject: [PATCH 007/184] Validate stronger A260 checkpoint and refine corrected inputs --- ai/strong/README.md | 4 ++++ ai/strong/experiments.json | 28 +++++++++++++++++--------- ai/strong/launch-arena.sh | 6 +++++- ai/strong/launch-refine-a260.sh | 20 +++++++++++++++++++ ai/strong/train.py | 35 ++++++++++++++++++++++++++++++--- 5 files changed, 80 insertions(+), 13 deletions(-) create mode 100644 ai/strong/launch-refine-a260.sh diff --git a/ai/strong/README.md b/ai/strong/README.md index 3fce864..d3c2431 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -65,3 +65,7 @@ Optional geographic proposals broaden build shortlists using connection costs an The corrected soft model passed PyTorch/ONNX parity across all 427 fixture positions: all actions identical, maximum logit error 3.82e-5 and value error 2.15e-6. On the 8840U, all requests were legal, with 1.87 ms median and 3.45 ms p95 full-worker response. With 48-sample geographic search, a smaller 43-position sample had a 2.02-second p95 and all legal moves. These timings support feasibility, not playing strength. A bounded cache of static plant/fuel combinations was tested and removed: feature/search output hashes stayed identical, but measured runtime increased. No cache is included in source v11. + +The later A260 checkpoint scored 67.5% against two economic opponents on the same 480 paired screening games (40 deals; 95% interval [62.3%, 72.5%]), compared with B160’s 46.0%. Its four rule subsets scored 57.5%, 65.8%, 71.7%, and 75.0%. The corrected refinement checkpoint at update 30 scored 54.7%. Both exports matched checkpoint actions on all 427 fixtures. A260 is now tested against frozen B160 and the deeper geographic search reference, both raw and with 48-sample guided search. These remain development tests; final seeds are reserved. + +An explicit, limited 3.0 → 3.1 uranium-feature transfer experiment starts from pinned A260 weights. Ordinary checkpoint loading still rejects mismatched input revisions. The experiment evaluates its transferred starting policy before any gradient update, anchors refinement to that policy, records the original feature revision, and trains only on an HF GPU job. It does not relabel the old ONNX model or claim unchanged behavior. The complete 427-position corrected-soft/search-48 benchmark on the 8840U returned only legal moves with a 2.50-second p95. Raw A260 serving also passed all 427 positions at 3.74 ms p95. diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b080167..c7fc6d0 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -52,7 +52,17 @@ "geo-screen-v2-soft16-2": "6abd2a83404719ba3761390c", "geo-screen-v2-soft16-3": "6abd2a84404719ba3761390e", "a260-economic-screen": "6abd2b6efbc85ba68235ba0b", - "refine30-economic-screen": "6abd2b6e404719ba37613961" + "refine30-economic-screen": "6abd2b6e404719ba37613961", + "geo-screen-v2-a26048-0": "6abd2c19fbc85ba68235ba32", + "geo-screen-v2-a26048-1": "6abd2c1afbc85ba68235ba34", + "geo-screen-v2-a26048-2": "6abd2c1b404719ba3761397e", + "geo-screen-v2-a26048-3": "6abd2c1cfbc85ba68235ba36", + "geo-screen-v2-a260raw-0": "6abd2c1cfbc85ba68235ba38", + "geo-screen-v2-a260raw-1": "6abd2c1dfbc85ba68235ba3a", + "geo-screen-v2-a260raw-2": "6abd2c1efbc85ba68235ba3c", + "geo-screen-v2-a260raw-3": "6abd2c1f404719ba37613980", + "a260-vs-b160-screen": "6abd2c3bfbc85ba68235ba4c", + "strong-refine-a260-v1": "6abd2cbbfbc85ba68235ba6b" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -74,10 +84,7 @@ "archive": "strong-source-v6.tgz", "commit": "cc79acffc12ad4cc1daffbad20b024d2e1f4fe98" }, - "stopped_for_sustained_regression": [ - "6abd15cafbc85ba68235b347", - "6abd15ca404719ba376134e5" - ], + "stopped_for_sustained_regression": ["6abd15cafbc85ba68235b347", "6abd15ca404719ba376134e5"], "all_phase_distillation_source": { "archive": "strong-source-v7.tgz", "commit": "0862207a0f62cb75edfd0e6ecbc472cdc190bcd0" @@ -107,8 +114,11 @@ "commit": "49c872954eaf7761a3ac3453acbf737f569849b2" }, "new_candidate_revision": "b38515c29e57826de05b55b645c29591e4a886bf", - "cancelled_wrong_screening_seed": [ - "6abd2b51404719ba37613954", - "6abd2b51404719ba37613956" - ] + "cancelled_wrong_screening_seed": ["6abd2b51404719ba37613954", "6abd2b51404719ba37613956"], + "a260_refinement_source": { + "archive": "strong-source-v12.tgz", + "commit": "7cc340b37ee051af51346800a15d285cebfb1a39", + "initial_revision": "b38515c29e57826de05b55b645c29591e4a886bf", + "feature_transfer": "explicit 3.0 to 3.1-uranium39, baseline evaluated before any gradient" + } } diff --git a/ai/strong/launch-arena.sh b/ai/strong/launch-arena.sh index 5c30d5b..fe5161a 100644 --- a/ai/strong/launch-arena.sh +++ b/ai/strong/launch-arena.sh @@ -1,8 +1,12 @@ #!/usr/bin/env bash set -euo pipefail # name model-path revision opponent samples geography games seed +extra_env=() +if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then + extra_env+=(--env "OPPONENT_MODEL_PATH=$OPPONENT_MODEL_PATH" --env "OPPONENT_MODEL_REVISION=${OPPONENT_MODEL_REVISION:?pin opponent revision}") +fi hf jobs run --detach --flavor cpu-performance --timeout 3h \ - --secrets HF_TOKEN \ + --secrets HF_TOKEN "${extra_env[@]}" \ --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ --env RUN_NAME="${1:?name}" --env MODEL_PATH="${2:?model path}" --env MODEL_REVISION="${3:?revision}" \ --env OPPONENT="${4:?opponent}" --env SEARCH_SAMPLES="${5:?samples}" --env GEOGRAPHY="${6:?geography}" \ diff --git a/ai/strong/launch-refine-a260.sh b/ai/strong/launch-refine-a260.sh new file mode 100644 index 0000000..4ec5ceb --- /dev/null +++ b/ai/strong/launch-refine-a260.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor a10g-large --timeout 4h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env INIT_CHECKPOINT=runs/strong-league-v2-a/best.pt --env INIT_REVISION=b38515c29e57826de05b55b645c29591e4a886bf --env ANCHOR_POLICY=initial --env ALLOW_URANIUM39_TRANSFER=1 \ + --env RUN_NAME=strong-refine-a260-v1 --env TRAIN_SEED=412 --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.03 --env UPDATES=80 --env EVAL_EVERY=10 \ + --env ENVS=128 --env WORKERS=8 --env BATCH_SIZE=512 \ + --label project=powergrid-ai --label stage=strong-refine-a260-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet huggingface_hub onnx +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v12.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/train.py +' diff --git a/ai/strong/train.py b/ai/strong/train.py index 7cba6ba..7816198 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -34,9 +34,32 @@ if initial_checkpoint: map_location="cpu", weights_only=True, ) - if checkpoint.get("feature_revision", "3.0") != FEATURE_REVISION: - raise ValueError("Initial checkpoint requires a different feature encoder") -strategic_only = os.getenv("STRATEGIC_ONLY", "0") == "1" + initial_feature_revision = checkpoint.get("feature_revision", "3.0") + if initial_feature_revision != FEATURE_REVISION: + allowed_transfer = ( + os.getenv("ALLOW_URANIUM39_TRANSFER") == "1" + and initial_feature_revision == "3.0" + and FEATURE_REVISION == "3.1-uranium39" + ) + if not allowed_transfer: + raise ValueError("Initial checkpoint requires a different feature encoder") + print( + json.dumps( + { + "stage": "explicit_feature_transfer", + "from": initial_feature_revision, + "to": FEATURE_REVISION, + } + ), + flush=True, + ) +strategic_only = ( + os.getenv( + "STRATEGIC_ONLY", + "1" if checkpoint and checkpoint.get("strategic_only", False) else "0", + ) + == "1" +) net = Policy(strategic_only=strategic_only).to(device) if checkpoint: net.load_state_dict(checkpoint["state_dict"]) @@ -73,6 +96,9 @@ def save(name, export=False): "update": update, "initial_checkpoint": initial_checkpoint, "initial_revision": initial_revision, + "initial_feature_revision": checkpoint.get("feature_revision", "3.0") + if checkpoint + else None, "state_dict": {k: v.detach().cpu() for k, v in net.state_dict().items()}, }, out / (name + ".pt"), @@ -115,6 +141,9 @@ def save(name, export=False): "seed": seed, "initial_checkpoint": initial_checkpoint, "initial_revision": initial_revision, + "initial_feature_revision": checkpoint.get("feature_revision", "3.0") + if checkpoint + else None, "strategic_only": strategic_only, } ) From 8b982867a4edcace6f7341e8003bc699499eb26a Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 17:50:11 +0200 Subject: [PATCH 008/184] Record stronger-opponent evidence and phase-specific latency reporting --- ai/strong/README.md | 2 ++ ai/strong/benchmark-serving.py | 24 ++++++++++++++++++++++++ ai/strong/experiments.json | 8 ++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ai/strong/README.md b/ai/strong/README.md index d3c2431..e74b38e 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -69,3 +69,5 @@ A bounded cache of static plant/fuel combinations was tested and removed: featur The later A260 checkpoint scored 67.5% against two economic opponents on the same 480 paired screening games (40 deals; 95% interval [62.3%, 72.5%]), compared with B160’s 46.0%. Its four rule subsets scored 57.5%, 65.8%, 71.7%, and 75.0%. The corrected refinement checkpoint at update 30 scored 54.7%. Both exports matched checkpoint actions on all 427 fixtures. A260 is now tested against frozen B160 and the deeper geographic search reference, both raw and with 48-sample guided search. These remain development tests; final seeds are reserved. An explicit, limited 3.0 → 3.1 uranium-feature transfer experiment starts from pinned A260 weights. Ordinary checkpoint loading still rejects mismatched input revisions. The experiment evaluates its transferred starting policy before any gradient update, anchors refinement to that policy, records the original feature revision, and trains only on an HF GPU job. It does not relabel the old ONNX model or claim unchanged behavior. The complete 427-position corrected-soft/search-48 benchmark on the 8840U returned only legal moves with a 2.50-second p95. Raw A260 serving also passed all 427 positions at 3.74 ms p95. + +The corrected soft policy with 16-sample geographic search scored 34.9% against two independent 16-sample geographic search opponents across 192 games/16 paired deals (95% interval [28.9%, 40.4%]), with no truncations. This is consistent with parity and does not pass the strength gate. A260 scored 42.5% against two frozen B160 policies over 480 games/40 deals ([37.5%, 47.9%]); original/open was only 30.0%, so the aggregate gain does not establish superiority in every ruleset. diff --git a/ai/strong/benchmark-serving.py b/ai/strong/benchmark-serving.py index 11851af..3d49875 100644 --- a/ai/strong/benchmark-serving.py +++ b/ai/strong/benchmark-serving.py @@ -31,6 +31,8 @@ worker = subprocess.Popen( bufsize=1, ) latencies, inner = [], [] +search_latencies = [] +by_phase = {} sha = None try: with open(args.fixtures) as source: @@ -54,6 +56,11 @@ try: assert sha is None or sha == result["modelSha256"] sha = result["modelSha256"] inner.append(result["elapsedMs"]) + by_phase.setdefault(str(request["state"]["phase"]), []).append( + latencies[-1] + ) + if (result.get("search") or {}).get("evaluations", 0): + search_latencies.append(latencies[-1]) finally: worker.stdin.close() worker.wait(timeout=10) @@ -68,6 +75,23 @@ report = { "warm_roundtrip_p50_ms": float(np.percentile(latencies[1:], 50)), "warm_roundtrip_p95_ms": float(np.percentile(latencies[1:], 95)), "worker_p95_ms": float(np.percentile(inner[1:], 95)), + "max_roundtrip_ms": max(latencies), + "search_decisions": len(search_latencies), + "search_roundtrip_p50_ms": float(np.percentile(search_latencies, 50)) + if search_latencies + else None, + "search_roundtrip_p95_ms": float(np.percentile(search_latencies, 95)) + if search_latencies + else None, + "by_phase": { + phase: { + "positions": len(times), + "p50_ms": float(np.percentile(times, 50)), + "p95_ms": float(np.percentile(times, 95)), + "max_ms": max(times), + } + for phase, times in by_phase.items() + }, } Path(args.output).write_text(json.dumps(report, indent=2)) print(json.dumps(report)) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index c7fc6d0..9e620a6 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -62,7 +62,10 @@ "geo-screen-v2-a260raw-2": "6abd2c1efbc85ba68235ba3c", "geo-screen-v2-a260raw-3": "6abd2c1f404719ba37613980", "a260-vs-b160-screen": "6abd2c3bfbc85ba68235ba4c", - "strong-refine-a260-v1": "6abd2cbbfbc85ba68235ba6b" + "strong-refine-a260-v1": "6abd2cbbfbc85ba68235ba6b", + "a299-economic-screen": "6abd2f63fbc85ba68235bb43", + "a299-vs-b160-screen": "6abd2f64404719ba37613a14", + "refine60-economic-screen": "6abd2f65fbc85ba68235bb45" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -120,5 +123,6 @@ "commit": "7cc340b37ee051af51346800a15d285cebfb1a39", "initial_revision": "b38515c29e57826de05b55b645c29591e4a886bf", "feature_transfer": "explicit 3.0 to 3.1-uranium39, baseline evaluated before any gradient" - } + }, + "a299_refine60_revision": "335a2f63169c7751c8b91e3d7dc0ac1c41af469d" } From 8ab39d131bce06bc4ea06b6e70ca6e25072dc21b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 17:53:37 +0200 Subject: [PATCH 009/184] Record final A checkpoint screening and fixed comparison cohort --- ai/strong/README.md | 4 ++++ ai/strong/experiments.json | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ai/strong/README.md b/ai/strong/README.md index e74b38e..e1739b0 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -71,3 +71,7 @@ The later A260 checkpoint scored 67.5% against two economic opponents on the sam An explicit, limited 3.0 → 3.1 uranium-feature transfer experiment starts from pinned A260 weights. Ordinary checkpoint loading still rejects mismatched input revisions. The experiment evaluates its transferred starting policy before any gradient update, anchors refinement to that policy, records the original feature revision, and trains only on an HF GPU job. It does not relabel the old ONNX model or claim unchanged behavior. The complete 427-position corrected-soft/search-48 benchmark on the 8840U returned only legal moves with a 2.50-second p95. Raw A260 serving also passed all 427 positions at 3.74 ms p95. The corrected soft policy with 16-sample geographic search scored 34.9% against two independent 16-sample geographic search opponents across 192 games/16 paired deals (95% interval [28.9%, 40.4%]), with no truncations. This is consistent with parity and does not pass the strength gate. A260 scored 42.5% against two frozen B160 policies over 480 games/40 deals ([37.5%, 47.9%]); original/open was only 30.0%, so the aggregate gain does not establish superiority in every ruleset. + +A260 without inference-time search scored 34.1% against two 16-sample geographic search opponents over 192 games/16 deals ([29.7%, 38.5%]), consistent with parity. The completed A run selected update 299; it scored 62.2% against economic opponents and 44.2% against B160 on 480 paired games each. All A299/B160 rule subsets exceeded 39%, while A260/B160 original-open scored 30%; the tradeoff requires the separate search comparison rather than selecting only the highest economic score. The corrected full-refinement update-60 checkpoint reached 60.8% against economic opponents. + +No further training experiments will be started until the current fixed cohort is compared: completed original A/B, corrected full refinement, search-opponent refinement, and corrected A260 refinement. Final-test seeds remain unused. A second bounded-cache experiment avoided freezing and copied returned arrays instead; six alternating benchmark runs retained identical search output hashes but showed no runtime gain, so that implementation was also discarded. diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 9e620a6..d485da5 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -65,7 +65,11 @@ "strong-refine-a260-v1": "6abd2cbbfbc85ba68235ba6b", "a299-economic-screen": "6abd2f63fbc85ba68235bb43", "a299-vs-b160-screen": "6abd2f64404719ba37613a14", - "refine60-economic-screen": "6abd2f65fbc85ba68235bb45" + "refine60-economic-screen": "6abd2f65fbc85ba68235bb45", + "geo-screen-v2-a299raw-0": "6abd302f404719ba37613a38", + "geo-screen-v2-a299raw-1": "6abd3030404719ba37613a3a", + "geo-screen-v2-a299raw-2": "6abd3031fbc85ba68235bb7f", + "geo-screen-v2-a299raw-3": "6abd3032404719ba37613a3c" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", From 74aef1f93db72079ac497a3a16afd4c96379c56c Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 17:59:22 +0200 Subject: [PATCH 010/184] Package isolated CPU runtime and record deep search gains --- ai/strong/README.md | 4 ++ ai/strong/experiments.json | 15 +++++- ai/strong/package-serving.py | 99 ++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 ai/strong/package-serving.py diff --git a/ai/strong/README.md b/ai/strong/README.md index e1739b0..7db4c42 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -75,3 +75,7 @@ The corrected soft policy with 16-sample geographic search scored 34.9% against A260 without inference-time search scored 34.1% against two 16-sample geographic search opponents over 192 games/16 deals ([29.7%, 38.5%]), consistent with parity. The completed A run selected update 299; it scored 62.2% against economic opponents and 44.2% against B160 on 480 paired games each. All A299/B160 rule subsets exceeded 39%, while A260/B160 original-open scored 30%; the tradeoff requires the separate search comparison rather than selecting only the highest economic score. The corrected full-refinement update-60 checkpoint reached 60.8% against economic opponents. No further training experiments will be started until the current fixed cohort is compared: completed original A/B, corrected full refinement, search-opponent refinement, and corrected A260 refinement. Final-test seeds remain unused. A second bounded-cache experiment avoided freezing and copied returned arrays instead; six alternating benchmark runs retained identical search output hashes but showed no runtime gain, so that implementation was also discarded. + +On the deeper reference, 48-sample geographic B160 scored 46.9% over 192 games/16 deals ([40.6%, 52.6%]); all four rule subsets were 45.8–47.9%. Corrected soft/48 scored 44.3% ([37.5%, 51.0%]), with all subsets above 33.3%. Both completed without truncations. The corrected A260 refinement at update 40 scored 72.3% against economic opponents ([67.7%, 76.7%]) and 40.6% against A260 ([37.1%, 44.2%]), 480 games each; its search-reference tests are pending. + +`package-serving.py` builds a frozen CPU runtime archive with a model hash, feature revision, scope, source revision, per-file hashes, bundled engine dependencies, and JSONL startup instructions. An archive containing the corrected refinement checkpoint was extracted outside the worktree and passed nine legal-request checks each with zero and 48 search samples; every file hash matched. This is a packaging check, not a strength approval. diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index d485da5..c27201d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -69,7 +69,17 @@ "geo-screen-v2-a299raw-0": "6abd302f404719ba37613a38", "geo-screen-v2-a299raw-1": "6abd3030404719ba37613a3a", "geo-screen-v2-a299raw-2": "6abd3031fbc85ba68235bb7f", - "geo-screen-v2-a299raw-3": "6abd3032404719ba37613a3c" + "geo-screen-v2-a299raw-3": "6abd3032404719ba37613a3c", + "arefine40-economic-screen": "6abd30cbfbc85ba68235bba1", + "arefine40-vs-a260-screen": "6abd30cc404719ba37613a4f", + "geo-screen-v2-arefine40raw-0": "6abd3188fbc85ba68235bbd9", + "geo-screen-v2-arefine40raw-1": "6abd3189404719ba37613a7e", + "geo-screen-v2-arefine40raw-2": "6abd318afbc85ba68235bbdb", + "geo-screen-v2-arefine40raw-3": "6abd318a404719ba37613a80", + "geo-screen-v2-arefine4048-0": "6abd318bfbc85ba68235bbdd", + "geo-screen-v2-arefine4048-1": "6abd318cfbc85ba68235bbdf", + "geo-screen-v2-arefine4048-2": "6abd318dfbc85ba68235bbe1", + "geo-screen-v2-arefine4048-3": "6abd318efbc85ba68235bbe5" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -128,5 +138,6 @@ "initial_revision": "b38515c29e57826de05b55b645c29591e4a886bf", "feature_transfer": "explicit 3.0 to 3.1-uranium39, baseline evaluated before any gradient" }, - "a299_refine60_revision": "335a2f63169c7751c8b91e3d7dc0ac1c41af469d" + "a299_refine60_revision": "335a2f63169c7751c8b91e3d7dc0ac1c41af469d", + "a_refine40_revision": "090097057787a3ddefe4d31b2ca1796c5ce335ea" } diff --git a/ai/strong/package-serving.py b/ai/strong/package-serving.py new file mode 100644 index 0000000..143a97d --- /dev/null +++ b/ai/strong/package-serving.py @@ -0,0 +1,99 @@ +"""Package a frozen CPU policy and its exact engine/runtime dependencies.""" + +import argparse +import hashlib +import json +from pathlib import Path +import shutil +import subprocess +import tarfile +import tempfile +import onnxruntime as ort +from feature_contract import METADATA_KEY + +p = argparse.ArgumentParser() +p.add_argument("model") +p.add_argument("output") +p.add_argument("--model-revision", required=True) +p.add_argument("--search-samples", type=int, default=0) +p.add_argument("--geographic-search", action="store_true") +a = p.parse_args() +if not 0 <= a.search_samples <= 64 or (a.geographic_search and not a.search_samples): + p.error("Search samples must be 0..64; geography requires positive samples") +root = Path(__file__).resolve().parents[2] +model = Path(a.model).resolve() +session = ort.InferenceSession(str(model), providers=["CPUExecutionProvider"]) +revision = session.get_modelmeta().custom_metadata_map.get(METADATA_KEY, "3.0") +if revision not in ["3.0", "3.1-uranium39"]: + raise ValueError("Unknown feature revision") +out = Path(a.output).resolve() +out.mkdir(parents=True, exist_ok=False) +sha = lambda p: hashlib.sha256(p.read_bytes()).hexdigest() +with tempfile.TemporaryDirectory() as tmp: + bundle = Path(tmp) + shutil.copytree(root / "source-bundle/engine", bundle / "engine") + common = ["core.cjs", "infer.py", "requirements-serve.txt"] + strong = [ + "infer.py", + "worker.cjs", + "encoders.cjs", + "feature_contract.py", + "features.cjs", + "features-v3_0.cjs", + "economics.cjs", + "economics-v3_0.cjs", + "spatial.cjs", + "public-graph.cjs", + "geographic-proposals.cjs", + "search.cjs", + ] + (bundle / "ai/strong").mkdir(parents=True) + for name in common: + shutil.copy2(root / "ai" / name, bundle / "ai" / name) + for name in strong: + shutil.copy2(root / "ai/strong" / name, bundle / "ai/strong" / name) + shutil.copy2(model, bundle / "policy.onnx") + command = ( + f"python ai/strong/infer.py policy.onnx --search-samples {a.search_samples}" + + (" --geographic-search" if a.geographic_search else "") + ) + (bundle / "START.txt").write_text( + "Powergrid CPU research worker\n\nRequires Node.js 24 and Python 3.11 or 3.12.\nCreate a virtual environment and install: pip install -r ai/requirements-serve.txt\nRun from this directory: " + + command + + "\n\nSend one JSON object per line with requestId, revision, player (seat index), and state (engine game state). Keep the process alive between requests. Each response proposes one atomic move. The platform must check the game revision and validate the move through the authoritative engine before committing it. Errors must not be committed as moves.\n\nScope: Germany, three players, automatic setup; original/Recharged and open/sealed auctions. Other players’ money is intentionally visible. Hidden deck order and sealed bids are excluded from policy inputs and search beliefs. Value outputs are uncalibrated training-opponent estimates, not objective player-analysis scores.\n\nThis archive makes no strength claim by itself. Consult the accompanying measured evaluations. No production routing is installed.\n" + ) + manifest = { + "model_sha256": sha(model), + "model_repository_revision": a.model_revision, + "feature_revision": revision, + "schema": 3, + "engine_revision": "365fc519903fa2b4e8c593eed6cc5f5f77b5332a", + "runtime_git_revision": subprocess.check_output( + ["git", "rev-parse", "HEAD"], cwd=root, text=True + ).strip(), + "search_samples": a.search_samples, + "geographic_search": a.geographic_search, + "scope": { + "map": "Germany", + "players": 3, + "automatic_setup": True, + "variants": ["original", "recharged"], + "auctions": ["open", "sealed"], + }, + "files": { + str(f.relative_to(bundle)): sha(f) + for f in sorted(bundle.rglob("*")) + if f.is_file() + }, + } + (bundle / "manifest.json").write_text(json.dumps(manifest, indent=2) + "\n") + shutil.copy2(bundle / "manifest.json", out / "manifest.json") + with tarfile.open(out / "powergrid-cpu-worker.tgz", "w:gz") as t: + for f in sorted(bundle.rglob("*")): + if f.is_file(): + t.add(f, arcname=str(f.relative_to(bundle))) +print( + json.dumps( + {"archive": str(out / "powergrid-cpu-worker.tgz"), "model_sha256": sha(model)} + ) +) From 139b4c308176a4cb83edad6cf04022f0378c83b1 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:19:20 +0200 Subject: [PATCH 011/184] Fix final validation protocol and report rollout completeness --- ai/strong/README.md | 6 ++++++ ai/strong/arena_statistics.py | 14 ++++++++++++++ ai/strong/benchmark-serving.py | 6 ++++++ ai/strong/bridge.cjs | 19 ++++++++++++++---- ai/strong/combine-arenas.py | 3 ++- ai/strong/evaluate.py | 3 ++- ai/strong/experiments.json | 11 +++++++++-- ai/strong/final-protocol.json | 35 ++++++++++++++++++++++++++++++++++ ai/strong/launch-arena.sh | 2 +- 9 files changed, 90 insertions(+), 9 deletions(-) create mode 100644 ai/strong/final-protocol.json diff --git a/ai/strong/README.md b/ai/strong/README.md index 7db4c42..129208e 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -79,3 +79,9 @@ No further training experiments will be started until the current fixed cohort i On the deeper reference, 48-sample geographic B160 scored 46.9% over 192 games/16 deals ([40.6%, 52.6%]); all four rule subsets were 45.8–47.9%. Corrected soft/48 scored 44.3% ([37.5%, 51.0%]), with all subsets above 33.3%. Both completed without truncations. The corrected A260 refinement at update 40 scored 72.3% against economic opponents ([67.7%, 76.7%]) and 40.6% against A260 ([37.1%, 44.2%]), 480 games each; its search-reference tests are pending. `package-serving.py` builds a frozen CPU runtime archive with a model hash, feature revision, scope, source revision, per-file hashes, bundled engine dependencies, and JSONL startup instructions. An archive containing the corrected refinement checkpoint was extracted outside the worktree and passed nine legal-request checks each with zero and 48 search samples; every file hash matched. This is a packaging check, not a strength approval. + +The final evaluation protocol is fixed in `final-protocol.json` before candidate selection or use of final seeds. It requires fresh balanced matches against six opponent styles, confidence intervals and minimum win shares, with per-rule gains rather than an aggregate-only pass. Source v13 adds search rollout diagnostics; a 12-game regression preserved every terminal state, action count and outcome while recording 22,927 rollouts with zero truncations. Historical reports without these counters explicitly mark them unreported. + +A299 without search scored 51.0% against the geographic search reference over 192 games/16 deals ([44.8%, 57.8%]); corrected A260-refinement update 40 scored 47.9% ([41.1%, 54.2%]). Both had only 33.3% in Recharged sealed auctions, so neither result alone establishes superiority in every rule combination. The same A40 checkpoint remains best after its full 80-update training run. All A10G training jobs are complete; the H200 search-opponent experiment continues. + +The corrected A40 policy passed all 427 CPU serving requests and checkpoint/export action comparisons. Its 48-sample serving mode had 2.38-second overall p95, 2.65-second p95 among the 161 actual search decisions, and a 3.04-second maximum over the fixture set. diff --git a/ai/strong/arena_statistics.py b/ai/strong/arena_statistics.py index 8e9fbb5..b2ddc3b 100644 --- a/ai/strong/arena_statistics.py +++ b/ai/strong/arena_statistics.py @@ -25,3 +25,17 @@ def win_summary(rows, key="gameSeed"): else: result["seed_bootstrap_95_interval"] = None return result + + +def search_summary(rows): + if not all("searchStats" in row for row in rows): + return {"search_rollouts_reported": False} + totals = {} + for row in rows: + for role, stats in row["searchStats"].items(): + target = totals.setdefault( + role, {"decisions": 0, "evaluations": 0, "truncated": 0} + ) + for key in target: + target[key] += stats[key] + return {"search_rollouts_reported": True, "search_stats": totals} diff --git a/ai/strong/benchmark-serving.py b/ai/strong/benchmark-serving.py index 3d49875..eabf7e6 100644 --- a/ai/strong/benchmark-serving.py +++ b/ai/strong/benchmark-serving.py @@ -32,6 +32,8 @@ worker = subprocess.Popen( ) latencies, inner = [], [] search_latencies = [] +search_evaluations = 0 +search_truncations = 0 by_phase = {} sha = None try: @@ -59,6 +61,8 @@ try: by_phase.setdefault(str(request["state"]["phase"]), []).append( latencies[-1] ) + search_evaluations += (result.get("search") or {}).get("evaluations", 0) + search_truncations += (result.get("search") or {}).get("truncated", 0) if (result.get("search") or {}).get("evaluations", 0): search_latencies.append(latencies[-1]) finally: @@ -77,6 +81,8 @@ report = { "worker_p95_ms": float(np.percentile(inner[1:], 95)), "max_roundtrip_ms": max(latencies), "search_decisions": len(search_latencies), + "search_evaluations": search_evaluations, + "search_truncated_rollouts": search_truncations, "search_roundtrip_p50_ms": float(np.percentile(search_latencies, 50)) if search_latencies else None, diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index 2b566b5..f641d11 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -5,6 +5,15 @@ const c = require('../core.cjs'), let envs = [], sequence = 0; const seed = process.env.SEED || 'strong-train'; +function searchMove(e, seat, options) { + const result = require('./search.cjs').choose(e.g, seat, options); + const role = e.roles[seat]; + const stats = (e.searchStats[role] ||= { decisions: 0, evaluations: 0, truncated: 0 }); + stats.decisions++; + stats.evaluations += result.evaluations || 0; + stats.truncated += result.truncated || 0; + return result.action; +} function applyBot(e, p) { const role = e.roles[p]; if (role === 'legacy') { @@ -21,12 +30,12 @@ function applyBot(e, p) { c.E.move( e.g, strategic - ? require('./search.cjs').choose(e.g, p, { + ? searchMove(e, p, { samples: role === 'search_geo' ? 16 : 4, candidates: role === 'search_geo' ? 6 : 5, geography: role === 'search_geo', seed: 'arena-search-' + e.g.round + '-' + p + '-' + Math.floor(e.rng() * 1e9), - }).action + }) : eco.choose(e.g, p, e.rng).action, p ); @@ -100,6 +109,7 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { rng: c.seedrandom(arenaSeed === undefined ? seed + '-bot-' + id : gameSeed + '-bot'), steps: 0, policyMoves: {}, + searchStats: {}, featureRevisions, }; advance(e); @@ -126,13 +136,13 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { const index = typeof choice === 'object' ? choice.proposal : choice; const action = typeof choice === 'object' && strategic - ? require('./search.cjs').choose(e.g, seat, { + ? searchMove(e, seat, { samples: choice.searchSamples, candidates: 6, extraCandidates: [index], geography: !!choice.geography, seed: 'arena-guided-' + e.id + '-' + e.steps, - }).action + }) : legal[index]; c.E.move(e.g, action, seat); if (e.roles[seat] === 'learner') e.policyMoves[action.name] = (e.policyMoves[action.name] || 0) + 1; @@ -148,6 +158,7 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { steps: e.steps, roles: e.roles, policyMoves: e.policyMoves, + searchStats: e.searchStats, final: { round: e.g.round, players: e.g.players.map((p) => ({ diff --git a/ai/strong/combine-arenas.py b/ai/strong/combine-arenas.py index 6be1443..1fa5b9a 100644 --- a/ai/strong/combine-arenas.py +++ b/ai/strong/combine-arenas.py @@ -3,7 +3,7 @@ import argparse import json from pathlib import Path -from arena_statistics import win_summary +from arena_statistics import win_summary, search_summary p = argparse.ArgumentParser() p.add_argument("reports", nargs="+") @@ -38,6 +38,7 @@ result = { **config, "sources": a.reports, **win_summary(rows), + **search_summary(rows), "by_rules": [], "results": rows, } diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index fa362af..1f645e3 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -7,7 +7,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1])) import numpy as np from infer import Model from pool import EnginePool -from arena_statistics import win_summary +from arena_statistics import win_summary, search_summary from feature_contract import FEATURE_REVISION, check_revision, model_revision p = argparse.ArgumentParser() @@ -143,6 +143,7 @@ report = { "results": rows, } report.update(win_summary(rows)) +report.update(search_summary(rows)) for group in report["by_rules"]: group.update( win_summary( diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index c27201d..7963eb1 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -79,7 +79,9 @@ "geo-screen-v2-arefine4048-0": "6abd318bfbc85ba68235bbdd", "geo-screen-v2-arefine4048-1": "6abd318cfbc85ba68235bbdf", "geo-screen-v2-arefine4048-2": "6abd318dfbc85ba68235bbe1", - "geo-screen-v2-arefine4048-3": "6abd318efbc85ba68235bbe5" + "geo-screen-v2-arefine4048-3": "6abd318efbc85ba68235bbe5", + "refine119-economic-screen": "6abd34cc404719ba37613b4c", + "refine119-vs-a260-screen": "6abd34cd404719ba37613b4e" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -139,5 +141,10 @@ "feature_transfer": "explicit 3.0 to 3.1-uranium39, baseline evaluated before any gradient" }, "a299_refine60_revision": "335a2f63169c7751c8b91e3d7dc0ac1c41af469d", - "a_refine40_revision": "090097057787a3ddefe4d31b2ca1796c5ce335ea" + "a_refine40_revision": "090097057787a3ddefe4d31b2ca1796c5ce335ea", + "full_refine119_revision": "f9d9a5c5d4336f9e662209155f214fef5789d5b1", + "final_arena_source": { + "archive": "strong-source-v13.tgz", + "commit": "3eea217f53333f63d81345a7319179a59d63a55b" + } } diff --git a/ai/strong/final-protocol.json b/ai/strong/final-protocol.json new file mode 100644 index 0000000..14d4bfd --- /dev/null +++ b/ai/strong/final-protocol.json @@ -0,0 +1,35 @@ +{ + "status": "prepared; candidate not selected; final seeds unused", + "seed_prefix": "strong-final-reserved-v1", + "scope": "Germany, three players, automatic setup, original/Recharged, open/sealed", + "pairing": "Each independent deal is repeated across all three candidate seats and all four rule combinations.", + "intervals": "95% bootstrap intervals resample independent deals, retaining correlated seat and rule repeats. Intervals are per comparison, not a simultaneous family-wide confidence claim.", + "requirements": { + "all_games_complete": true, + "no_illegal_moves": true, + "no_missing_or_duplicate_paired_matches": true, + "overall_interval_lower_bound_above": 0.3333333333333333, + "each_rule_interval_lower_bound_above": 0.3333333333333333, + "report_search_rollout_truncations": true, + "export_action_parity": "All 427 fixture positions must agree with the training checkpoint.", + "cpu_serving": "All 427 fixtures must return legal moves on the AMD 8840U; report cold, warm, search-only and phase-specific latency.", + "package": "Verify file hashes and legal responses from the extracted standalone archive." + }, + "opponents": [ + { "name": "legacy", "games": 480, "minimum_win_rate": 0.9 }, + { "name": "heuristic", "games": 480, "minimum_win_rate": 0.7 }, + { "name": "economic", "games": 480, "minimum_win_rate": 0.55 }, + { "name": "rush", "games": 480, "minimum_win_rate": 0.5 }, + { "name": "search_geo", "games": 960, "minimum_win_rate": 0.4 }, + { + "name": "frozen_a260", + "games": 960, + "minimum_win_rate": 0.4, + "model_path": "runs/strong-league-v2-a/best.onnx", + "model_revision": "b38515c29e57826de05b55b645c29591e4a886bf", + "model_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd" + } + ], + "failure_policy": "A failed gate is reported as a failure; do not weaken thresholds after seeing final results. Any subsequent model selection uses new development evidence and a new final seed prefix.", + "claim_limits": "These gates establish strength against the measured opponent suite, not expert-human strength, other maps/player counts, or calibrated analysis values." +} diff --git a/ai/strong/launch-arena.sh b/ai/strong/launch-arena.sh index fe5161a..7ad4d34 100644 --- a/ai/strong/launch-arena.sh +++ b/ai/strong/launch-arena.sh @@ -18,7 +18,7 @@ python -m pip install --quiet huggingface_hub onnxruntime mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v11.tgz\",repo_type=\"dataset\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v13.tgz\",repo_type=\"dataset\", revision=\"3eea217f53333f63d81345a7319179a59d63a55b\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' From aa8ab7cd6c010dc63cacab10d2ab2d47c24632aa Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:35:24 +0200 Subject: [PATCH 012/184] Compose public-rule specialists and scope search to sealed Recharged --- ai/strong/README.md | 12 +++- ai/strong/arena-job.py | 2 + ai/strong/benchmark-serving.py | 20 +++++++ ai/strong/bridge.cjs | 9 ++- ai/strong/check-export.py | 20 ++++++- ai/strong/combine-arenas.py | 3 + ai/strong/compose-specialists.py | 99 ++++++++++++++++++++++++++++++++ ai/strong/evaluate.py | 7 ++- ai/strong/experiments.json | 28 ++++++++- ai/strong/export.py | 8 ++- ai/strong/infer.py | 8 ++- ai/strong/launch-arena.sh | 4 +- ai/strong/model.py | 28 +++++++++ ai/strong/package-serving.py | 6 +- ai/strong/search_scope.py | 9 +++ 15 files changed, 248 insertions(+), 15 deletions(-) create mode 100644 ai/strong/compose-specialists.py create mode 100644 ai/strong/search_scope.py diff --git a/ai/strong/README.md b/ai/strong/README.md index 129208e..b384d63 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -32,7 +32,7 @@ Four HF CPU jobs generated a separate search-teacher dataset: 512 games, 25,268 The first distillation run deteriorated after epoch 5. Its epoch-30 model scored 8.6% against the economic bot on 480 screening games. Restricting its learned corrections to auction/build decisions raised that to 22.3% on exactly the same deals, still worse than the economic prior. This isolates harmful changes in unsupervised phases as one contributor, not a complete explanation. The next dataset covers every phase and uses 12 search samples instead of four. Hard labels and distributions over counterfactual action values are separate experiments; no improvement is assumed in advance. -The high-exploration league runs C and D were stopped after sustained regression around updates 60–80, retaining their best checkpoints. B completed all 300 updates; A continues. The neural B20 checkpoint scored 23.8% against two search opponents over 240 paired screening games (20 deals; 95% interval [17.1%, 30.4%]). Thus it has not passed the strength gate. +The high-exploration league runs C and D were stopped after sustained regression around updates 60–80, retaining their best checkpoints. A and B completed all 300 updates. The neural B20 checkpoint scored 23.8% against two search opponents over 240 paired screening games (20 deals; 95% interval [17.1%, 30.4%]). Thus it has not passed the strength gate. B160 subsequently scored 46.0% against the economic bot and 40.4% against two B20 neural opponents, each over 480 paired screening games (40 independent deals) with no truncations. B20 with 16-sample search scored 47.9% against two four-sample search opponents on 96 screening games (eight deals; interval [36.5%, 59.4%]), but its original/open subset was only 25%; broader evaluation is needed. These runs use their archived revision-3.0 runtime. B160 scored 47.9% with 16 samples and 61.5% with 48 samples against the four-sample reference, each over 96 games/eight deals. The 48-sample interval is [53.6%, 71.4%]; all four rule subsets exceeded 54%. This remains a small development test against a limited reference. @@ -82,6 +82,14 @@ On the deeper reference, 48-sample geographic B160 scored 46.9% over 192 games/1 The final evaluation protocol is fixed in `final-protocol.json` before candidate selection or use of final seeds. It requires fresh balanced matches against six opponent styles, confidence intervals and minimum win shares, with per-rule gains rather than an aggregate-only pass. Source v13 adds search rollout diagnostics; a 12-game regression preserved every terminal state, action count and outcome while recording 22,927 rollouts with zero truncations. Historical reports without these counters explicitly mark them unreported. -A299 without search scored 51.0% against the geographic search reference over 192 games/16 deals ([44.8%, 57.8%]); corrected A260-refinement update 40 scored 47.9% ([41.1%, 54.2%]). Both had only 33.3% in Recharged sealed auctions, so neither result alone establishes superiority in every rule combination. The same A40 checkpoint remains best after its full 80-update training run. All A10G training jobs are complete; the H200 search-opponent experiment continues. +A299 without search scored 51.0% against the geographic search reference over 192 games/16 deals ([44.8%, 57.8%]); corrected A260-refinement update 40 scored 47.9% ([41.1%, 54.2%]). Both had only 33.3% in Recharged sealed auctions, so neither result alone establishes superiority in every rule combination. The same A40 checkpoint remains best after its full 80-update training run. All A10G training jobs are complete; the H200 search-opponent experiment was subsequently stopped after regression, retaining its best checkpoint. The corrected A40 policy passed all 427 CPU serving requests and checkpoint/export action comparisons. Its 48-sample serving mode had 2.38-second overall p95, 2.65-second p95 among the 161 actual search decisions, and a 3.04-second maximum over the fixture set. + +## Frozen specialist configuration under evaluation + +Applying 48-sample search to every rule combination reduced corrected A40’s aggregate search-reference result from 47.9% to 43.2%. It helped Recharged sealed (33.3% → 39.6%) but hurt the other three subsets. B160/search-48 was stronger and more balanced in that mode (45.8%). A CPU-only composition therefore combines corrected A40 for three rule combinations with B160 weights for Recharged sealed, and spends the 48-sample search budget only in that last combination. Both branches consume corrected feature revision 3.1. The B160 input correction is explicit in component provenance; it is a new, unapproved candidate whose playing strength must be measured, not an assertion that the old policy is unchanged. No gradient training occurs during composition. + +The single ONNX export has SHA `b4cae14eb6e1aff72b16e5056983b2a57ad42984f4a27cf99dd70bb63e86be32`. `check-export.py` independently selected the expected component from the original engine options and verified all 427 positions (337 default, 90 Recharged sealed), along with ONNX/checkpoint action parity. Its isolated 8840U archive passed all 1,201 file hashes and all 427 legal requests. There were 33 actual search decisions: 2.36-second search-only p95, 2.57-second maximum; zero of 7,872 rollouts were truncated. Full-worker median was 2.42 ms, with search scoped to Recharged sealed. Development matches against the full opponent suite are running on immutable source v14; final seeds remain unused. + +The completed full-distillation refinement’s update-119 checkpoint scored 65.9% against economic opponents and 35.7% against A260 over 480 games each; the latter interval [30.3%, 41.3%] did not establish a reliable gain. It is not replacing the stronger corrected A40 checkpoint. diff --git a/ai/strong/arena-job.py b/ai/strong/arena-job.py index 7c6ba6b..8b06589 100644 --- a/ai/strong/arena-job.py +++ b/ai/strong/arena-job.py @@ -22,6 +22,8 @@ command = [ os.environ.get("WORKERS", "24"), "--seed", os.environ["EVAL_SEED"], + "--search-scope", + os.environ.get("SEARCH_SCOPE", "all"), "--search-samples", os.environ.get("SEARCH_SAMPLES", "0"), "--output", diff --git a/ai/strong/benchmark-serving.py b/ai/strong/benchmark-serving.py index eabf7e6..d12dfb7 100644 --- a/ai/strong/benchmark-serving.py +++ b/ai/strong/benchmark-serving.py @@ -6,10 +6,13 @@ from pathlib import Path import subprocess import sys import time +import platform import numpy as np +from search_scope import SCOPES p = argparse.ArgumentParser() p.add_argument("model") +p.add_argument("--search-scope", choices=SCOPES, default="all") p.add_argument("fixtures") p.add_argument("--output", required=True) p.add_argument("--search-samples", type=int, default=0) @@ -21,6 +24,8 @@ worker = subprocess.Popen( sys.executable, str(Path(__file__).with_name("infer.py")), args.model, + "--search-scope", + args.search_scope, "--search-samples", str(args.search_samples), ] @@ -69,11 +74,26 @@ finally: worker.stdin.close() worker.wait(timeout=10) worker.stdout.close() +cpu_info = Path("/proc/cpuinfo") +processor_model = platform.processor() +if cpu_info.exists(): + processor_model = next( + ( + line.split(":", 1)[1].strip() + for line in cpu_info.read_text().splitlines() + if line.startswith("model name") + ), + processor_model, + ) report = { + "hostname": platform.node(), + "processor_model": processor_model, + "python_version": platform.python_version(), "positions": len(latencies), "model_sha256": sha, "all_moves_legal": True, "search_samples": args.search_samples, + "search_scope": args.search_scope, "geographic_search": args.geographic_search, "cold_start_ms": latencies[0], "warm_roundtrip_p50_ms": float(np.percentile(latencies[1:], 50)), diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index f641d11..9300616 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -60,7 +60,14 @@ function observation(e) { const seat = e.g.currentPlayers[0], x = encoders.forRevision(e.featureRevisions[e.roles[seat]]).encode(e.g, seat); delete x.moves; - return { ...x, episode: e.id, roles: e.roles, round: e.g.round }; + return { + ...x, + episode: e.id, + roles: e.roles, + round: e.g.round, + variant: e.g.options.variant, + sealed: !!e.g.options.fastBid, + }; } function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { if ( diff --git a/ai/strong/check-export.py b/ai/strong/check-export.py index 39b478b..4001664 100644 --- a/ai/strong/check-export.py +++ b/ai/strong/check-export.py @@ -9,7 +9,7 @@ import numpy as np import onnxruntime as ort import torch from feature_contract import METADATA_KEY -from model import Policy, tensors +from model import policy_from_checkpoint, tensors p = argparse.ArgumentParser() p.add_argument("checkpoint") @@ -19,8 +19,7 @@ p.add_argument("--output", required=True) a = p.parse_args() torch.set_num_threads(1) checkpoint = torch.load(a.checkpoint, map_location="cpu", weights_only=True) -net = Policy(strategic_only=checkpoint.get("strategic_only", False)).eval() -net.load_state_dict(checkpoint["state_dict"]) +net = policy_from_checkpoint(checkpoint).eval() options = ort.SessionOptions() options.intra_op_num_threads = 1 session = ort.InferenceSession(a.model, options, providers=["CPUExecutionProvider"]) @@ -34,6 +33,7 @@ worker = subprocess.Popen( ) errors = [0.0, 0.0] count = 0 +route_counts = {} try: for line in Path(a.fixtures).read_text().splitlines(): request = json.loads(line)["request"] @@ -45,6 +45,19 @@ try: inputs = tensors([row], "cpu") with torch.inference_mode(): expected = [x.numpy() for x in net(*inputs)] + if checkpoint.get("architecture") == "rule_specialists": + options = request["state"]["options"] + use_sealed = options.get("variant") == "recharged" and bool( + options.get("fastBid") + ) + route = "recharged-sealed" if use_sealed else "default" + route_counts[route] = route_counts.get(route, 0) + 1 + component = ( + net.recharged_sealed_policy if use_sealed else net.default_policy + ) + component_outputs = [x.numpy() for x in component(*inputs)] + for selected, correct in zip(expected, component_outputs): + np.testing.assert_array_equal(selected, correct) actual = session.run( None, dict(zip(["state", "actions", "mask"], [x.numpy() for x in inputs])) ) @@ -64,6 +77,7 @@ report = { "max_logit_error": errors[0], "max_value_error": errors[1], "all_actions_match": True, + "specialist_route_counts": route_counts, } Path(a.output).write_text(json.dumps(report, indent=2) + "\n") print(json.dumps(report)) diff --git a/ai/strong/combine-arenas.py b/ai/strong/combine-arenas.py index 1fa5b9a..9138743 100644 --- a/ai/strong/combine-arenas.py +++ b/ai/strong/combine-arenas.py @@ -21,6 +21,9 @@ keys = [ "candidate_search_samples", "candidate_geographic_search", ] +for report in reports: + report.setdefault("candidate_search_scope", "all") +keys.append("candidate_search_scope") config = {k: reports[0][k] for k in keys} rows = [] seen = set() diff --git a/ai/strong/compose-specialists.py b/ai/strong/compose-specialists.py new file mode 100644 index 0000000..a3e715e --- /dev/null +++ b/ai/strong/compose-specialists.py @@ -0,0 +1,99 @@ +"""CPU-only composition of frozen specialists; no training or gradients.""" + +import argparse +import hashlib +import json +from pathlib import Path +import subprocess +import sys +import torch +from model import RuleSpecialists, policy_from_checkpoint +from feature_contract import FEATURE_REVISION + +p = argparse.ArgumentParser() +p.add_argument("default_checkpoint") +p.add_argument("sealed_checkpoint") +p.add_argument("output") +p.add_argument("--default-revision", required=True) +p.add_argument("--sealed-revision", required=True) +p.add_argument("--allow-uranium39-transfer", action="store_true") +a = p.parse_args() +torch.set_num_threads(1) +components = [] +checkpoints = [] +for path, revision in [ + (a.default_checkpoint, a.default_revision), + (a.sealed_checkpoint, a.sealed_revision), +]: + ck = torch.load(path, map_location="cpu", weights_only=True) + source_features = ck.get("feature_revision", "3.0") + if source_features != FEATURE_REVISION and not ( + source_features == "3.0" and a.allow_uranium39_transfer + ): + raise ValueError( + "Explicit authorization required for 3.0 to corrected-feature transfer" + ) + assert ck.get("architecture", "policy") == "policy" + checkpoints.append(ck) + components.append( + { + "checkpoint_sha256": hashlib.sha256(Path(path).read_bytes()).hexdigest(), + "repository_revision": revision, + "source_feature_revision": source_features, + "input_feature_revision": FEATURE_REVISION, + } + ) +args = { + "default_strategic_only": checkpoints[0].get("strategic_only", False), + "sealed_strategic_only": checkpoints[1].get("strategic_only", False), +} +net = RuleSpecialists(**args).eval() +net.default_policy.load_state_dict(policy_from_checkpoint(checkpoints[0]).state_dict()) +net.recharged_sealed_policy.load_state_dict( + policy_from_checkpoint(checkpoints[1]).state_dict() +) +out = Path(a.output) +out.mkdir(parents=True, exist_ok=False) +checkpoint = { + "architecture": "rule_specialists", + "model_args": args, + "schema": 3, + "state_dim": 738, + "action_dim": 96, + "feature_revision": FEATURE_REVISION, + "components": components, + "state_dict": net.state_dict(), +} +torch.save(checkpoint, out / "specialists.pt") +(out / "composition.json").write_text( + json.dumps( + { + "architecture": "rule_specialists", + "default": "corrected A260 refinement update 40", + "recharged_sealed": "B160 weights with explicit uranium-feature correction", + "training": "none; frozen-weight composition", + "components": components, + }, + indent=2, + ) + + "\n" +) +subprocess.run( + [ + sys.executable, + str(Path(__file__).with_name("export.py")), + str(out / "specialists.pt"), + str(out / "specialists.onnx"), + ], + check=True, +) +print( + json.dumps( + { + "model": str(out / "specialists.onnx"), + "sha256": hashlib.sha256( + (out / "specialists.onnx").read_bytes() + ).hexdigest(), + } + ) +) diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index 1f645e3..b109d29 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -8,10 +8,12 @@ import numpy as np from infer import Model from pool import EnginePool from arena_statistics import win_summary, search_summary +from search_scope import SCOPES, search_enabled from feature_contract import FEATURE_REVISION, check_revision, model_revision p = argparse.ArgumentParser() p.add_argument("model") +p.add_argument("--search-scope", choices=SCOPES, default="all") p.add_argument( "--opponent", default="economic", @@ -89,7 +91,9 @@ try: "searchSamples": args.search_samples, "geography": args.geographic_search, } - if actor is model and args.search_samples + if actor is model + and args.search_samples + and search_enabled(args.search_scope, x["variant"], x["sealed"]) else a ) r = pool.call({"op": "step", "actions": actions}) @@ -119,6 +123,7 @@ report = { else None, "paired_seats": True, "candidate_search_samples": args.search_samples, + "candidate_search_scope": args.search_scope, "candidate_geographic_search": args.geographic_search, "seed": args.seed, "games": len(rows), diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 7963eb1..01de3ac 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -81,7 +81,16 @@ "geo-screen-v2-arefine4048-2": "6abd318dfbc85ba68235bbe1", "geo-screen-v2-arefine4048-3": "6abd318efbc85ba68235bbe5", "refine119-economic-screen": "6abd34cc404719ba37613b4c", - "refine119-vs-a260-screen": "6abd34cd404719ba37613b4e" + "refine119-vs-a260-screen": "6abd34cd404719ba37613b4e", + "geo-screen-v2-specialists-0": "6abd395b404719ba37613c3a", + "geo-screen-v2-specialists-1": "6abd395cfbc85ba68235be59", + "geo-screen-v2-specialists-2": "6abd395cfbc85ba68235be5b", + "geo-screen-v2-specialists-3": "6abd395dfbc85ba68235be5d", + "specialists-economic-screen": "6abd39e1fbc85ba68235be76", + "specialists-heuristic-screen": "6abd39e2fbc85ba68235be7a", + "specialists-rush-screen": "6abd39e2404719ba37613c5c", + "specialists-legacy-screen": "6abd39e3fbc85ba68235be7c", + "specialists-frozen-a260-screen": "6abd39e4404719ba37613c5e" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -146,5 +155,22 @@ "final_arena_source": { "archive": "strong-source-v13.tgz", "commit": "3eea217f53333f63d81345a7319179a59d63a55b" + }, + "stopped_after_regression": { + "strong-refine-v1-search": { + "job": "6abd2783404719ba37613860", + "best_evaluation_update": 10, + "later_evaluations": [20, 30], + "reason": "Mean economic/heuristic/rush win share declined from 0.5764 at update 10 to 0.5660 at 20 and 0.5347 at 30; every update-30 opponent result was below update 20. Best checkpoint retained; corrected A260 refinement is substantially stronger." + } + }, + "specialist_candidate": { + "model_revision": "16a405099df4121e986e2cc9cc6097b0f6c44caa", + "sha256": "b4cae14eb6e1aff72b16e5056983b2a57ad42984f4a27cf99dd70bb63e86be32", + "source_archive": "strong-source-v14.tgz", + "source_revision": "5f1c68899807970428e55033fc81223970795c52", + "search_scope": "recharged-sealed", + "search_samples": 48, + "feature_revision": "3.1-uranium39" } } diff --git a/ai/strong/export.py b/ai/strong/export.py index 27ffff7..3f02398 100644 --- a/ai/strong/export.py +++ b/ai/strong/export.py @@ -4,7 +4,7 @@ import argparse import json from pathlib import Path import torch -from model import Policy +from model import policy_from_checkpoint from feature_contract import embed_revision p = argparse.ArgumentParser() @@ -15,8 +15,10 @@ args = p.parse_args() torch.set_num_threads(1) checkpoint = torch.load(args.checkpoint, map_location="cpu", weights_only=True) strategic_only = args.strategic_only or checkpoint.get("strategic_only", False) -net = Policy(strategic_only=strategic_only).eval() -net.load_state_dict(checkpoint["state_dict"]) +if args.strategic_only and checkpoint.get("architecture", "policy") != "policy": + p.error("Strategic-only override requires a single policy") +checkpoint["strategic_only"] = strategic_only +net = policy_from_checkpoint(checkpoint).eval() torch.onnx.export( net, (torch.zeros(1, 738), torch.zeros(1, 8, 96), torch.ones(1, 8, dtype=torch.bool)), diff --git a/ai/strong/infer.py b/ai/strong/infer.py index 960c666..95eba58 100644 --- a/ai/strong/infer.py +++ b/ai/strong/infer.py @@ -6,9 +6,11 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from infer import Model, Node from feature_contract import check_revision, model_revision +from search_scope import SCOPES, search_enabled p = argparse.ArgumentParser() p.add_argument("model") +p.add_argument("--search-scope", choices=SCOPES, default="all") p.add_argument("--search-samples", type=int, default=0) p.add_argument("--geographic-search", action="store_true") args = p.parse_args() @@ -33,7 +35,11 @@ try: check_revision(model, r.get("featureRevision", "3.0")) index, values = model.predict(r["state"], r["actions"]) search = None - if args.search_samples: + if args.search_samples and search_enabled( + args.search_scope, + q["state"]["options"].get("variant"), + q["state"]["options"].get("fastBid"), + ): search = node.call( { **q, diff --git a/ai/strong/launch-arena.sh b/ai/strong/launch-arena.sh index 7ad4d34..c9b8e13 100644 --- a/ai/strong/launch-arena.sh +++ b/ai/strong/launch-arena.sh @@ -7,7 +7,7 @@ if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then fi hf jobs run --detach --flavor cpu-performance --timeout 3h \ --secrets HF_TOKEN "${extra_env[@]}" \ - --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 --env SEARCH_SCOPE="${SEARCH_SCOPE:-all}" \ --env RUN_NAME="${1:?name}" --env MODEL_PATH="${2:?model path}" --env MODEL_REVISION="${3:?revision}" \ --env OPPONENT="${4:?opponent}" --env SEARCH_SAMPLES="${5:?samples}" --env GEOGRAPHY="${6:?geography}" \ --env GAMES="${7:?games}" --env EVAL_SEED="${8:?seed}" --env WORKERS=24 \ @@ -18,7 +18,7 @@ python -m pip install --quiet huggingface_hub onnxruntime mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v13.tgz\",repo_type=\"dataset\", revision=\"3eea217f53333f63d81345a7319179a59d63a55b\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v14.tgz\",repo_type=\"dataset\", revision=\"5f1c68899807970428e55033fc81223970795c52\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' diff --git a/ai/strong/model.py b/ai/strong/model.py index 72b8963..db8fe1e 100644 --- a/ai/strong/model.py +++ b/ai/strong/model.py @@ -49,3 +49,31 @@ def tensors(rows, device): actions[i, : len(r["actions"])] = r["actions"] mask[i, : len(r["actions"])] = True return tuple(torch.from_numpy(a).to(device) for a in [state, actions, mask]) + + +class RuleSpecialists(nn.Module): + """Fixed specialists selected only by the public schema-3 rule flags.""" + + def __init__(self, default_strategic_only=False, sealed_strategic_only=False): + super().__init__() + self.default_policy = Policy(strategic_only=default_strategic_only) + self.recharged_sealed_policy = Policy(strategic_only=sealed_strategic_only) + + def forward(self, state, actions, mask): + regular = self.default_policy(state, actions, mask) + sealed = self.recharged_sealed_policy(state, actions, mask) + # Eight phase flags, round, step, Recharged flag, sealed-auction flag. + use_sealed = ((state[:, 10] > 0.5) & (state[:, 11] > 0.5))[:, None] + return tuple(torch.where(use_sealed, b, a) for a, b in zip(regular, sealed)) + + +def policy_from_checkpoint(checkpoint): + architecture = checkpoint.get("architecture", "policy") + if architecture == "rule_specialists": + net = RuleSpecialists(**checkpoint["model_args"]) + elif architecture == "policy": + net = Policy(strategic_only=checkpoint.get("strategic_only", False)) + else: + raise ValueError(f"Unsupported architecture: {architecture}") + net.load_state_dict(checkpoint["state_dict"]) + return net diff --git a/ai/strong/package-serving.py b/ai/strong/package-serving.py index 143a97d..60a53a5 100644 --- a/ai/strong/package-serving.py +++ b/ai/strong/package-serving.py @@ -10,9 +10,11 @@ import tarfile import tempfile import onnxruntime as ort from feature_contract import METADATA_KEY +from search_scope import SCOPES p = argparse.ArgumentParser() p.add_argument("model") +p.add_argument("--search-scope", choices=SCOPES, default="all") p.add_argument("output") p.add_argument("--model-revision", required=True) p.add_argument("--search-samples", type=int, default=0) @@ -38,6 +40,7 @@ with tempfile.TemporaryDirectory() as tmp: "worker.cjs", "encoders.cjs", "feature_contract.py", + "search_scope.py", "features.cjs", "features-v3_0.cjs", "economics.cjs", @@ -54,7 +57,7 @@ with tempfile.TemporaryDirectory() as tmp: shutil.copy2(root / "ai/strong" / name, bundle / "ai/strong" / name) shutil.copy2(model, bundle / "policy.onnx") command = ( - f"python ai/strong/infer.py policy.onnx --search-samples {a.search_samples}" + f"python ai/strong/infer.py policy.onnx --search-samples {a.search_samples} --search-scope {a.search_scope}" + (" --geographic-search" if a.geographic_search else "") ) (bundle / "START.txt").write_text( @@ -72,6 +75,7 @@ with tempfile.TemporaryDirectory() as tmp: ["git", "rev-parse", "HEAD"], cwd=root, text=True ).strip(), "search_samples": a.search_samples, + "search_scope": a.search_scope, "geographic_search": a.geographic_search, "scope": { "map": "Germany", diff --git a/ai/strong/search_scope.py b/ai/strong/search_scope.py new file mode 100644 index 0000000..48fca37 --- /dev/null +++ b/ai/strong/search_scope.py @@ -0,0 +1,9 @@ +"""Public rule-based search budget, shared by the arena and CPU worker.""" + +SCOPES = ["all", "recharged-sealed"] + + +def search_enabled(scope, variant, sealed): + if scope not in SCOPES: + raise ValueError(f"Unknown search scope: {scope}") + return scope == "all" or (variant == "recharged" and bool(sealed)) From 41ca348b576851dcb1deb3c87b63ed71c44bc455 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:35:54 +0200 Subject: [PATCH 013/184] Record uncommitted source state in runtime provenance --- ai/strong/package-serving.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ai/strong/package-serving.py b/ai/strong/package-serving.py index 60a53a5..c62fe55 100644 --- a/ai/strong/package-serving.py +++ b/ai/strong/package-serving.py @@ -74,6 +74,11 @@ with tempfile.TemporaryDirectory() as tmp: "runtime_git_revision": subprocess.check_output( ["git", "rev-parse", "HEAD"], cwd=root, text=True ).strip(), + "runtime_git_dirty": bool( + subprocess.check_output( + ["git", "status", "--porcelain"], cwd=root, text=True + ).strip() + ), "search_samples": a.search_samples, "search_scope": a.search_scope, "geographic_search": a.geographic_search, From f2ea96eb60c68868b7f715e2fe639105b0b6998e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:38:51 +0200 Subject: [PATCH 014/184] Prepare immutable held-out evaluation dispatch plan --- ai/strong/launch-final.py | 130 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 ai/strong/launch-final.py diff --git a/ai/strong/launch-final.py b/ai/strong/launch-final.py new file mode 100644 index 0000000..24c29ad --- /dev/null +++ b/ai/strong/launch-final.py @@ -0,0 +1,130 @@ +"""Launch or resume one frozen final evaluation plan; default is a dry run.""" + +import argparse +import hashlib +import json +import os +from pathlib import Path +import re +import subprocess + +p = argparse.ArgumentParser() +p.add_argument("candidate") +p.add_argument("--protocol", default="ai/strong/final-protocol.json") +p.add_argument("--launch", action="store_true") +a = p.parse_args() +root = Path(__file__).resolve().parents[2] +protocol = json.loads(Path(a.protocol).read_text()) +candidate = json.loads(Path(a.candidate).read_text()) +plan = [] +prefix = protocol["seed_prefix"] +for opponent in protocol["opponents"]: + assert opponent["games"] % 48 == 0 + for shard in range(opponent["games"] // 48): + plan.append( + { + "name": f"{prefix}-{opponent['name']}-{shard:02}", + "seed": f"{prefix}-{shard}", + "opponent": opponent, + "games": 48, + } + ) +print( + json.dumps( + { + "candidate": candidate, + "jobs": len(plan), + "games": sum(x["games"] for x in plan), + "launch": a.launch, + } + ), + flush=True, +) +if not a.launch: + raise SystemExit(0) +if candidate.get("status") != "selected": + raise ValueError("Select and freeze the candidate before spending final seeds") +from huggingface_hub import hf_hub_download + +model = Path( + hf_hub_download( + "coyotte508/powergrid-ai-germany-v1", + candidate["model_path"], + revision=candidate["model_revision"], + ) +) +assert hashlib.sha256(model.read_bytes()).hexdigest() == candidate["model_sha256"] +manifest_path = root / "ai/strong/experiments.json" +manifest = json.loads(manifest_path.read_text()) +launcher_sha256 = hashlib.sha256( + (root / "ai/strong/launch-arena.sh").read_bytes() +).hexdigest() +fingerprint = hashlib.sha256( + json.dumps( + { + "candidate": candidate, + "protocol": protocol, + "launcher_sha256": launcher_sha256, + }, + sort_keys=True, + ).encode() +).hexdigest() +run = manifest.setdefault("final_runs", {}).setdefault( + prefix, + { + "fingerprint": fingerprint, + "launcher_sha256": launcher_sha256, + "candidate": candidate, + "protocol": protocol, + "jobs": {}, + }, +) +if run["fingerprint"] != fingerprint: + raise ValueError( + "Final seeds were already assigned to a different candidate or protocol" + ) +manifest["final_seed_prefix_used"] = True +manifest_path.write_text(json.dumps(manifest, indent=4) + "\n") +for item in plan: + if item["name"] in run["jobs"]: + print("Already dispatched", item["name"], run["jobs"][item["name"]], flush=True) + continue + opponent = item["opponent"] + env = os.environ.copy() + env.pop("OPPONENT_MODEL_PATH", None) + env.pop("OPPONENT_MODEL_REVISION", None) + env["SEARCH_SCOPE"] = candidate.get("search_scope", "all") + if "model_path" in opponent: + env.update( + OPPONENT_MODEL_PATH=opponent["model_path"], + OPPONENT_MODEL_REVISION=opponent["model_revision"], + ) + result = subprocess.run( + [ + "bash", + "ai/strong/launch-arena.sh", + item["name"], + candidate["model_path"], + candidate["model_revision"], + "economic" if "model_path" in opponent else opponent["name"], + str(candidate["search_samples"]), + str(int(candidate["geographic_search"])), + str(item["games"]), + item["seed"], + ], + cwd=root, + env=env, + capture_output=True, + text=True, + check=True, + ) + ids = re.findall(r"\b[0-9a-f]{24}\b", result.stdout) + if not ids: + raise RuntimeError( + "Launch response was ambiguous; inspect HF job labels before retrying: " + + result.stdout + ) + run["jobs"][item["name"]] = ids[-1] + manifest["jobs"][item["name"]] = ids[-1] + manifest_path.write_text(json.dumps(manifest, indent=4) + "\n") + print(item["name"], ids[-1], flush=True) From e870986671f8721c34ca0430f4c701bcf0d76505 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:40:43 +0200 Subject: [PATCH 015/184] Retry failed setup and pin CPU arena dependencies --- ai/strong/experiments.json | 12 ++++++++++-- ai/strong/launch-arena.sh | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 01de3ac..452661d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -83,7 +83,7 @@ "refine119-economic-screen": "6abd34cc404719ba37613b4c", "refine119-vs-a260-screen": "6abd34cd404719ba37613b4e", "geo-screen-v2-specialists-0": "6abd395b404719ba37613c3a", - "geo-screen-v2-specialists-1": "6abd395cfbc85ba68235be59", + "geo-screen-v2-specialists-1": "6abd3b59fbc85ba68235beee", "geo-screen-v2-specialists-2": "6abd395cfbc85ba68235be5b", "geo-screen-v2-specialists-3": "6abd395dfbc85ba68235be5d", "specialists-economic-screen": "6abd39e1fbc85ba68235be76", @@ -172,5 +172,13 @@ "search_scope": "recharged-sealed", "search_samples": 48, "feature_revision": "3.1-uranium39" - } + }, + "retried_jobs": [ + { + "name": "geo-screen-v2-specialists-1", + "failed_id": "6abd395cfbc85ba68235be59", + "replacement_id": "6abd3b59fbc85ba68235beee", + "reason": "Terminal ERROR during pip dependency download: files.pythonhosted.org read timeout; no games started. Identical checkpoint, source, scope and seed retried." + } + ] } diff --git a/ai/strong/launch-arena.sh b/ai/strong/launch-arena.sh index c9b8e13..9f4d645 100644 --- a/ai/strong/launch-arena.sh +++ b/ai/strong/launch-arena.sh @@ -14,7 +14,7 @@ hf jobs run --detach --flavor cpu-performance --timeout 3h \ --label project=powergrid-ai --label stage="$1" \ -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' set -euo pipefail -python -m pip install --quiet huggingface_hub onnxruntime +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnxruntime==1.30.0 numpy==2.4.6 mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH From 06e7cad8ebb600ddd7b16004b6b109568e764723 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:44:02 +0200 Subject: [PATCH 016/184] Audit raw held-out matches and CPU evidence against fixed gates --- ai/strong/verify-final.py | 189 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 ai/strong/verify-final.py diff --git a/ai/strong/verify-final.py b/ai/strong/verify-final.py new file mode 100644 index 0000000..ffabf7d --- /dev/null +++ b/ai/strong/verify-final.py @@ -0,0 +1,189 @@ +"""Audit the frozen held-out protocol against raw matches and CPU artifacts.""" + +import argparse +import json +from pathlib import Path +import sys +from arena_statistics import win_summary, search_summary + +p = argparse.ArgumentParser() +p.add_argument("candidate") +p.add_argument("reports", nargs="+") +p.add_argument("--protocol", default="ai/strong/final-protocol.json") +p.add_argument("--parity", required=True) +p.add_argument("--cpu", required=True) +p.add_argument("--package", required=True) +p.add_argument("--output", required=True) +a = p.parse_args() +read = lambda path: json.loads(Path(path).read_text()) +candidate, protocol = read(a.candidate), read(a.protocol) +errors, audited = [], {} + + +def require(condition, message): + if not condition: + errors.append(message) + + +expected = {x["name"]: x for x in protocol["opponents"]} +sha = candidate["model_sha256"] +require( + candidate.get("status") == "selected", "Candidate was not frozen before validation" +) +for path in a.reports: + report = read(path) + spec = next( + ( + x + for x in expected.values() + if ( + report.get("opponent_sha256") == x.get("model_sha256") + if "model_sha256" in x + else report.get("opponent") == x["name"] + and not report.get("opponent_sha256") + ) + ), + None, + ) + if spec is None: + errors.append(f"Unknown opponent report: {path}") + continue + name = spec["name"] + require(name not in audited, f"{name}: duplicate opponent report") + require(report["model_sha256"] == sha, f"{name}: wrong checkpoint") + require( + report["model_feature_revision"] + == candidate["feature_revision"] + == report["encoder_feature_revision"], + f"{name}: feature contract mismatch", + ) + require( + report["candidate_search_samples"] == candidate["search_samples"], + f"{name}: wrong search budget", + ) + require( + report["candidate_geographic_search"] == candidate["geographic_search"], + f"{name}: wrong geographic search setting", + ) + require( + report.get("candidate_search_scope", "all") + == candidate.get("search_scope", "all"), + f"{name}: wrong search scope", + ) + rows = report["results"] + require( + len(rows) == report["games"] == spec["games"], f"{name}: incomplete game count" + ) + pairs = set() + deals = {} + for row in rows: + require( + row["gameSeed"].startswith(protocol["seed_prefix"] + "-"), + f"{name}: non-final seed {row['gameSeed']}", + ) + key = (row["variant"], row["sealed"], row["seat"]) + pair = (row["gameSeed"], *key) + require(pair not in pairs, f"{name}: duplicate paired match {pair}") + pairs.add(pair) + deals.setdefault(row["gameSeed"], set()).add(key) + require(not row["truncated"], f"{name}: truncated match {pair}") + require( + row["roles"].count("learner") == 1 + and row["roles"][row["seat"]] == "learner", + f"{name}: incorrect learner seat", + ) + role = "snapshot0" if "model_path" in spec else name + require( + all(r in ["learner", role] for r in row["roles"]), + f"{name}: wrong opponent roles", + ) + require( + abs(sum(row["value"]) - 1) < 1e-8 + and abs(row["win"] - row["value"][row["seat"]]) < 1e-8, + f"{name}: inconsistent terminal credit", + ) + required_pairs = { + (v, s, seat) + for v in ["original", "recharged"] + for s in [False, True] + for seat in range(3) + } + require( + all(x == required_pairs for x in deals.values()), + f"{name}: missing seat/rule combinations", + ) + require(len(deals) == spec["games"] // 12, f"{name}: wrong independent-deal count") + summary = win_summary(rows) + require( + summary["win_rate"] >= spec["minimum_win_rate"], + f"{name}: win rate below {spec['minimum_win_rate']:.1%}", + ) + interval = summary["seed_bootstrap_95_interval"] + require( + interval is not None + and interval[0] + > protocol["requirements"]["overall_interval_lower_bound_above"], + f"{name}: overall advantage is not established", + ) + groups = [] + for variant in ["original", "recharged"]: + for sealed in [False, True]: + subset = [ + r for r in rows if r["variant"] == variant and r["sealed"] == sealed + ] + if not subset: + errors.append(f"{name}: missing rule subset {variant}/{sealed}") + continue + group = win_summary(subset) + interval = group["seed_bootstrap_95_interval"] + require( + interval is not None + and interval[0] + > protocol["requirements"]["each_rule_interval_lower_bound_above"], + f"{name}: advantage not established for {variant}, sealed={sealed}", + ) + groups.append({"variant": variant, "sealed": sealed, **group}) + search = search_summary(rows) + require( + search["search_rollouts_reported"], + f"{name}: search rollout diagnostics missing", + ) + audited[name] = {"source": path, **summary, **search, "by_rules": groups} +require(set(audited) == set(expected), "Missing required opponent evaluations") +parity, cpu, package = read(a.parity), read(a.cpu), read(a.package) +for label, artifact in [("parity", parity), ("cpu", cpu), ("package", package)]: + require(artifact["model_sha256"] == sha, f"{label}: wrong model hash") +require( + parity["positions"] == 427 and parity["all_actions_match"], + "Checkpoint/export parity did not cover all fixtures", +) +require( + cpu["positions"] == 427 and cpu["all_moves_legal"], + "CPU worker did not pass all legal fixtures", +) +require("8840U" in cpu.get("processor_model", ""), "CPU benchmark was not on the 8840U") +require( + cpu["search_samples"] == candidate["search_samples"] + and cpu.get("search_scope", "all") == candidate.get("search_scope", "all") + and cpu["geographic_search"] == candidate["geographic_search"], + "CPU benchmark configuration differs from final candidate", +) +require( + package["all_hashes_match"] + and package["files_verified"] > 0 + and package["legal_fixture_responses"] == 427, + "Standalone archive verification incomplete", +) +result = { + "passed": not errors, + "errors": errors, + "candidate": candidate, + "protocol": protocol, + "evaluations": audited, + "parity": parity, + "cpu": cpu, + "package": package, +} +Path(a.output).write_text(json.dumps(result, indent=2) + "\n") +print(json.dumps({"passed": not errors, "errors": errors, "opponents": list(audited)})) +sys.exit(0 if not errors else 1) From 8b8f1ab9a3137103cdc27c67c01be44d4d7136d1 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:45:36 +0200 Subject: [PATCH 017/184] Expose completed-game progress during long CPU arenas --- ai/strong/evaluate.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index b109d29..8f4d2df 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -70,6 +70,7 @@ except BaseException: rows = [] latency = [] start = time.perf_counter() +last_progress = start try: while any(x is not None for x in current): actions = [] @@ -109,6 +110,20 @@ try: "win": e["value"][seat], } ) + if time.perf_counter() - last_progress >= 30: + print( + json.dumps( + { + "stage": "arena_progress", + "completed_games": len(rows), + "requested_games": args.games, + "seconds": time.perf_counter() - start, + "seed": args.seed, + } + ), + flush=True, + ) + last_progress = time.perf_counter() finally: pool.close() report = { From 1bf68a1c4c02c4d561231e4ce428e4f37ee63414 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 18:55:33 +0200 Subject: [PATCH 018/184] Freeze reproducible worker entrypoint and final arena source --- ai/strong/README.md | 6 ++++++ ai/strong/experiments.json | 5 +++-- ai/strong/launch-arena.sh | 2 +- ai/strong/package-serving.py | 18 +++++++++++++++++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/ai/strong/README.md b/ai/strong/README.md index b384d63..fa38de2 100644 --- a/ai/strong/README.md +++ b/ai/strong/README.md @@ -93,3 +93,9 @@ Applying 48-sample search to every rule combination reduced corrected A40’s ag The single ONNX export has SHA `b4cae14eb6e1aff72b16e5056983b2a57ad42984f4a27cf99dd70bb63e86be32`. `check-export.py` independently selected the expected component from the original engine options and verified all 427 positions (337 default, 90 Recharged sealed), along with ONNX/checkpoint action parity. Its isolated 8840U archive passed all 1,201 file hashes and all 427 legal requests. There were 33 actual search decisions: 2.36-second search-only p95, 2.57-second maximum; zero of 7,872 rollouts were truncated. Full-worker median was 2.42 ms, with search scoped to Recharged sealed. Development matches against the full opponent suite are running on immutable source v14; final seeds remain unused. The completed full-distillation refinement’s update-119 checkpoint scored 65.9% against economic opponents and 35.7% against A260 over 480 games each; the latter interval [30.3%, 41.3%] did not establish a reliable gain. It is not replacing the stronger corrected A40 checkpoint. + +The combined candidate’s first full development result is 76.7% against two economic opponents over 480 games/40 deals ([72.7%, 80.6%]). The unchanged three A40 branches reproduce their earlier win rates; the corrected B160/search branch scored 96.7% in Recharged sealed. All games completed, and none of 1,204,368 candidate search rollouts hit the step limit. Other opponent results are still required. + +`launch-final.py` prepares 3,840 fresh games in 80 CPU shards and defaults to a dry run. It verifies the selected model hash, freezes the candidate/protocol/launcher fingerprint, and records each dispatched job for resumption without silently changing the test. `verify-final.py` recomputes paired-deal intervals from raw matches and audits model/configuration hashes, exact game counts, every seat/rule pairing, held-out seed prefixes, terminal credit, rollout reporting, parity, the 8840U benchmark, and the extracted archive. A negative check correctly rejected development seeds and a mismatched/unfrozen candidate. + +The standalone archive provides `serve.py`, which reads the frozen manifest and checks the model hash before starting the worker. It was tested from an unrelated working directory with legal responses and the intended rule-specific search budget. Final CPU arenas use source v15 (policy unchanged; adds completed-game progress logs) and pinned dependencies. diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 452661d..7f86e3a 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -153,8 +153,9 @@ "a_refine40_revision": "090097057787a3ddefe4d31b2ca1796c5ce335ea", "full_refine119_revision": "f9d9a5c5d4336f9e662209155f214fef5789d5b1", "final_arena_source": { - "archive": "strong-source-v13.tgz", - "commit": "3eea217f53333f63d81345a7319179a59d63a55b" + "archive": "strong-source-v15.tgz", + "commit": "5346157377b6ba0c716b6bf3c7b434cc3696fb1d", + "changes_from_development_runtime": "Progress reporting only; policy behavior unchanged." }, "stopped_after_regression": { "strong-refine-v1-search": { diff --git a/ai/strong/launch-arena.sh b/ai/strong/launch-arena.sh index 9f4d645..d81e02b 100644 --- a/ai/strong/launch-arena.sh +++ b/ai/strong/launch-arena.sh @@ -18,7 +18,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v14.tgz\",repo_type=\"dataset\", revision=\"5f1c68899807970428e55033fc81223970795c52\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v15.tgz\",repo_type=\"dataset\", revision=\"5346157377b6ba0c716b6bf3c7b434cc3696fb1d\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' diff --git a/ai/strong/package-serving.py b/ai/strong/package-serving.py index c62fe55..a43cb32 100644 --- a/ai/strong/package-serving.py +++ b/ai/strong/package-serving.py @@ -56,12 +56,28 @@ with tempfile.TemporaryDirectory() as tmp: for name in strong: shutil.copy2(root / "ai/strong" / name, bundle / "ai/strong" / name) shutil.copy2(model, bundle / "policy.onnx") + (bundle / "serve.py").write_text( + """import hashlib, json, os, sys +from pathlib import Path +root = Path(__file__).resolve().parent +if len(sys.argv) != 1: + raise SystemExit("Invoke this frozen worker without arguments; send JSONL on stdin.") +manifest = json.loads((root / "manifest.json").read_text()) +model = root / "policy.onnx" +if hashlib.sha256(model.read_bytes()).hexdigest() != manifest["model_sha256"]: + raise SystemExit("Model hash differs from the frozen manifest") +command = [sys.executable, str(root / "ai/strong/infer.py"), str(model), "--search-samples", str(manifest["search_samples"]), "--search-scope", manifest.get("search_scope", "all")] +if manifest["geographic_search"]: + command.append("--geographic-search") +os.execv(sys.executable, command) +""" + ) command = ( f"python ai/strong/infer.py policy.onnx --search-samples {a.search_samples} --search-scope {a.search_scope}" + (" --geographic-search" if a.geographic_search else "") ) (bundle / "START.txt").write_text( - "Powergrid CPU research worker\n\nRequires Node.js 24 and Python 3.11 or 3.12.\nCreate a virtual environment and install: pip install -r ai/requirements-serve.txt\nRun from this directory: " + "Powergrid CPU research worker\n\nRequires Node.js 24 and Python 3.11 or 3.12.\nCreate a virtual environment and install: pip install -r ai/requirements-serve.txt\nRun the frozen configuration from any directory: python /path/to/package/serve.py\nEquivalent direct command: " + command + "\n\nSend one JSON object per line with requestId, revision, player (seat index), and state (engine game state). Keep the process alive between requests. Each response proposes one atomic move. The platform must check the game revision and validate the move through the authoritative engine before committing it. Errors must not be committed as moves.\n\nScope: Germany, three players, automatic setup; original/Recharged and open/sealed auctions. Other players’ money is intentionally visible. Hidden deck order and sealed bids are excluded from policy inputs and search beliefs. Value outputs are uncalibrated training-opponent estimates, not objective player-analysis scores.\n\nThis archive makes no strength claim by itself. Consult the accompanying measured evaluations. No production routing is installed.\n" ) From 8bab029c239d226748f7c0b18bec8beca965815d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:03:56 +0200 Subject: [PATCH 019/184] =?UTF-8?q?Add=20versioned=202=E2=80=936=20player?= =?UTF-8?q?=20observations=20and=20masked=20multiplayer=20policy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai/strong/encoders.cjs | 1 + ai/strong/features-v4.cjs | 175 ++++++++++++++++++++++++++++ ai/strong/model.py | 6 +- ai/strong/model_v4.py | 49 ++++++++ ai/strong/multiplayer-progress.json | 44 +++++++ ai/strong/test-v4.cjs | 64 ++++++++++ ai/strong/test_model_v4.py | 40 +++++++ 7 files changed, 378 insertions(+), 1 deletion(-) create mode 100644 ai/strong/features-v4.cjs create mode 100644 ai/strong/model_v4.py create mode 100644 ai/strong/multiplayer-progress.json create mode 100644 ai/strong/test-v4.cjs create mode 100644 ai/strong/test_model_v4.py diff --git a/ai/strong/encoders.cjs b/ai/strong/encoders.cjs index 8a5deab..7531b39 100644 --- a/ai/strong/encoders.cjs +++ b/ai/strong/encoders.cjs @@ -1,6 +1,7 @@ const current = require('./features.cjs'); function forRevision(revision = current.FEATURE_REVISION) { if (revision === current.FEATURE_REVISION) return current; + if (revision === '4.0-multiplayer') return require('./features-v4.cjs'); if (revision === '3.0') return require('./features-v3_0.cjs'); throw Error('Unsupported feature revision: ' + revision); } diff --git a/ai/strong/features-v4.cjs b/ai/strong/features-v4.cjs new file mode 100644 index 0000000..e19ef92 --- /dev/null +++ b/ai/strong/features-v4.cjs @@ -0,0 +1,175 @@ +// Schema 4: fixed-size public observations for 2–6 players. Schema 3 stays frozen. +const c = require('../core.cjs'), + eco = require('./economics.cjs'), + spatial = require('./spatial.cjs'); +const FEATURE_REVISION = '4.0-multiplayer', + MAX_PLAYERS = 6; +const pad = (xs, n) => [...xs, ...Array(Math.max(0, n - xs.length)).fill(0)]; +const plant = (p) => + p + ? [p.number / 50, p.cost / 4, p.citiesPowered / 8, ...Array.from({ length: 7 }, (_, i) => +(p.type === i))] + : Array(10).fill(0); +function assertScope(g, seat) { + if ( + g.map.name !== 'Germany' || + g.players.length < 2 || + g.players.length > 6 || + g.options.randomizeMap || + g.options.chooseRegions || + g.options.chooseColors || + g.map.cities.some((x) => !c.CITIES.includes(x.name)) + ) + throw Error('Schema 4 supports automatic Germany games with 2–6 players'); + if (!Number.isInteger(seat) || seat < 0 || seat >= g.players.length) throw Error('Invalid observing seat'); +} +function observe(g, seat, geometry = spatial.territories(g, seat)) { + assertScope(g, seat); + const n = g.players.length, + order = Array.from({ length: n }, (_, i) => (seat + i) % n); + const playerMask = pad( + order.map(() => 1), + MAX_PLAYERS + ); + const global = [ + ...Object.values(c.E.Phase).map((x) => +(x === g.phase)), + g.round / 20, + g.step / 3, + +(g.options.variant === 'recharged'), + +g.options.fastBid, + n / 6, + g.cardsLeft / 50, + +g.nextCardWeak, + (g.options.fastBid ? 0 : g.currentBid || 0) / 100, + (g.minimunBid || 0) / 100, + g.citiesToEndGame / 25, + g.citiesToStep2 / 20, + +!!g.card39Bought, + g.currentPlayers.length / n, + ]; + for (const r of c.RES) + global.push( + g[r + 'Market'] / 24, + g[r + 'Supply'] / 24, + ...pad( + g[r + 'Prices'].map((x) => x / 20), + 24 + ), + ...[1, 2, 3].map((step) => eco.replenishment(g, r, step) / 12), + c.resourcePrice(g, r) / 20, + Math.min(g[r + 'Supply'], eco.replenishment(g, r), g[r + 'Prices'].length - g[r + 'Market']) / 24 + ); + global.push( + ...pad( + g.paymentTable.slice(0, 23).map((x) => x / 200), + 23 + ) + ); + for (let i = 0; i < 4; i++) global.push(...plant(g.actualMarket[i]), ...plant(g.futureMarket[i])); + global.push(...plant(g.chosenPowerPlant)); + const players = order.map((id) => { + const p = g.players[id], + rank = g.playerOrder.indexOf(id), + demand = eco.demand(g, p), + fuel = eco.plan(g, p, 22, { buy: false }); + const row = [ + p.money / 500, + p.cities.length / 22, + p.housesLeft / 22, + p.citiesPowered / 22, + rank / (n - 1), + (n - 1 - rank) / (n - 1), + +p.skipAuction, + +p.passed, + +g.currentPlayers.includes(id), + +(g.auctioningPlayer === id), + (g.options.fastBid ? 0 : p.bid || 0) / 100, + p.hybridCapacity / 24, + c.capacity(p) / 22, + fuel.power / 22, + ]; + for (const [j, r] of c.RES.entries()) + row.push( + p[r + 'Left'] / 24, + p[r + 'Capacity'] / 24, + demand[j] / 12, + Math.max(0, demand[j] - p[r + 'Left']) / 12 + ); + for (let i = 0; i < 4; i++) + row.push( + ...plant(p.powerPlants[i]), + +!!p.powerPlants[i] && +p.powerPlantsNotUsed.includes(p.powerPlants[i].number) + ); + return row; + }); + const playerWidth = players[0].length; + while (players.length < MAX_PLAYERS) players.push(Array(playerWidth).fill(0)); + const cities = c.CITIES.flatMap((name) => [ + +g.map.cities.some((x) => x.name === name), + ...pad( + order.map((id) => +g.players[id].cities.some((x) => x.name === name)), + MAX_PLAYERS + ), + ]); + const territory = []; + for (const [groups, limit] of [ + [geometry.regions, 8], + [geometry.islands, 4], + ]) + for (let i = 0; i < limit; i++) { + const x = groups[i]; + territory.push( + ...(x + ? [ + 1, + x.size / 64, + x.empty / 64, + x.open / 64, + x.totalFree / 128, + ...pad( + x.owned.map((v) => v / 22), + MAX_PLAYERS + ), + ] + : Array(11).fill(0)) + ); + } + territory.push((g.map.crossIslandSurcharge || 0) / 100); + const state = [...playerMask, ...global, ...players.flat(), ...cities, ...territory]; + if (!state.every(Number.isFinite)) throw Error('Nonfinite schema 4 observation'); + return { + state, + playerMask, + playerOrder: order, + layout: { global: global.length, player: playerWidth, cities: cities.length, territory: territory.length }, + }; +} +function encode(g, seat) { + const geometry = spatial.territories(g, seat), + observation = observe(g, seat, geometry); + const moves = c.candidates(g, seat), + raw = eco.scores(g, seat, moves), + best = Math.max(...raw); + const actions = moves.map((a, i) => { + const geo = spatial.actionFeatures(g, seat, a, geometry), + n = g.players.length; + return [ + ...c.actionFeatures(g, seat, a), + Math.max(-10, Math.min(10, raw[i] / 10)), + +(raw[i] === best), + ...pad(geo.slice(0, n), 6), + ...pad(geo.slice(n, 2 * n), 6), + ...pad(geo.slice(2 * n, 3 * n), 6), + ...geo.slice(3 * n), + ]; + }); + return { + featureRevision: FEATURE_REVISION, + ...observation, + actions, + moves, + prior: raw.map((x) => Math.max(-10, Math.min(10, x / 10))), + teacher: raw.indexOf(best), + seat, + }; +} +module.exports = { SCHEMA: 4, FEATURE_REVISION, MAX_PLAYERS, observe, encode }; diff --git a/ai/strong/model.py b/ai/strong/model.py index db8fe1e..0281741 100644 --- a/ai/strong/model.py +++ b/ai/strong/model.py @@ -69,7 +69,11 @@ class RuleSpecialists(nn.Module): def policy_from_checkpoint(checkpoint): architecture = checkpoint.get("architecture", "policy") - if architecture == "rule_specialists": + if architecture == "multiplayer": + from model_v4 import MultiplayerPolicy + + net = MultiplayerPolicy(**checkpoint.get("model_args", {})) + elif architecture == "rule_specialists": net = RuleSpecialists(**checkpoint["model_args"]) elif architecture == "policy": net = Policy(strategic_only=checkpoint.get("strategic_only", False)) diff --git a/ai/strong/model_v4.py b/ai/strong/model_v4.py new file mode 100644 index 0000000..4932bc8 --- /dev/null +++ b/ai/strong/model_v4.py @@ -0,0 +1,49 @@ +"""Six-slot public-state policy; inactive players have exactly zero value mass.""" + +import torch +from torch import nn + + +class MultiplayerPolicy(nn.Module): + def __init__(self, width=384): + super().__init__() + self.player = nn.Sequential(nn.Linear(74, 128), nn.LayerNorm(128), nn.SiLU()) + # Global context, city ownership and territory occupancy retain seat order. + self.context = nn.Sequential( + nn.Linear(258 + 308 + 133 + 256 + 6, width), + nn.LayerNorm(width), + nn.SiLU(), + nn.Linear(width, width), + nn.SiLU(), + ) + self.action = nn.Sequential(nn.Linear(98, 128), nn.SiLU()) + self.score = nn.Sequential( + nn.Linear(width + 128, 256), nn.SiLU(), nn.Linear(256, 1) + ) + self.value = nn.Sequential( + nn.Linear(width + 128, 128), nn.SiLU(), nn.Linear(128, 1) + ) + nn.init.zeros_(self.score[-1].weight) + nn.init.zeros_(self.score[-1].bias) + + def forward(self, state, actions, mask): + active = state[:, :6] > 0.5 + p = self.player(state[:, 264:708].reshape(-1, 6, 74)) + pooled = (p * active[:, :, None]).sum(1) / active.sum(1, keepdim=True).clamp( + min=1 + ) + s = self.context( + torch.cat( + (state[:, 6:264], state[:, 708:], p[:, 0], pooled, state[:, :6]), -1 + ) + ) + a = self.action(actions) + logits = actions[:, :, 74] * 2 + self.score( + torch.cat((s[:, None].expand(-1, a.shape[1], -1), a), -1) + ).squeeze(-1) + values = self.value(torch.cat((s[:, None].expand(-1, 6, -1), p), -1)).squeeze( + -1 + ) + return logits.masked_fill(~mask, -1e9), values.masked_fill( + ~active, -1e9 + ).softmax(-1) diff --git a/ai/strong/multiplayer-progress.json b/ai/strong/multiplayer-progress.json new file mode 100644 index 0000000..f3c76e0 --- /dev/null +++ b/ai/strong/multiplayer-progress.json @@ -0,0 +1,44 @@ +{ + "status": "implementation; not trained or strength-qualified", + "feature_revision": "4.0-multiplayer", + "scope": { + "map": "Germany", + "players": [ + 2, + 3, + 4, + 5, + 6 + ], + "variants": [ + "original", + "recharged" + ], + "auctions": [ + "open", + "sealed" + ], + "setup": "automatic" + }, + "representation": { + "state": 1149, + "action": 98, + "player_slots": 6, + "player_width": 74, + "value": "six slots with inactive players masked to zero" + }, + "verified": { + "complete_games": 20, + "encoded_decisions": 9363, + "hidden_information_invariance": true, + "cpu_model_forward_all_counts": true + }, + "pending": [ + "Generalize bridge seat rotation, roles, terminal vectors and episode cap without changing schema 3 behavior", + "Generalize PPO value targets and league checkpoint routing", + "Balanced HF teacher generation and HF training across counts and rules", + "Count-specific paired held-out evaluation and strength gates; old three-player final protocol is insufficient", + "ONNX export and AMD 8840U benchmark across all supported counts" + ], + "preserved_baseline": "Schema 3 encoders and three-player checkpoint architecture unchanged; final seeds remain unused" +} diff --git a/ai/strong/test-v4.cjs b/ai/strong/test-v4.cjs new file mode 100644 index 0000000..07ecf39 --- /dev/null +++ b/ai/strong/test-v4.cjs @@ -0,0 +1,64 @@ +const test = require('node:test'), + assert = require('node:assert/strict'); +const c = require('../core.cjs'), + f = require('./features-v4.cjs'), + old = require('./features.cjs'), + eco = require('./economics.cjs'); +test('schema 4 covers complete 2–6 player games in all four rule combinations', () => { + let decisions = 0; + for (let n = 2; n <= 6; n++) + for (const variant of ['original', 'recharged']) + for (const fastBid of [false, true]) { + const g = c.E.setup( + n, + { map: 'Germany', variant, fastBid, showMoney: true }, + `v4-${n}-${variant}-${fastBid}` + ); + let steps = 0; + while (!c.E.ended(g) && steps < 2400) { + const seat = g.currentPlayers[0], + x = f.encode(g, seat); + assert.equal(x.state.length, 1149); + assert.equal( + x.playerMask.reduce((a, b) => a + b), + n + ); + assert.deepEqual( + x.playerOrder, + Array.from({ length: n }, (_, i) => (seat + i) % n) + ); + assert.ok(x.actions.every((a) => a.length === 98 && a.every(Number.isFinite))); + assert.deepEqual(x.state.slice(264 + 74 * n, 708), Array(74 * (6 - n)).fill(0)); + if (steps === 0 && fastBid) { + const before = f.encode(g, seat), + hidden = structuredClone(g); + hidden.currentBid = 999; + hidden.players.forEach((p) => (p.bid = 999)); + hidden.powerPlantsDeck.reverse(); + hidden.seed = 'hidden'; + assert.deepEqual(f.encode(hidden, seat), before); + } + c.E.move(g, x.moves[x.teacher], seat); + steps++; + decisions++; + } + assert.ok(c.E.ended(g), `unfinished ${n}/${variant}/${fastBid} at ${steps}`); + assert.equal(c.outcome(g).length, n); + } + console.log({ completeGames: 20, decisions }); +}); +test('schema 3 representation remains unchanged and schema 4 observes every opponent', () => { + const g = c.start('frozen-feature'), + seat = g.currentPlayers[0]; + assert.equal(old.encode(g, seat).state.length, 738); + for (let n = 2; n <= 6; n++) { + const game = c.E.setup(n, { map: 'Germany' }, 'public-' + n), + viewer = game.currentPlayers[0]; + for (let other = 0; other < n; other++) { + const before = f.observe(game, viewer).state; + game.players[other].money++; + assert.notDeepEqual(f.observe(game, viewer).state, before); + } + assert.equal(eco.replenishment(game, 'coal'), game.coalResupply[n - 2][game.step - 1]); + } +}); diff --git a/ai/strong/test_model_v4.py b/ai/strong/test_model_v4.py new file mode 100644 index 0000000..3ddf81f --- /dev/null +++ b/ai/strong/test_model_v4.py @@ -0,0 +1,40 @@ +import json +from pathlib import Path +import subprocess +import unittest + +import torch +from model import tensors +from model_v4 import MultiplayerPolicy + + +class MultiplayerTests(unittest.TestCase): + def test_all_counts_mask_values_and_legal_actions(self): + root = Path(__file__).resolve().parents[2] + rows = json.loads( + subprocess.check_output( + [ + "node", + "-e", + "const c=require('./ai/core.cjs'),f=require('./ai/strong/features-v4.cjs');" + "console.log(JSON.stringify([2,3,4,5,6].map(n=>{const g=c.E.setup(n,{map:'Germany'},'mask-test');return f.encode(g,g.currentPlayers[0]);})));", + ], + cwd=root, + ) + ) + net = MultiplayerPolicy().eval() + with torch.inference_mode(): + logits, values = net(*tensors(rows, "cpu")) + self.assertEqual(tuple(values.shape), (5, 6)) + for row, n in enumerate(range(2, 7)): + self.assertTrue(torch.isfinite(logits[row]).all()) + self.assertTrue(torch.isfinite(values[row]).all()) + self.assertEqual(values[row, n:].sum().item(), 0) + self.assertAlmostEqual(values[row, :n].sum().item(), 1, places=6) + self.assertLess(logits[row].argmax().item(), len(rows[row]["actions"])) + expected = torch.tensor(rows[row]["prior"]).argmax().item() + self.assertEqual(logits[row].argmax().item(), expected) + + +if __name__ == "__main__": + unittest.main() From 6967682bdd7f754b23de56eff8dab7445cf7d28e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:06:59 +0200 Subject: [PATCH 020/184] =?UTF-8?q?Generalize=20league=20rollouts=20and=20?= =?UTF-8?q?PPO=20targets=20to=202=E2=80=936=20players?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai/pool.py | 2 +- ai/strong/bridge.cjs | 25 ++-- ai/strong/multiplayer.py | 17 +++ ai/strong/test_multiplayer_bridge.py | 63 ++++++++++ ai/strong/train.py | 181 +++++++++++++++++++-------- 5 files changed, 227 insertions(+), 61 deletions(-) create mode 100644 ai/strong/multiplayer.py create mode 100644 ai/strong/test_multiplayer_bridge.py diff --git a/ai/pool.py b/ai/pool.py index bcbc3d2..e494597 100644 --- a/ai/pool.py +++ b/ai/pool.py @@ -40,7 +40,7 @@ class EnginePool: raise ValueError("Need at least one environment per worker") self.sizes = [n // workers + (i < n % workers) for i in range(workers)] requests = [] - offset = 0 + offset = request.get("offset", 0) for n in self.sizes: requests.append({**request, "n": n, "offset": offset}) offset += n diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index 9300616..b2b363c 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -67,9 +67,11 @@ function observation(e) { round: e.g.round, variant: e.g.options.variant, sealed: !!e.g.options.fastBid, + playerCount: e.g.players.length, }; } -function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { +function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, playerCount = 3) { + if (!Number.isInteger(playerCount) || playerCount < 2 || playerCount > 6) throw Error('Invalid player count'); if ( ![ 'mixed', @@ -88,7 +90,7 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { ) throw Error('Unknown opponent mode: ' + mode); const id = arenaSeed === undefined ? sequence++ : arenaId, - seat = Math.floor(id / 4) % 3, + seat = Math.floor(id / 4) % playerCount, kind = Math.floor(c.seedrandom(seed + '-opponents-' + id)() * 8); const opponent = mode === 'mixed' || mode === 'mixed_search' @@ -105,13 +107,17 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { : mode; const roles = opponent === 'selfplay' - ? ['learner', 'learner', 'learner'] - : Array.from({ length: 3 }, (_, i) => (i === seat ? 'learner' : opponent)); - const gameSeed = arenaSeed === undefined ? seed + '-' + id : arenaSeed + '-' + Math.floor(id / 12); + ? Array(playerCount).fill('learner') + : Array.from({ length: playerCount }, (_, i) => (i === seat ? 'learner' : opponent)); + const gameSeed = arenaSeed === undefined ? seed + '-' + id : arenaSeed + '-' + Math.floor(id / (4 * playerCount)); const e = { id, gameSeed, - g: c.start(gameSeed, id % 2 ? 'recharged' : 'original', id % 4 < 2), + g: c.E.setup( + playerCount, + { map: 'Germany', variant: id % 2 ? 'recharged' : 'original', fastBid: id % 4 < 2, showMoney: true }, + gameSeed + ), roles, rng: c.seedrandom(arenaSeed === undefined ? seed + '-bot-' + id : gameSeed + '-bot'), steps: 0, @@ -129,7 +135,7 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { ended = []; if (q.op === 'reset') envs = Array.from({ length: q.n }, (_, i) => - reset(q.mode, q.arenaSeed, (q.offset || 0) + i, q.featureRevisions) + reset(q.mode, q.arenaSeed, (q.offset || 0) + i, q.featureRevisions, q.playerCount ?? 3) ); else if (q.op === 'step') for (let i = 0; i < envs.length; i++) { @@ -161,7 +167,10 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}) { episode: e.id, gameSeed: e.gameSeed, truncated: !c.E.ended(e.g), - value: c.E.ended(e.g) ? c.outcome(e.g) : [0, 0, 0], + value: c.E.ended(e.g) ? c.outcome(e.g) : Array(e.g.players.length).fill(0), + playerCount: e.g.players.length, + variant: e.g.options.variant, + sealed: !!e.g.options.fastBid, steps: e.steps, roles: e.roles, policyMoves: e.policyMoves, diff --git a/ai/strong/multiplayer.py b/ai/strong/multiplayer.py new file mode 100644 index 0000000..c7108a7 --- /dev/null +++ b/ai/strong/multiplayer.py @@ -0,0 +1,17 @@ +"""Shared schema-4 training contracts, also exercised without gradient training.""" + +FEATURE_REVISION = "4.0-multiplayer" +PLAYER_COUNTS = (2, 3, 4, 5, 6) +ROLE_REVISIONS = { + role: FEATURE_REVISION + for role in ("learner", "snapshot0", "snapshot1", "snapshot2") +} + + +def rotate_outcome(outcome, seat): + n = len(outcome) + if n not in PLAYER_COUNTS or not 0 <= seat < n: + raise ValueError("Invalid terminal outcome shape or seat") + if abs(sum(outcome) - 1) > 1e-6 or any(x < 0 for x in outcome): + raise ValueError("Expected complete terminal win credits") + return [outcome[(seat + j) % n] for j in range(n)] + [0.0] * (6 - n) diff --git a/ai/strong/test_multiplayer_bridge.py b/ai/strong/test_multiplayer_bridge.py new file mode 100644 index 0000000..f1b6b95 --- /dev/null +++ b/ai/strong/test_multiplayer_bridge.py @@ -0,0 +1,63 @@ +"""Complete real engine episodes through the exact training subprocess protocol.""" + +import sys +from pathlib import Path +import unittest + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +from pool import EnginePool +from multiplayer import ROLE_REVISIONS, rotate_outcome + + +class BridgeTests(unittest.TestCase): + def test_complete_paired_counts_and_rotate_terminal_targets(self): + pool = EnginePool(3, seed="multiplayer-protocol", script="ai/strong/bridge.cjs") + try: + for n in range(2, 7): + current = pool.call( + { + "op": "reset", + "n": 4 * n, + "mode": "selfplay", + "playerCount": n, + "featureRevisions": ROLE_REVISIONS, + "arenaSeed": f"protocol-{n}", + "offset": 4 * n, + } + )["observations"] + ends = [] + seats = set() + for _ in range(1800): + for row in current: + if row: + self.assertEqual(row["playerCount"], n) + self.assertEqual(row["featureRevision"], "4.0-multiplayer") + seats.add(row["seat"]) + reply = pool.call( + { + "op": "step", + "actions": [r["teacher"] if r else None for r in current], + } + ) + ends.extend(reply["ended"]) + current = reply["observations"] + if all(r is None for r in current): + break + self.assertEqual(len(ends), 4 * n) + self.assertEqual(seats, set(range(n))) + self.assertEqual({e["episode"] for e in ends}, set(range(4 * n, 8 * n))) + self.assertEqual({e["gameSeed"] for e in ends}, {f"protocol-{n}-1"}) + for e in ends: + self.assertFalse(e["truncated"]) + self.assertEqual(len(e["roles"]), n) + for seat in range(n): + rotated = rotate_outcome(e["value"], seat) + self.assertEqual(rotated[0], e["value"][seat]) + self.assertEqual(rotated[n:], [0.0] * (6 - n)) + self.assertAlmostEqual(sum(rotated), 1) + finally: + pool.close() + + +if __name__ == "__main__": + unittest.main() diff --git a/ai/strong/train.py b/ai/strong/train.py index 7816198..f7c1d1f 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -10,10 +10,19 @@ import numpy as np import torch from torch.distributions import Categorical from model import Policy, tensors +from model_v4 import MultiplayerPolicy +from multiplayer import ROLE_REVISIONS, rotate_outcome from pool import EnginePool from huggingface_hub import HfApi, hf_hub_download from feature_contract import FEATURE_REVISION, embed_revision +multiplayer = os.getenv("ARCHITECTURE") == "multiplayer" +if multiplayer: + FEATURE_REVISION = "4.0-multiplayer" +state_dim, action_dim = (1149, 98) if multiplayer else (738, 96) +player_counts = [2, 3, 4, 5, 6] if multiplayer else [3] +feature_revisions = ROLE_REVISIONS if multiplayer else {} + seed = int(os.getenv("TRAIN_SEED", "101")) random.seed(seed) np.random.seed(seed) @@ -60,7 +69,11 @@ strategic_only = ( ) == "1" ) -net = Policy(strategic_only=strategic_only).to(device) +if multiplayer and strategic_only: + raise ValueError("Strategic-only schema-3 routing cannot be used with schema 4") +net = ( + MultiplayerPolicy() if multiplayer else Policy(strategic_only=strategic_only) +).to(device) if checkpoint: net.load_state_dict(checkpoint["state_dict"]) initial_anchor = ( @@ -88,9 +101,10 @@ update = -1 def save(name, export=False): torch.save( { - "state_dim": 738, - "action_dim": 96, - "schema": 3, + "state_dim": state_dim, + "action_dim": action_dim, + "schema": 4 if multiplayer else 3, + "architecture": "multiplayer" if multiplayer else "policy", "feature_revision": FEATURE_REVISION, "strategic_only": strategic_only, "update": update, @@ -108,8 +122,8 @@ def save(name, export=False): torch.onnx.export( clone, ( - torch.zeros(1, 738), - torch.zeros(1, 8, 96), + torch.zeros(1, state_dim), + torch.zeros(1, 8, action_dim), torch.ones(1, 8, dtype=torch.bool), ), str(out / (name + ".onnx")), @@ -125,16 +139,16 @@ def save(name, export=False): opset_version=17, dynamo=False, ) - embed_revision(out / (name + ".onnx")) + embed_revision(out / (name + ".onnx"), FEATURE_REVISION) (out / "metrics.json").write_text(json.dumps(metrics, indent=2)) (out / "schema.json").write_text( json.dumps( { - "version": 3, + "version": 4 if multiplayer else 3, "feature_revision": FEATURE_REVISION, - "state_dim": 738, - "action_dim": 96, - "players": 3, + "state_dim": state_dim, + "action_dim": action_dim, + "players": player_counts if multiplayer else 3, "map": "Germany", "information": "all money public, sealed bids/deck/queued plans excluded", "run": run, @@ -160,34 +174,71 @@ def evaluate(update): pool = EnginePool(4, seed="strong-development-v1", script="ai/strong/bridge.cjs") result = {} try: - for mode in ["economic", "heuristic", "rush", "legacy"]: - current = pool.call({"op": "reset", "n": 96, "mode": mode})["observations"] - ends = [] - while any(x is not None for x in current): - live = [i for i, x in enumerate(current) if x is not None] - rows = [current[i] for i in live] - with torch.no_grad(): - logits, _ = net(*tensors(rows, device)) - chosen = logits.argmax(-1).cpu().tolist() - actions = [None] * len(current) - for i, a in zip(live, chosen): - actions[i] = a - r = pool.call({"op": "step", "actions": actions}) - current = r["observations"] - ends.extend(r["ended"]) - wins = [ - sum( - e["value"][i] - for i, role in enumerate(e["roles"]) - if role == "learner" - ) - for e in ends - ] - result[mode] = { - "win": float(np.mean(wins)), - "truncated": sum(e["truncated"] for e in ends), - "games": len(ends), - } + for player_count in player_counts: + for mode in ["economic", "heuristic", "rush", "legacy"]: + current = pool.call( + { + "op": "reset", + "n": 8 * player_count if multiplayer else 96, + "mode": mode, + "playerCount": player_count, + "featureRevisions": feature_revisions, + **( + {"arenaSeed": f"multiplayer-development-{player_count}-v1"} + if multiplayer + else {} + ), + } + )["observations"] + ends = [] + while any(x is not None for x in current): + live = [i for i, x in enumerate(current) if x is not None] + rows = [current[i] for i in live] + with torch.no_grad(): + logits, _ = net(*tensors(rows, device)) + chosen = logits.argmax(-1).cpu().tolist() + actions = [None] * len(current) + for i, a in zip(live, chosen): + actions[i] = a + r = pool.call({"op": "step", "actions": actions}) + current = r["observations"] + ends.extend(r["ended"]) + wins = [ + sum( + e["value"][i] + for i, role in enumerate(e["roles"]) + if role == "learner" + ) + for e in ends + ] + result[f"{player_count}p/{mode}" if multiplayer else mode] = { + "player_count": player_count, + "by_rule": { + f"{variant}/{sealed}": { + "games": len(group), + "win": float( + np.mean( + [ + e["value"][e["roles"].index("learner")] + for e in group + ] + ) + ), + } + for variant in ["original", "recharged"] + for sealed in [False, True] + if ( + group := [ + e + for e in ends + if e["variant"] == variant and e["sealed"] == sealed + ] + ) + }, + "win": float(np.mean(wins)), + "truncated": sum(e["truncated"] for e in ends), + "games": len(ends), + } finally: pool.close() print( @@ -199,6 +250,22 @@ def evaluate(update): return result +def selection_score(evaluation): + if not multiplayer: + return float( + np.mean([evaluation[x]["win"] for x in ["economic", "heuristic", "rush"]]) + ) + return float( + np.mean( + [ + (v["win"] - 1 / v["player_count"]) / (1 - 1 / v["player_count"]) + for k, v in evaluation.items() + if not k.endswith("/legacy") + ] + ) + ) + + try: print( json.dumps( @@ -212,18 +279,22 @@ try: ), flush=True, ) - if initial_checkpoint: + if initial_checkpoint or multiplayer: net.eval() evaluation = evaluate(-1) metrics.append({"stage": "evaluation", "update": -1, **evaluation}) - best = float( - np.mean([evaluation[x]["win"] for x in ["economic", "heuristic", "rush"]]) - ) + best = selection_score(evaluation) save("best", export=True) for update in range(updates): start = time.perf_counter() current = rollout.call( - {"op": "reset", "n": nenv, "mode": os.getenv("OPPONENT_MODE", "mixed")} + { + "op": "reset", + "n": nenv, + "mode": os.getenv("OPPONENT_MODE", "mixed"), + "playerCount": player_counts[update % len(player_counts)], + "featureRevisions": feature_revisions, + } )["observations"] pending = [[] for _ in range(nenv)] batch = [] @@ -235,7 +306,7 @@ try: rows = [current[i] for i in live] choice = [0] * len(rows) logps = [0.0] * len(rows) - values = [[0.0, 0.0, 0.0]] * len(rows) + values = [[0.0] * (6 if multiplayer else 3)] * len(rows) roles = {r["roles"][r["seat"]] for r in rows} for role in roles: indices = [ @@ -281,9 +352,11 @@ try: endings.append(end) if not end["truncated"]: for r in pending[end["env"]]: - r["value"] = [ - end["value"][(r["seat"] + j) % 3] for j in range(3) - ] + r["value"] = ( + rotate_outcome(end["value"], r["seat"]) + if multiplayer + else [end["value"][(r["seat"] + j) % 3] for j in range(3)] + ) r["advantage"] = r["value"][0] - r["oldvalue"] batch.append(r) pending[end["env"]] = [] @@ -322,7 +395,12 @@ try: ) loss = ( pg - + 0.5 * ((value - target) ** 2).mean() + + 0.5 + * ( + (((value - target) ** 2).sum(-1) / x[0][:, :6].sum(-1)).mean() + if multiplayer + else ((value - target) ** 2).mean() + ) - float(os.getenv("ENTROPY", ".01")) * dist.entropy().mean() + float(os.getenv("ANCHOR", ".01")) * kl ) @@ -336,6 +414,7 @@ try: "run": run, "update": update, "episodes": len(endings), + "player_count": player_counts[update % len(player_counts)], "truncated": sum(x["truncated"] for x in endings), "samples": len(batch), "rollout_seconds": rollout_seconds, @@ -360,9 +439,7 @@ try: net.eval() evaluation = evaluate(update) metrics.append({"stage": "evaluation", "update": update, **evaluation}) - score = np.mean( - [evaluation[x]["win"] for x in ["economic", "heuristic", "rush"]] - ) + score = selection_score(evaluation) if score > best: best = score snapshots.append(copy.deepcopy(net).eval()) From df6ae86a95074f8730ac12ef49ec40d549bb25b4 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:09:19 +0200 Subject: [PATCH 021/184] Launch multiplayer training validation and extend search teacher data --- ai/strong/experiments.json | 38 ++++++++++++++++++--- ai/strong/generate-search-data.py | 21 ++++++++++-- ai/strong/launch-multiplayer-pipeline.sh | 21 ++++++++++++ ai/strong/search-teacher.cjs | 42 +++++++++++++++++++----- 4 files changed, 107 insertions(+), 15 deletions(-) create mode 100644 ai/strong/launch-multiplayer-pipeline.sh diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 7f86e3a..f3cfd70 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -90,7 +90,8 @@ "specialists-heuristic-screen": "6abd39e2fbc85ba68235be7a", "specialists-rush-screen": "6abd39e2404719ba37613c5c", "specialists-legacy-screen": "6abd39e3fbc85ba68235be7c", - "specialists-frozen-a260-screen": "6abd39e4404719ba37613c5e" + "specialists-frozen-a260-screen": "6abd39e4404719ba37613c5e", + "multiplayer-pipeline-v1": "6abd41d2404719ba37613e0f" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -112,7 +113,10 @@ "archive": "strong-source-v6.tgz", "commit": "cc79acffc12ad4cc1daffbad20b024d2e1f4fe98" }, - "stopped_for_sustained_regression": ["6abd15cafbc85ba68235b347", "6abd15ca404719ba376134e5"], + "stopped_for_sustained_regression": [ + "6abd15cafbc85ba68235b347", + "6abd15ca404719ba376134e5" + ], "all_phase_distillation_source": { "archive": "strong-source-v7.tgz", "commit": "0862207a0f62cb75edfd0e6ecbc472cdc190bcd0" @@ -142,7 +146,10 @@ "commit": "49c872954eaf7761a3ac3453acbf737f569849b2" }, "new_candidate_revision": "b38515c29e57826de05b55b645c29591e4a886bf", - "cancelled_wrong_screening_seed": ["6abd2b51404719ba37613954", "6abd2b51404719ba37613956"], + "cancelled_wrong_screening_seed": [ + "6abd2b51404719ba37613954", + "6abd2b51404719ba37613956" + ], "a260_refinement_source": { "archive": "strong-source-v12.tgz", "commit": "7cc340b37ee051af51346800a15d285cebfb1a39", @@ -161,7 +168,10 @@ "strong-refine-v1-search": { "job": "6abd2783404719ba37613860", "best_evaluation_update": 10, - "later_evaluations": [20, 30], + "later_evaluations": [ + 20, + 30 + ], "reason": "Mean economic/heuristic/rush win share declined from 0.5764 at update 10 to 0.5660 at 20 and 0.5347 at 30; every update-30 opponent result was below update 20. Best checkpoint retained; corrected A260 refinement is substantially stronger." } }, @@ -181,5 +191,23 @@ "replacement_id": "6abd3b59fbc85ba68235beee", "reason": "Terminal ERROR during pip dependency download: files.pythonhosted.org read timeout; no games started. Identical checkpoint, source, scope and seed retried." } - ] + ], + "multiplayer_pipeline": { + "source_archive": "strong-source-v16.tgz", + "source_revision": "6064b1683379153e0a5dbca24903d41a972cbe0a", + "git_revision": "6967682", + "architecture": "multiplayer", + "feature_revision": "4.0-multiplayer", + "players": [ + 2, + 3, + 4, + 5, + 6 + ], + "updates": 10, + "envs": 120, + "opponent_mode": "mixed_search", + "status": "submitted; no strength claim" + } } diff --git a/ai/strong/generate-search-data.py b/ai/strong/generate-search-data.py index 9362df3..6ae8bf3 100644 --- a/ai/strong/generate-search-data.py +++ b/ai/strong/generate-search-data.py @@ -12,7 +12,14 @@ shard = int(os.environ["SHARD"]) games = int(os.getenv("GAMES", "128")) version = os.getenv("DATA_VERSION", "search-teacher-v1") output = Path(f"{version}-{shard}.jsonl.gz") -counts = {"games": 0, "positions": 0, "teacher_disagreements": 0, "truncated": 0} +counts = { + "games": 0, + "positions": 0, + "teacher_disagreements": 0, + "truncated": 0, + "search_rollouts": 0, + "search_rollouts_truncated": 0, +} def generate(game): @@ -34,6 +41,8 @@ with concurrent.futures.ThreadPoolExecutor( game = future.result() counts["games"] += 1 counts["truncated"] += game["truncated"] + counts["search_rollouts"] += game["searchStats"]["evaluations"] + counts["search_rollouts_truncated"] += game["searchStats"]["truncated"] # Keep truncated metadata, but never turn incomplete outcomes into targets. if game["truncated"]: game["rows"] = [] @@ -54,6 +63,14 @@ api.upload_file( api.upload_file( repo_id=repo, repo_type="dataset", - path_or_fileobj=json.dumps({"shard": shard, "schema": 3, **counts}).encode(), + path_or_fileobj=json.dumps( + { + "shard": shard, + "schema": 4 if os.getenv("FEATURE_REVISION") == "4.0-multiplayer" else 3, + "feature_revision": os.getenv("FEATURE_REVISION", "3.1-uranium39"), + "player_count": int(os.getenv("PLAYER_COUNT", "3")), + **counts, + } + ).encode(), path_in_repo=f"{version}/shard-{shard}-metrics.json", ) diff --git a/ai/strong/launch-multiplayer-pipeline.sh b/ai/strong/launch-multiplayer-pipeline.sh new file mode 100644 index 0000000..d945998 --- /dev/null +++ b/ai/strong/launch-multiplayer-pipeline.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor a10g-large --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME=multiplayer-pipeline-v1 --env TRAIN_SEED=621 --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.03 --env UPDATES=10 --env EVAL_EVERY=5 --env ARCHITECTURE=multiplayer --env OPPONENT_MODE=mixed_search \ + --env ENVS=120 --env WORKERS=10 --env BATCH_SIZE=512 \ + --label project=powergrid-ai --label stage=multiplayer-pipeline-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnx==1.20.1 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v16.tgz\",repo_type=\"dataset\",revision=\"6064b1683379153e0a5dbca24903d41a972cbe0a\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs ai/strong/test-v4.cjs +python ai/strong/test_model_v4.py +python ai/strong/test_multiplayer_bridge.py +python -u ai/strong/train.py +' diff --git a/ai/strong/search-teacher.cjs b/ai/strong/search-teacher.cjs index c559708..f5db85d 100644 --- a/ai/strong/search-teacher.cjs +++ b/ai/strong/search-teacher.cjs @@ -2,23 +2,43 @@ const c = require('../core.cjs'), eco = require('./economics.cjs'), search = require('./search.cjs'), - features = require('./features.cjs'); + features = require(process.env.FEATURE_REVISION === '4.0-multiplayer' ? './features-v4.cjs' : './features.cjs'); +const playerCount = Number(process.env.PLAYER_COUNT || 3); +if (!Number.isInteger(playerCount) || playerCount < 2 || playerCount > 6) throw Error('Invalid teacher player count'); +if (playerCount !== 3 && features.SCHEMA !== 4) throw Error('Multiplayer games require schema 4'); const id = Number(process.argv[2] || 0), - seed = (process.env.DATA_VERSION || 'search-teacher-v1') + '-' + id, - g = c.start(seed, id % 2 ? 'recharged' : 'original', id % 4 < 2), - seat = Math.floor(id / 4) % 3, + seed = + (process.env.DATA_VERSION || 'search-teacher-v1') + + (features.SCHEMA === 4 ? '-' + playerCount + 'p' : '') + + '-' + + id, + g = c.E.setup( + playerCount, + { map: 'Germany', variant: id % 2 ? 'recharged' : 'original', fastBid: id % 4 < 2, showMoney: true }, + seed + ), + seat = Math.floor(id / 4) % playerCount, rng = c.seedrandom(seed + '-choices'), samples = Number(process.env.SEARCH_SAMPLES || 4), rows = []; let steps = 0; +const searchStats = { decisions: 0, evaluations: 0, truncated: 0 }; while (!c.E.ended(g) && steps < 1600) { const p = g.currentPlayers[0], legal = c.candidates(g, p), strategic = legal.length > 1 && legal.some((a) => ['ChoosePowerPlant', 'Bid', 'Build'].includes(a.name)); let action; if (p === seat && strategic) { - const result = search.choose(g, p, { samples, candidates: 5, seed: seed + '-decision-' + steps }); + const result = search.choose(g, p, { + samples, + candidates: process.env.GEOGRAPHY === '1' ? 6 : 5, + geography: process.env.GEOGRAPHY === '1', + seed: seed + '-decision-' + steps, + }); action = result.action; + searchStats.decisions++; + searchStats.evaluations += result.evaluations || 0; + searchStats.truncated += result.truncated || 0; if (result.evaluations && !result.truncated) { const x = features.encode(g, p); rows.push({ @@ -33,7 +53,7 @@ while (!c.E.ended(g) && steps < 1600) { }); } } else { - const opponent = ['economic', 'heuristic', 'rush'][Math.floor(id / 12) % 3]; + const opponent = ['economic', 'heuristic', 'rush'][Math.floor(id / (4 * playerCount)) % 3]; action = p !== seat && opponent === 'heuristic' ? c.heuristic(g, p, rng).action @@ -58,13 +78,19 @@ while (!c.E.ended(g) && steps < 1600) { steps++; } const truncated = !c.E.ended(g), - value = truncated ? [0, 0, 0] : c.outcome(g), - relativeValue = Array.from({ length: 3 }, (_, i) => value[(seat + i) % 3]); + value = truncated ? Array(playerCount).fill(0) : c.outcome(g), + relativeValue = Array.from({ length: features.SCHEMA === 4 ? 6 : 3 }, (_, i) => + i < playerCount ? value[(seat + i) % playerCount] : 0 + ); console.log( JSON.stringify({ id, seed, featureRevision: features.FEATURE_REVISION, + playerCount, + variant: g.options.variant, + sealed: !!g.options.fastBid, + searchStats, steps, truncated, value, From f318df73efff8694ccfaa2d443616ee92ab94f04 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:10:28 +0200 Subject: [PATCH 022/184] Record multiplayer teacher jobs and completed specialist baselines --- ai/strong/experiments.json | 159 +++++++++++++++++++++++- ai/strong/launch-multiplayer-teacher.sh | 22 ++++ ai/strong/multiplayer-progress.json | 18 +-- 3 files changed, 191 insertions(+), 8 deletions(-) create mode 100644 ai/strong/launch-multiplayer-teacher.sh diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index f3cfd70..0727223 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -91,7 +91,12 @@ "specialists-rush-screen": "6abd39e2404719ba37613c5c", "specialists-legacy-screen": "6abd39e3fbc85ba68235be7c", "specialists-frozen-a260-screen": "6abd39e4404719ba37613c5e", - "multiplayer-pipeline-v1": "6abd41d2404719ba37613e0f" + "multiplayer-pipeline-v1": "6abd41d2404719ba37613e0f", + "multiplayer-teacher-v1-0": "6abd4258404719ba37613e1d", + "multiplayer-teacher-v1-1": "6abd4259404719ba37613e1f", + "multiplayer-teacher-v1-2": "6abd4259fbc85ba68235c124", + "multiplayer-teacher-v1-3": "6abd425a404719ba37613e21", + "multiplayer-teacher-v1-4": "6abd425b404719ba37613e23" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -209,5 +214,157 @@ "envs": 120, "opponent_mode": "mixed_search", "status": "submitted; no strength claim" + }, + "multiplayer_teacher": { + "source_archive": "strong-source-v17.tgz", + "source_revision": "36c3d6b2f8545bd3551fc571a8cb6cb45a8f88b1", + "feature_revision": "4.0-multiplayer", + "games_per_count": 240, + "players": [ + 2, + 3, + 4, + 5, + 6 + ], + "samples": 16, + "geography": true, + "all_phases": true, + "status": "submitted", + "validation_split_requirement": "Use deterministic seed hash or stratification; id modulo 5 confounds seat/rules at five players." + }, + "specialists_remaining_results": { + "specialists-legacy-screen": { + "games": 480, + "win_rate": 0.9458333333333333, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.9083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.85, + 0.9583333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.95, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.9, + 0.9916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.95, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.9, + 0.9916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.975, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.9416666666666667, + 1.0 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.925, + 0.9666666666666667 + ], + "search_stats": { + "learner": { + "decisions": 5488, + "evaluations": 1343472, + "truncated": 0 + } + } + }, + "specialists-frozen-a260-screen": { + "games": 480, + "win_rate": 0.4666666666666667, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.425, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3416666666666667, + 0.5166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.36666666666666664, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2833333333333333, + 0.45 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.4666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.38333333333333336, + 0.5583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5083333333333333, + 0.7 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.42291666666666666, + 0.5083333333333333 + ], + "search_stats": { + "learner": { + "decisions": 4564, + "evaluations": 1136640, + "truncated": 0 + } + } + } } } diff --git a/ai/strong/launch-multiplayer-teacher.sh b/ai/strong/launch-multiplayer-teacher.sh new file mode 100644 index 0000000..730ccd3 --- /dev/null +++ b/ai/strong/launch-multiplayer-teacher.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail +players=${1:?Specify player count 2–6} +[[ "$players" =~ ^[2-6]$ ]] +shard=$((players - 2)) +[[ "$shard" =~ ^[0-9]+$ ]] +hf jobs run --detach --flavor cpu-performance --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env SHARD="$shard" --env GAMES=240 --env DATA_WORKERS=24 --env SEARCH_SAMPLES=16 --env GEOGRAPHY=1 --env FEATURE_REVISION=4.0-multiplayer --env PLAYER_COUNT="$players" --env DATA_VERSION=multiplayer-teacher-v1 --env INCLUDE_ALL_PHASES=1 \ + --label project=powergrid-ai --label stage="multiplayer-teacher-v1-$shard" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v17.tgz\",repo_type=\"dataset\",revision=\"36c3d6b2f8545bd3551fc571a8cb6cb45a8f88b1\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/generate-search-data.py +' diff --git a/ai/strong/multiplayer-progress.json b/ai/strong/multiplayer-progress.json index f3c76e0..89eedf9 100644 --- a/ai/strong/multiplayer-progress.json +++ b/ai/strong/multiplayer-progress.json @@ -1,5 +1,5 @@ { - "status": "implementation; not trained or strength-qualified", + "status": "HF pipeline training and teacher jobs launched; not strength-qualified", "feature_revision": "4.0-multiplayer", "scope": { "map": "Germany", @@ -31,14 +31,18 @@ "complete_games": 20, "encoded_decisions": 9363, "hidden_information_invariance": true, - "cpu_model_forward_all_counts": true + "cpu_model_forward_all_counts": true, + "training_protocol_complete_games": 80, + "initial_hf_evaluation_games": 640, + "initial_hf_evaluation_truncated": 0 }, "pending": [ - "Generalize bridge seat rotation, roles, terminal vectors and episode cap without changing schema 3 behavior", - "Generalize PPO value targets and league checkpoint routing", - "Balanced HF teacher generation and HF training across counts and rules", - "Count-specific paired held-out evaluation and strength gates; old three-player final protocol is insufficient", - "ONNX export and AMD 8840U benchmark across all supported counts" + "Complete short HF pipeline run; verify checkpoint export and per-count learning stability", + "Collect and validate 1200 HF search-teacher games; use a seed-hash validation split", + "Generalize independent arena, distillation and serving tools to schema 4", + "Train search-distilled initialization and refine against strong opponents/self-play on HF", + "Count-specific held-out strength gates; old three-player final protocol is insufficient", + "ONNX parity and AMD 8840U benchmark across all supported counts" ], "preserved_baseline": "Schema 3 encoders and three-player checkpoint architecture unchanged; final seeds remain unused" } From 4110d727ebe0a44a892ec7a7385fdecc9e6366d4 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:18:29 +0200 Subject: [PATCH 023/184] Extend multiplayer evaluation, distillation and CPU serving with independent gates --- ai/strong/arena-job.py | 4 + ai/strong/arena_statistics.py | 33 ++++ ai/strong/benchmark-serving.py | 13 +- ai/strong/combine-arenas.py | 8 +- ai/strong/distill.py | 175 ++++++++++++++++----- ai/strong/evaluate.py | 30 +++- ai/strong/export.py | 12 +- ai/strong/final-protocol-multiplayer.json | 183 ++++++++++++++++++++++ ai/strong/infer.py | 6 +- ai/strong/package-serving.py | 12 +- ai/strong/serving-fixtures.cjs | 40 +++-- ai/strong/teacher_contract.py | 79 ++++++++++ ai/strong/test_arena_statistics.py | 47 ++++++ ai/strong/test_teacher_contract.py | 80 ++++++++++ ai/strong/train.py | 4 +- ai/strong/worker.cjs | 8 +- 16 files changed, 656 insertions(+), 78 deletions(-) create mode 100644 ai/strong/final-protocol-multiplayer.json create mode 100644 ai/strong/teacher_contract.py create mode 100644 ai/strong/test_arena_statistics.py create mode 100644 ai/strong/test_teacher_contract.py diff --git a/ai/strong/arena-job.py b/ai/strong/arena-job.py index 8b06589..3c4674f 100644 --- a/ai/strong/arena-job.py +++ b/ai/strong/arena-job.py @@ -14,6 +14,10 @@ command = [ sys.executable, "ai/strong/evaluate.py", model, + "--players", + os.getenv("PLAYER_COUNT", "3"), + "--deal-offset", + os.getenv("DEAL_OFFSET", "0"), "--opponent", os.environ.get("OPPONENT", "search_geo"), "--games", diff --git a/ai/strong/arena_statistics.py b/ai/strong/arena_statistics.py index b2ddc3b..cffc8c9 100644 --- a/ai/strong/arena_statistics.py +++ b/ai/strong/arena_statistics.py @@ -39,3 +39,36 @@ def search_summary(rows): for key in target: target[key] += stats[key] return {"search_rollouts_reported": True, "search_stats": totals} + + +def validate_pairs(rows, players): + """Reject missing seats/rules and malformed outcomes, including in old reports.""" + if players not in range(2, 7) or not rows: + raise ValueError("Expected nonempty 2–6 player arena") + expected = { + (seat, variant, sealed) + for seat in range(players) + for variant in ["original", "recharged"] + for sealed in [False, True] + } + deals = {} + for row in rows: + if row.get("playerCount", players) != players: + raise ValueError("Mixed player counts") + key = (row["seat"], row["variant"], row["sealed"]) + seen = deals.setdefault(row["gameSeed"], set()) + if key in seen or key not in expected: + raise ValueError("Duplicate or invalid paired match") + seen.add(key) + if len(row["value"]) != players or len(row["roles"]) != players: + raise ValueError("Wrong terminal vector or role count") + if row["roles"].count("learner") != 1 or row["roles"][row["seat"]] != "learner": + raise ValueError("Wrong candidate seat") + if any(not np.isfinite(v) or v < 0 or v > 1 for v in row["value"]): + raise ValueError("Invalid terminal credits") + if not row["truncated"] and not np.isclose(sum(row["value"]), 1): + raise ValueError("Terminal credits must sum to one") + if row["win"] != row["value"][row["seat"]]: + raise ValueError("Candidate win differs from terminal credit") + if any(seen != expected for seen in deals.values()): + raise ValueError("Incomplete paired deal") diff --git a/ai/strong/benchmark-serving.py b/ai/strong/benchmark-serving.py index d12dfb7..f071f03 100644 --- a/ai/strong/benchmark-serving.py +++ b/ai/strong/benchmark-serving.py @@ -40,6 +40,7 @@ search_latencies = [] search_evaluations = 0 search_truncations = 0 by_phase = {} +by_count = {} sha = None try: with open(args.fixtures) as source: @@ -57,7 +58,13 @@ try: assert result["move"] in fixture["legal"], result assert result["requestId"] == request["requestId"] assert result["revision"] == request["revision"] - assert result["schema"] == 3 + assert result["schema"] in [3, 4] + n = len(request["state"]["players"]) + assert len(result["winProbabilities"]) == n + assert result["playerOrder"] == [ + (request["player"] + j) % n for j in range(n) + ] + by_count.setdefault(str(n), []).append(latencies[-1]) assert result["playerOrder"][0] == request["player"] assert abs(sum(result["winProbabilities"]) - 1) < 1e-5 assert sha is None or sha == result["modelSha256"] @@ -90,6 +97,10 @@ report = { "processor_model": processor_model, "python_version": platform.python_version(), "positions": len(latencies), + "by_player_count": { + n: {"positions": len(xs), "p95_ms": float(np.percentile(xs, 95))} + for n, xs in by_count.items() + }, "model_sha256": sha, "all_moves_legal": True, "search_samples": args.search_samples, diff --git a/ai/strong/combine-arenas.py b/ai/strong/combine-arenas.py index 9138743..5a7fe31 100644 --- a/ai/strong/combine-arenas.py +++ b/ai/strong/combine-arenas.py @@ -3,7 +3,7 @@ import argparse import json from pathlib import Path -from arena_statistics import win_summary, search_summary +from arena_statistics import win_summary, search_summary, validate_pairs p = argparse.ArgumentParser() p.add_argument("reports", nargs="+") @@ -23,7 +23,8 @@ keys = [ ] for report in reports: report.setdefault("candidate_search_scope", "all") -keys.append("candidate_search_scope") + report.setdefault("player_count", 3) +keys.extend(["candidate_search_scope", "player_count"]) config = {k: reports[0][k] for k in keys} rows = [] seen = set() @@ -35,8 +36,7 @@ for report in reports: assert key not in seen, f"Duplicate match: {key}" seen.add(key) rows.append(row) -for deal in {r["gameSeed"] for r in rows}: - assert sum(r["gameSeed"] == deal for r in rows) == 12, "Incomplete paired deal" +validate_pairs(rows, config["player_count"]) result = { **config, "sources": a.reports, diff --git a/ai/strong/distill.py b/ai/strong/distill.py index 67798ba..d19f94a 100644 --- a/ai/strong/distill.py +++ b/ai/strong/distill.py @@ -1,5 +1,6 @@ """HF GPU job: distill public-belief search, then measure actual playing strength.""" +from collections import Counter import copy import gzip import json @@ -14,9 +15,19 @@ import torch from huggingface_hub import HfApi, hf_hub_download from model import Policy, tensors +from model_v4 import MultiplayerPolicy +from teacher_contract import validate_game, validation_seeds from distillation_targets import policy_targets from feature_contract import FEATURE_REVISION, embed_revision +multiplayer = os.getenv("ARCHITECTURE") == "multiplayer" +if multiplayer: + FEATURE_REVISION = "4.0-multiplayer" + if not os.getenv("DATA_REVISION"): + raise ValueError("Pin DATA_REVISION for the multiplayer teacher dataset") +state_dim, action_dim = (1149, 98) if multiplayer else (738, 96) +player_counts = [2, 3, 4, 5, 6] if multiplayer else [3] + assert torch.cuda.is_available(), "Training must run on a GPU HF Job" torch.set_num_threads(2) seed = int(os.getenv("TRAIN_SEED", "310")) @@ -27,9 +38,11 @@ run = os.getenv("RUN_NAME", "search-distillation-v1") out = Path("ai/runs") / run out.mkdir(parents=True, exist_ok=True) device = "cuda" -net = Policy().to(device) +net = (MultiplayerPolicy() if multiplayer else Policy()).to(device) train, validation = [], [] dataset_revisions = [] +seen_games = set() +complete_games = [] version = os.getenv("DATA_VERSION", "search-teacher-v1") target_mode = os.getenv("TARGET_MODE", "hard") assert target_mode in ["hard", "soft"] @@ -38,6 +51,7 @@ for shard in range(int(os.getenv("SHARDS", "4"))): os.environ["HF_DATA_REPO"], f"{version}/{version}-{shard}.jsonl.gz", repo_type="dataset", + revision=os.getenv("DATA_REVISION"), ) dataset_revisions.append({"shard": shard, "revision": Path(path).parents[1].name}) with gzip.open(path, "rt") as source: @@ -47,15 +61,45 @@ for shard in range(int(os.getenv("SHARDS", "4"))): raise ValueError( "Dataset uses a different feature revision; use its archived encoder or regenerate" ) + if multiplayer: + validate_game(game) + if game["seed"] in seen_games: + raise ValueError("Duplicate teacher game") + seen_games.add(game["seed"]) if game["truncated"]: continue - # Keep whole games together, never split positions from one game. - target = validation if game["id"] % 5 == 0 else train for row in game["rows"]: + row["player_count"] = game.get("playerCount", 3) + row["variant"] = game.get("variant") + row["sealed"] = game.get("sealed") row["state"] = np.asarray(row["state"], np.float32) row["actions"] = np.asarray(row["actions"], np.float32) - target.append(row) + complete_games.append(game) +held_out = ( + validation_seeds(complete_games) + if multiplayer + else {g["seed"] for g in complete_games if g["id"] % 5 == 0} +) +for game in complete_games: + (validation if game["seed"] in held_out else train).extend(game["rows"]) assert train and validation +count_sizes = Counter(r["player_count"] for r in train) +validation_sizes = Counter(r["player_count"] for r in validation) +if multiplayer and ( + set(count_sizes) != set(player_counts) + or set(validation_sizes) != set(player_counts) +): + raise ValueError("Every player count must appear in training and validation") +print( + json.dumps( + { + "stage": "dataset_loaded", + "train_counts": dict(count_sizes), + "validation_counts": dict(validation_sizes), + } + ), + flush=True, +) optimizer = torch.optim.AdamW( net.parameters(), lr=float(os.getenv("LR", ".0003")), weight_decay=1e-4 ) @@ -67,10 +111,11 @@ batchsize = int(os.getenv("BATCH_SIZE", "256")) def export(name): torch.save( { - "schema": 3, + "schema": 4 if multiplayer else 3, + "architecture": "multiplayer" if multiplayer else "policy", "feature_revision": FEATURE_REVISION, - "state_dim": 738, - "action_dim": 96, + "state_dim": state_dim, + "action_dim": action_dim, "state_dict": {k: v.detach().cpu() for k, v in net.state_dict().items()}, }, out / f"{name}.pt", @@ -79,8 +124,8 @@ def export(name): torch.onnx.export( clone, ( - torch.zeros(1, 738), - torch.zeros(1, 8, 96), + torch.zeros(1, state_dim), + torch.zeros(1, 8, action_dim), torch.ones(1, 8, dtype=torch.bool), ), str(out / f"{name}.onnx"), @@ -96,16 +141,26 @@ def export(name): opset_version=17, dynamo=False, ) - embed_revision(out / f"{name}.onnx") + embed_revision(out / f"{name}.onnx", FEATURE_REVISION) def validate(): correct, disagreement_correct, disagreements, count = 0, 0, 0, 0 + by_count = { + n: {"positions": 0, "correct": 0, "disagreements": 0, "disagreement_correct": 0} + for n in player_counts + } with torch.no_grad(): for k in range(0, len(validation), batchsize): rows = validation[k : k + batchsize] predicted = net(*tensors(rows, device))[0].argmax(-1).cpu().tolist() for row, chosen in zip(rows, predicted): + group = by_count[row["player_count"]] + group["positions"] += 1 + group["correct"] += chosen == row["target"] + if not row["teacherAgrees"]: + group["disagreements"] += 1 + group["disagreement_correct"] += chosen == row["target"] correct += chosen == row["target"] count += 1 if not row["teacherAgrees"]: @@ -113,6 +168,7 @@ def validate(): disagreement_correct += chosen == row["target"] return { "positions": count, + "by_player_count": by_count, "accuracy": correct / count, "search_disagreements": disagreements, "disagreement_accuracy": disagreement_correct / max(1, disagreements), @@ -132,18 +188,38 @@ for epoch in range(int(os.getenv("EPOCHS", "30")) + 1): ).to(device) weights = torch.tensor( [ - 1.0 - if r["teacherAgrees"] - else float(os.getenv("DISAGREEMENT_WEIGHT", "3")) + ( + 1.0 + if r["teacherAgrees"] + else float(os.getenv("DISAGREEMENT_WEIGHT", "3")) + ) + * ( + len(train) + / (len(player_counts) * count_sizes[r["player_count"]]) + if multiplayer + else 1.0 + ) for r in rows ], device=device, ) ce = -(targets * logits.log_softmax(-1)).sum(-1) returns = torch.tensor([r["value"] for r in rows], device=device) + value_error = ((value - returns) ** 2).sum(-1) / torch.tensor( + [r["player_count"] for r in rows], device=device + ) + balance = torch.tensor( + [ + len(train) / (len(player_counts) * count_sizes[r["player_count"]]) + if multiplayer + else 1.0 + for r in rows + ], + device=device, + ) loss = (ce * weights).sum() / weights.sum() + 0.2 * ( - (value - returns) ** 2 - ).mean() + value_error * balance + ).sum() / balance.sum() optimizer.zero_grad() loss.backward() torch.nn.utils.clip_grad_norm_(net.parameters(), 1) @@ -158,30 +234,44 @@ for epoch in range(int(os.getenv("EPOCHS", "30")) + 1): if epoch % 5 == 0: export("latest") results = {} - for opponent in ["economic", "heuristic", "rush"]: - result = subprocess.run( - [ - sys.executable, - "ai/strong/evaluate.py", - str(out / "latest.onnx"), - "--opponent", - opponent, - "--games", - "96", - "--workers", - "4", - "--seed", - "search-distill-development-v1", - "--output", - str(out / f"{opponent}.json"), - ], - text=True, - capture_output=True, - check=True, - ) - results[opponent] = json.loads(result.stdout) + for player_count in player_counts: + for opponent in ["economic", "heuristic", "rush"]: + result = subprocess.run( + [ + sys.executable, + "ai/strong/evaluate.py", + str(out / "latest.onnx"), + "--opponent", + opponent, + "--players", + str(player_count), + "--games", + str(8 * player_count if multiplayer else 96), + "--workers", + "4", + "--seed", + f"multiplayer-distill-development-{player_count}-v1" + if multiplayer + else "search-distill-development-v1", + "--output", + str(out / f"{player_count}p-{opponent}.json"), + ], + text=True, + capture_output=True, + check=True, + ) + results[f"{player_count}p/{opponent}" if multiplayer else opponent] = ( + json.loads(result.stdout.strip().splitlines()[-1]) + ) metric["arena"] = results - score = np.mean([r["win_rate"] for r in results.values()]) + score = np.mean( + [ + (r["win_rate"] - 1 / r["player_count"]) / (1 - 1 / r["player_count"]) + if multiplayer + else r["win_rate"] + for r in results.values() + ] + ) if score > best: best = score export("best") @@ -190,9 +280,14 @@ for epoch in range(int(os.getenv("EPOCHS", "30")) + 1): (out / "schema.json").write_text( json.dumps( { - "version": 3, + "version": 4 if multiplayer else 3, "feature_revision": FEATURE_REVISION, - "players": 3, + "players": player_counts if multiplayer else 3, + "training_positions_by_count": dict(count_sizes), + "validation_positions_by_count": dict(validation_sizes), + "split": "within each count/seat/rule cell, hold out 20% of whole games ranked by sha256(seed)" + if multiplayer + else "game id modulo 5", "map": "Germany", "run": run, "training_positions": len(train), diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index 8f4d2df..3d38c0d 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -7,19 +7,21 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1])) import numpy as np from infer import Model from pool import EnginePool -from arena_statistics import win_summary, search_summary +from arena_statistics import win_summary, search_summary, validate_pairs from search_scope import SCOPES, search_enabled from feature_contract import FEATURE_REVISION, check_revision, model_revision p = argparse.ArgumentParser() p.add_argument("model") +p.add_argument("--players", type=int, choices=range(2, 7), default=3) +p.add_argument("--deal-offset", type=int, default=0) p.add_argument("--search-scope", choices=SCOPES, default="all") p.add_argument( "--opponent", default="economic", choices=["economic", "heuristic", "rush", "legacy", "search", "search_geo"], ) -p.add_argument("--opponent-model", help="Frozen ONNX policy in both opponent seats") +p.add_argument("--opponent-model", help="Frozen ONNX policy in every opponent seat") p.add_argument("--workers", type=int, default=4) p.add_argument("--geographic-search", action="store_true") p.add_argument( @@ -42,10 +44,22 @@ if not 0 <= args.search_samples <= 64: if args.geographic_search and not args.search_samples: p.error("--geographic-search requires positive --search-samples") model = Model(args.model) -if args.games < 12 or args.games % 12: - p.error("--games must be a positive multiple of 12 for paired rules and seats") +paired_size = 4 * args.players +if args.games < paired_size or args.games % paired_size: + p.error( + f"--games must be a positive multiple of {paired_size} for paired rules and seats" + ) +if args.deal_offset < 0: + p.error("--deal-offset cannot be negative") opponent_model = Model(args.opponent_model) if args.opponent_model else None -pool = EnginePool(args.workers, seed=args.seed, script="ai/strong/bridge.cjs") +for actor in [model, opponent_model]: + if actor and args.players != 3 and model_revision(actor) != "4.0-multiplayer": + p.error("Non-three-player evaluation requires schema 4 for every model") +if args.allow_feature_transfer and model_revision(model) == "4.0-multiplayer": + p.error("Schema 4 cannot be transferred to a schema 3 encoder") +pool = EnginePool( + min(args.workers, args.games), seed=args.seed, script="ai/strong/bridge.cjs" +) feature_revision = ( FEATURE_REVISION if args.allow_feature_transfer else model_revision(model) ) @@ -59,6 +73,8 @@ try: { "op": "reset", "n": args.games, + "playerCount": args.players, + "offset": args.deal_offset * paired_size, "mode": "snapshot0" if opponent_model else args.opponent, "arenaSeed": args.seed, "featureRevisions": feature_revisions, @@ -126,7 +142,11 @@ try: last_progress = time.perf_counter() finally: pool.close() +validate_pairs(rows, args.players) report = { + "player_count": args.players, + "chance_win_rate": 1 / args.players, + "deal_offset": args.deal_offset, "model": args.model, "model_sha256": model.sha256, "model_feature_revision": model_revision(model), diff --git a/ai/strong/export.py b/ai/strong/export.py index 3f02398..d9268b6 100644 --- a/ai/strong/export.py +++ b/ai/strong/export.py @@ -21,7 +21,11 @@ checkpoint["strategic_only"] = strategic_only net = policy_from_checkpoint(checkpoint).eval() torch.onnx.export( net, - (torch.zeros(1, 738), torch.zeros(1, 8, 96), torch.ones(1, 8, dtype=torch.bool)), + ( + torch.zeros(1, checkpoint.get("state_dim", 738)), + torch.zeros(1, 8, checkpoint.get("action_dim", 96)), + torch.ones(1, 8, dtype=torch.bool), + ), args.output, input_names=["state", "actions", "mask"], output_names=["logits", "value"], @@ -38,6 +42,10 @@ torch.onnx.export( embed_revision(args.output, checkpoint.get("feature_revision", "3.0")) Path(args.output + ".json").write_text( json.dumps( - {"source": args.checkpoint, "strategic_only": strategic_only, "schema": 3} + { + "source": args.checkpoint, + "strategic_only": strategic_only, + "schema": checkpoint.get("schema", 3), + } ) ) diff --git a/ai/strong/final-protocol-multiplayer.json b/ai/strong/final-protocol-multiplayer.json new file mode 100644 index 0000000..6f994c0 --- /dev/null +++ b/ai/strong/final-protocol-multiplayer.json @@ -0,0 +1,183 @@ +{ + "status": "prepared; no selected candidate; final seeds unused", + "seed_prefix": "strong-multiplayer-final-reserved-v1", + "scope": { + "map": "Germany", + "players": [ + 2, + 3, + 4, + 5, + 6 + ], + "variants": [ + "original", + "recharged" + ], + "auctions": [ + "open", + "sealed" + ], + "setup": "automatic" + }, + "reason_for_new_protocol": "Scope expanded from three players to 2\u20136 before any final seeds were used. Preserve the original three-player minimum rates; scale other counts by the same fraction of improvement above equal-seat chance. Default-bot minimum stays 90% at every count.", + "pairing": "Every independent deal is repeated in each candidate seat and all four rule combinations. Exactly 4*N matches per deal; disjoint integer deal offsets across shards.", + "intervals": "95% seed-cluster bootstrap; resample deals, retaining their seat/rule repeats. Report each count/rule separately. Intervals are per comparison, not a simultaneous family-wide confidence guarantee.", + "requirements": { + "all_games_complete": true, + "no_illegal_moves": true, + "full_paired_deals": true, + "each_count_overall_interval_lower_bound": "strictly above 1/N", + "each_count_each_rule_interval_lower_bound": "strictly above 1/N", + "search_rollout_counts": "required, with incomplete rollouts explicitly reported", + "export_parity": "All 2553 multiplayer fixtures agree in legal action with checkpoint, finite value outputs, inactive slots zero", + "serving": "All 2553 fixtures return legal moves with correct request/revision and player ordering; benchmark same selected model/search settings on actual AMD 8840U, with results for every count", + "package": "Standalone extracted archive hashes and legal CPU responses verified" + }, + "opponents": [ + { + "name": "legacy", + "independent_deals_per_count": 40, + "counts": { + "2": { + "games": 320, + "minimum_win_rate": 0.9 + }, + "3": { + "games": 480, + "minimum_win_rate": 0.9 + }, + "4": { + "games": 640, + "minimum_win_rate": 0.9 + }, + "5": { + "games": 800, + "minimum_win_rate": 0.9 + }, + "6": { + "games": 960, + "minimum_win_rate": 0.9 + } + } + }, + { + "name": "heuristic", + "independent_deals_per_count": 40, + "counts": { + "2": { + "games": 320, + "minimum_win_rate": 0.775 + }, + "3": { + "games": 480, + "minimum_win_rate": 0.7000000000000001 + }, + "4": { + "games": 640, + "minimum_win_rate": 0.6625000000000001 + }, + "5": { + "games": 800, + "minimum_win_rate": 0.6400000000000001 + }, + "6": { + "games": 960, + "minimum_win_rate": 0.625 + } + } + }, + { + "name": "economic", + "independent_deals_per_count": 40, + "counts": { + "2": { + "games": 320, + "minimum_win_rate": 0.6625 + }, + "3": { + "games": 480, + "minimum_win_rate": 0.55 + }, + "4": { + "games": 640, + "minimum_win_rate": 0.49375 + }, + "5": { + "games": 800, + "minimum_win_rate": 0.46 + }, + "6": { + "games": 960, + "minimum_win_rate": 0.4375 + } + } + }, + { + "name": "rush", + "independent_deals_per_count": 40, + "counts": { + "2": { + "games": 320, + "minimum_win_rate": 0.625 + }, + "3": { + "games": 480, + "minimum_win_rate": 0.5 + }, + "4": { + "games": 640, + "minimum_win_rate": 0.4375 + }, + "5": { + "games": 800, + "minimum_win_rate": 0.4 + }, + "6": { + "games": 960, + "minimum_win_rate": 0.375 + } + } + }, + { + "name": "search_geo", + "independent_deals_per_count": 80, + "counts": { + "2": { + "games": 640, + "minimum_win_rate": 0.55 + }, + "3": { + "games": 960, + "minimum_win_rate": 0.4 + }, + "4": { + "games": 1280, + "minimum_win_rate": 0.325 + }, + "5": { + "games": 1600, + "minimum_win_rate": 0.28 + }, + "6": { + "games": 1920, + "minimum_win_rate": 0.25 + } + } + }, + { + "name": "frozen_a260", + "counts": { + "3": { + "games": 960, + "minimum_win_rate": 0.4 + } + }, + "independent_deals_per_count": 80, + "model_path": "runs/strong-league-v2-a/best.onnx", + "model_revision": "b38515c29e57826de05b55b645c29591e4a886bf", + "model_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd" + } + ], + "failure_policy": "A failed gate remains a failure. Do not relax thresholds after seeing final results. New candidate requires a new reserved final seed prefix." +} diff --git a/ai/strong/infer.py b/ai/strong/infer.py index 95eba58..cb06c25 100644 --- a/ai/strong/infer.py +++ b/ai/strong/infer.py @@ -1,4 +1,4 @@ -"""Persistent CPU ONNX worker for schema 3 public-information states.""" +"""Persistent CPU ONNX worker for versioned public-information states.""" import sys, json, argparse, time from pathlib import Path @@ -59,10 +59,10 @@ try: "requestId": q.get("requestId"), "revision": q.get("revision"), "move": r["moves"][index], - "winProbabilities": values, + "winProbabilities": values[: len(r["playerOrder"])], "valueStatus": "uncalibrated-training-opponents", "playerOrder": r["playerOrder"], - "schema": 3, + "schema": r["schema"], "featureRevision": r["featureRevision"], "search": { k: v diff --git a/ai/strong/package-serving.py b/ai/strong/package-serving.py index a43cb32..9d54a0b 100644 --- a/ai/strong/package-serving.py +++ b/ai/strong/package-serving.py @@ -26,8 +26,9 @@ root = Path(__file__).resolve().parents[2] model = Path(a.model).resolve() session = ort.InferenceSession(str(model), providers=["CPUExecutionProvider"]) revision = session.get_modelmeta().custom_metadata_map.get(METADATA_KEY, "3.0") -if revision not in ["3.0", "3.1-uranium39"]: +if revision not in ["3.0", "3.1-uranium39", "4.0-multiplayer"]: raise ValueError("Unknown feature revision") +multiplayer = revision == "4.0-multiplayer" out = Path(a.output).resolve() out.mkdir(parents=True, exist_ok=False) sha = lambda p: hashlib.sha256(p.read_bytes()).hexdigest() @@ -43,6 +44,7 @@ with tempfile.TemporaryDirectory() as tmp: "search_scope.py", "features.cjs", "features-v3_0.cjs", + "features-v4.cjs", "economics.cjs", "economics-v3_0.cjs", "spatial.cjs", @@ -79,13 +81,15 @@ os.execv(sys.executable, command) (bundle / "START.txt").write_text( "Powergrid CPU research worker\n\nRequires Node.js 24 and Python 3.11 or 3.12.\nCreate a virtual environment and install: pip install -r ai/requirements-serve.txt\nRun the frozen configuration from any directory: python /path/to/package/serve.py\nEquivalent direct command: " + command - + "\n\nSend one JSON object per line with requestId, revision, player (seat index), and state (engine game state). Keep the process alive between requests. Each response proposes one atomic move. The platform must check the game revision and validate the move through the authoritative engine before committing it. Errors must not be committed as moves.\n\nScope: Germany, three players, automatic setup; original/Recharged and open/sealed auctions. Other players’ money is intentionally visible. Hidden deck order and sealed bids are excluded from policy inputs and search beliefs. Value outputs are uncalibrated training-opponent estimates, not objective player-analysis scores.\n\nThis archive makes no strength claim by itself. Consult the accompanying measured evaluations. No production routing is installed.\n" + + "\n\nSend one JSON object per line with requestId, revision, player (seat index), and state (engine game state). Keep the process alive between requests. Each response proposes one atomic move. The platform must check the game revision and validate the move through the authoritative engine before committing it. Errors must not be committed as moves.\n\nScope: Germany, " + + ("2–6 players" if multiplayer else "three players") + + ", automatic setup; original/Recharged and open/sealed auctions. Other players’ money is intentionally visible. Hidden deck order and sealed bids are excluded from policy inputs and search beliefs. Value outputs are uncalibrated training-opponent estimates, not objective player-analysis scores.\n\nThis archive makes no strength claim by itself. Consult the accompanying measured evaluations. No production routing is installed.\n" ) manifest = { "model_sha256": sha(model), "model_repository_revision": a.model_revision, "feature_revision": revision, - "schema": 3, + "schema": 4 if multiplayer else 3, "engine_revision": "365fc519903fa2b4e8c593eed6cc5f5f77b5332a", "runtime_git_revision": subprocess.check_output( ["git", "rev-parse", "HEAD"], cwd=root, text=True @@ -100,7 +104,7 @@ os.execv(sys.executable, command) "geographic_search": a.geographic_search, "scope": { "map": "Germany", - "players": 3, + "players": [2, 3, 4, 5, 6] if multiplayer else 3, "automatic_setup": True, "variants": ["original", "recharged"], "auctions": ["open", "sealed"], diff --git a/ai/strong/serving-fixtures.cjs b/ai/strong/serving-fixtures.cjs index 2bfc2a3..e434fcc 100644 --- a/ai/strong/serving-fixtures.cjs +++ b/ai/strong/serving-fixtures.cjs @@ -1,20 +1,26 @@ const c = require('../core.cjs'), eco = require('./economics.cjs'); -for (let game = 0; game < 4; game++) { - const g = c.start('strong-serving-' + game, game % 2 ? 'recharged' : 'original', game < 2), - rng = c.seedrandom('strong-serving-ties-' + game); - let step = 0; - while (!c.E.ended(g) && step < 1600) { - const player = g.currentPlayers[0]; - if (step % 4 === 0) - console.log( - JSON.stringify({ - request: { state: g, player, requestId: `${game}-${step}`, revision: step }, - legal: c.candidates(g, player), - }) - ); - c.E.move(g, eco.choose(g, player, rng).action, player); - step++; +const counts = process.env.MULTIPLAYER === '1' ? [2, 3, 4, 5, 6] : [3]; +for (const n of counts) + for (let game = 0; game < 4; game++) { + const g = c.E.setup( + n, + { map: 'Germany', variant: game % 2 ? 'recharged' : 'original', fastBid: game < 2, showMoney: true }, + 'strong-serving-' + game + ), + rng = c.seedrandom('strong-serving-ties-' + game); + let step = 0; + while (!c.E.ended(g) && step < 1600) { + const player = g.currentPlayers[0]; + if (step % 4 === 0) + console.log( + JSON.stringify({ + request: { state: g, player, requestId: `${n}p-${game}-${step}`, revision: step }, + legal: c.candidates(g, player), + }) + ); + c.E.move(g, eco.choose(g, player, rng).action, player); + step++; + } + if (!c.E.ended(g)) throw Error('Fixture game did not finish'); } - if (!c.E.ended(g)) throw Error('Fixture game did not finish'); -} diff --git a/ai/strong/teacher_contract.py b/ai/strong/teacher_contract.py new file mode 100644 index 0000000..4fb1856 --- /dev/null +++ b/ai/strong/teacher_contract.py @@ -0,0 +1,79 @@ +"""Validation and independent-game splitting for schema-4 search supervision.""" + +import hashlib +import numpy as np +from multiplayer import FEATURE_REVISION, PLAYER_COUNTS, rotate_outcome + + +def validation_game(seed): + return int.from_bytes(hashlib.sha256(seed.encode()).digest()[:8], "big") % 5 == 0 + + +def validate_game(game): + n = game["playerCount"] + if game["featureRevision"] != FEATURE_REVISION or n not in PLAYER_COUNTS: + raise ValueError("Wrong teacher feature revision or player count") + if game["variant"] not in ["original", "recharged"] or not isinstance( + game["sealed"], bool + ): + raise ValueError("Missing teacher rules") + if not isinstance(game["seed"], str) or not game["seed"]: + raise ValueError("Missing independent game seed") + if game["truncated"]: + if game["rows"]: + raise ValueError("Truncated episodes cannot carry training targets") + return + if len(game["value"]) != n: + raise ValueError("Wrong terminal vector length") + for row in game["rows"]: + state = np.asarray(row["state"]) + actions = np.asarray(row["actions"]) + if ( + state.shape != (1149,) + or actions.ndim != 2 + or actions.shape[1] != 98 + or not len(actions) + ): + raise ValueError("Wrong teacher feature dimensions") + if not np.isfinite(state).all() or not np.isfinite(actions).all(): + raise ValueError("Nonfinite teacher features") + if state[:6].tolist() != [1] * n + [0] * (6 - n): + raise ValueError("Wrong active-player mask") + if not 0 <= row["target"] < len(actions): + raise ValueError("Teacher target is not a candidate") + if row["value"] != rotate_outcome(game["value"], row["seat"]): + raise ValueError("Value target does not match the observing seat") + seen = set() + for index, value in row["searchValues"]: + if ( + index in seen + or not 0 <= index < len(actions) + or not np.isfinite(value) + or not 0 <= value <= 1 + ): + raise ValueError("Invalid search estimate") + seen.add(index) + + +def validation_seeds(games): + """Hold out whole games in every count/seat/rule cell, by stable seed rank.""" + groups = {} + seen = set() + for game in games: + if game["seed"] in seen: + raise ValueError("Duplicate independent game seed") + seen.add(game["seed"]) + seat = game["rows"][0]["seat"] if game["rows"] else None + if seat is None or any(row["seat"] != seat for row in game["rows"]): + raise ValueError("Expected one teacher seat per game") + key = (game["playerCount"], seat, game["variant"], game["sealed"]) + groups.setdefault(key, []).append(game["seed"]) + selected = set() + for seeds in groups.values(): + if len(seeds) < 2: + raise ValueError( + "Each teacher seat/rule cell needs train and validation games" + ) + seeds.sort(key=lambda seed: hashlib.sha256(seed.encode()).digest()) + selected.update(seeds[: max(1, round(len(seeds) * 0.2))]) + return selected diff --git a/ai/strong/test_arena_statistics.py b/ai/strong/test_arena_statistics.py new file mode 100644 index 0000000..e76e8a1 --- /dev/null +++ b/ai/strong/test_arena_statistics.py @@ -0,0 +1,47 @@ +import copy +import unittest +from arena_statistics import validate_pairs + + +def rows_for(n): + return [ + dict( + gameSeed="test", + seat=s, + variant=v, + sealed=b, + playerCount=n, + roles=["learner" if i == s else "economic" for i in range(n)], + value=[1.0 if i == 0 else 0.0 for i in range(n)], + win=float(s == 0), + truncated=False, + ) + for s in range(n) + for v in ["original", "recharged"] + for b in [False, True] + ] + + +class PairingTests(unittest.TestCase): + def test_every_count_and_rejection_of_malformed_evidence(self): + for n in range(2, 7): + rows = rows_for(n) + validate_pairs(rows, n) + cases = [rows[:-1], rows + [rows[0]]] + for field, value in [ + ("playerCount", 7), + ("seat", n), + ("value", [1]), + ("win", 0.5), + ("roles", ["learner"] * n), + ]: + broken = copy.deepcopy(rows) + broken[0][field] = value + cases.append(broken) + for broken in cases: + with self.assertRaises(ValueError): + validate_pairs(broken, n) + + +if __name__ == "__main__": + unittest.main() diff --git a/ai/strong/test_teacher_contract.py b/ai/strong/test_teacher_contract.py new file mode 100644 index 0000000..34f2df9 --- /dev/null +++ b/ai/strong/test_teacher_contract.py @@ -0,0 +1,80 @@ +import copy +import unittest +from teacher_contract import validate_game, validation_game, validation_seeds +from multiplayer import rotate_outcome + + +class TeacherContractTests(unittest.TestCase): + def test_player_rotation_and_invalid_targets(self): + for n in range(2, 7): + for seat in range(n): + value = [0.0] * n + value[n - 1] = 1.0 + game = dict( + playerCount=n, + featureRevision="4.0-multiplayer", + variant="original", + sealed=True, + seed=f"{n}-{seat}", + truncated=False, + value=value, + rows=[ + dict( + state=[1] * n + [0] * (1149 - n), + actions=[[0.0] * 98], + target=0, + seat=seat, + value=rotate_outcome(value, seat), + searchValues=[[0, 0.5]], + ) + ], + ) + validate_game(game) + broken = copy.deepcopy(game) + broken["rows"][0]["value"] = [0.0] * 6 + with self.assertRaises(ValueError): + validate_game(broken) + broken = copy.deepcopy(game) + broken["rows"][0]["target"] = 1 + with self.assertRaises(ValueError): + validate_game(broken) + broken = copy.deepcopy(game) + broken["truncated"] = True + with self.assertRaises(ValueError): + validate_game(broken) + + def test_split_does_not_exclude_a_five_player_seat_or_rule(self): + cells = { + (i // 4 % 5, i % 4) + for i in range(960) + if validation_game(f"multiplayer-teacher-v1-5p-{i}") + } + self.assertEqual(len(cells), 20) + + def test_stratified_split_covers_every_real_shard_cell(self): + games = [ + dict( + seed=f"multiplayer-teacher-v1-{n}p-{i}", + playerCount=n, + variant="recharged" if i % 2 else "original", + sealed=i % 4 < 2, + rows=[dict(seat=i // 4 % n)], + ) + for n in range(2, 7) + for i in range((n - 2) * 240, (n - 1) * 240) + ] + selected = validation_seeds(games) + key = lambda g: ( + g["playerCount"], + g["rows"][0]["seat"], + g["variant"], + g["sealed"], + ) + expected = {key(g) for g in games} + self.assertEqual({key(g) for g in games if g["seed"] in selected}, expected) + self.assertEqual({key(g) for g in games if g["seed"] not in selected}, expected) + self.assertEqual(selected, validation_seeds(list(reversed(games)))) + + +if __name__ == "__main__": + unittest.main() diff --git a/ai/strong/train.py b/ai/strong/train.py index f7c1d1f..ec79a26 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -435,7 +435,9 @@ try: metric["training_opponents"] = opponent_outcomes metrics.append(metric) print(json.dumps(metric), flush=True) - if update % int(os.getenv("EVAL_EVERY", "10")) == 0 or update == updates - 1: + if (update + int(multiplayer)) % int( + os.getenv("EVAL_EVERY", "10") + ) == 0 or update == updates - 1: net.eval() evaluation = evaluate(update) metrics.append({"stage": "evaluation", "update": update, **evaluation}) diff --git a/ai/strong/worker.cjs b/ai/strong/worker.cjs index 50ca0e3..731a521 100644 --- a/ai/strong/worker.cjs +++ b/ai/strong/worker.cjs @@ -27,7 +27,13 @@ const encoders = require('./encoders.cjs'), console.log(JSON.stringify(result)); continue; } - console.log(JSON.stringify({ ...x, playerOrder: [p, (p + 1) % 3, (p + 2) % 3] })); + console.log( + JSON.stringify({ + ...x, + playerOrder: Array.from({ length: g.players.length }, (_, i) => (p + i) % g.players.length), + schema: encoders.forRevision(q.featureRevision).SCHEMA, + }) + ); } catch (e) { console.log(JSON.stringify({ error: e.message })); } From e43194c2813410cc91fd85df55e9614a49059b70 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:21:06 +0200 Subject: [PATCH 024/184] Prepare multiplayer distillation and record 8840U prototype verification --- ai/strong/experiments.json | 106 ++++++++++++++++++++++++ ai/strong/launch-multiplayer-distill.sh | 24 ++++++ ai/strong/multiplayer-progress.json | 19 +++-- ai/strong/verify-package.py | 64 ++++++++++++++ 4 files changed, 206 insertions(+), 7 deletions(-) create mode 100644 ai/strong/launch-multiplayer-distill.sh create mode 100644 ai/strong/verify-package.py diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 0727223..311e8cf 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -366,5 +366,111 @@ } } } + }, + "multiplayer_tooling": { + "source_archive": "strong-source-v18.tgz", + "source_revision": "49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d", + "git_revision": "4110d72", + "distillation_ready": true, + "distillation_launched": false, + "split": "within each player-count/seat/rule cell, rank whole games by SHA256(seed) and hold out approximately 20%", + "final_protocol": "final-protocol-multiplayer.json", + "final_seeds_used": false + }, + "multiplayer_cpu_prototype": { + "model_revision": "f947dec07f898243ca273c6897d5536fe84d9343", + "model_sha256": "2c0c9ea2d72179cf8be6327b5b9dc7ee963124512251d2fd726e8a8c1f70bae7", + "status": "untrained initial-policy prototype; CPU feasibility only", + "parity": { + "positions": 2553, + "feature_revision": "4.0-multiplayer", + "model_sha256": "2c0c9ea2d72179cf8be6327b5b9dc7ee963124512251d2fd726e8a8c1f70bae7", + "max_logit_error": 0.0, + "max_value_error": 5.960464477539063e-08, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "serving": { + "hostname": "coyotte508-4X4-BOX-8840U", + "processor_model": "AMD Ryzen 7 8840U w/ Radeon 780M Graphics", + "python_version": "3.12.3", + "positions": 2553, + "by_player_count": { + "2": { + "positions": 349, + "p95_ms": 3.8632554002106176 + }, + "3": { + "positions": 427, + "p95_ms": 3.4076224983436987 + }, + "4": { + "positions": 527, + "p95_ms": 4.197293498145882 + }, + "5": { + "positions": 609, + "p95_ms": 4.851117398357019 + }, + "6": { + "positions": 641, + "p95_ms": 5.2782699931412935 + } + }, + "model_sha256": "2c0c9ea2d72179cf8be6327b5b9dc7ee963124512251d2fd726e8a8c1f70bae7", + "all_moves_legal": true, + "search_samples": 0, + "search_scope": "all", + "geographic_search": false, + "cold_start_ms": 167.1677829872351, + "warm_roundtrip_p50_ms": 2.0699224987765774, + "warm_roundtrip_p95_ms": 4.688831949897575, + "worker_p95_ms": 2.7789266518084323, + "max_roundtrip_ms": 167.1677829872351, + "search_decisions": 0, + "search_evaluations": 0, + "search_truncated_rollouts": 0, + "search_roundtrip_p50_ms": null, + "search_roundtrip_p95_ms": null, + "by_phase": { + "Auction": { + "positions": 840, + "p50_ms": 1.9640145037556067, + "p95_ms": 4.528308007866143, + "max_ms": 167.1677829872351 + }, + "Resources": { + "positions": 755, + "p50_ms": 2.079826997942291, + "p95_ms": 4.735090497706551, + "max_ms": 7.375882007181644 + }, + "Building": { + "positions": 491, + "p50_ms": 2.33914700220339, + "p95_ms": 5.163508998521138, + "max_ms": 8.10930400621146 + }, + "Bureaucracy": { + "positions": 467, + "p50_ms": 2.055149001535028, + "p95_ms": 4.3062214041128755, + "max_ms": 7.938474998809397 + } + } + }, + "package": { + "files_verified": 1203, + "positions_verified": 80, + "player_counts": [ + 2, + 3, + 4, + 5, + 6 + ], + "all_moves_legal": true, + "model_sha256": "2c0c9ea2d72179cf8be6327b5b9dc7ee963124512251d2fd726e8a8c1f70bae7" + } } } diff --git a/ai/strong/launch-multiplayer-distill.sh b/ai/strong/launch-multiplayer-distill.sh new file mode 100644 index 0000000..e86d2ba --- /dev/null +++ b/ai/strong/launch-multiplayer-distill.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -euo pipefail +revision=${1:?Pin completed dataset revision} +mode=${2:-soft} +[[ "$mode" == hard || "$mode" == soft ]] +hf jobs run --detach --flavor a10g-large --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME="multiplayer-distillation-v1-$mode" --env TARGET_MODE="$mode" --env TRAIN_SEED=622 --env ARCHITECTURE=multiplayer --env DATA_REVISION="$revision" --env EPOCHS=20 --env DATA_VERSION=multiplayer-teacher-v1 --env SHARDS=5 --env DISAGREEMENT_WEIGHT=2 \ + --label project=powergrid-ai --label stage="multiplayer-distillation-v1-$mode" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnx==1.20.1 onnxruntime==1.30.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v18.tgz\",repo_type=\"dataset\",revision=\"49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python ai/strong/test_teacher_contract.py +python ai/strong/test_model_v4.py +python -u ai/strong/distill.py +' diff --git a/ai/strong/multiplayer-progress.json b/ai/strong/multiplayer-progress.json index 89eedf9..1cf8827 100644 --- a/ai/strong/multiplayer-progress.json +++ b/ai/strong/multiplayer-progress.json @@ -34,15 +34,20 @@ "cpu_model_forward_all_counts": true, "training_protocol_complete_games": 80, "initial_hf_evaluation_games": 640, - "initial_hf_evaluation_truncated": 0 + "initial_hf_evaluation_truncated": 0, + "onnx_parity_positions": 2553, + "amd_8840u_legal_positions": 2553, + "amd_8840u_prototype_p95_ms": 4.688831949897575, + "standalone_verified_files": 1203, + "standalone_positions": 80 }, "pending": [ - "Complete short HF pipeline run; verify checkpoint export and per-count learning stability", - "Collect and validate 1200 HF search-teacher games; use a seed-hash validation split", - "Generalize independent arena, distillation and serving tools to schema 4", - "Train search-distilled initialization and refine against strong opponents/self-play on HF", - "Count-specific held-out strength gates; old three-player final protocol is insufficient", - "ONNX parity and AMD 8840U benchmark across all supported counts" + "Complete HF pipeline run and inspect count-specific learning stability", + "Collect and validate all 1200 HF teacher games; pin immutable dataset revision", + "Run prepared multiplayer distillation with whole-game stratified validation on HF", + "Refine distilled policy against strong opponents and self-play on HF", + "Independent held-out strength testing at every count/rule combination", + "Re-run ONNX parity and AMD 8840U benchmark with the eventual selected model and search configuration" ], "preserved_baseline": "Schema 3 encoders and three-player checkpoint architecture unchanged; final seeds remain unused" } diff --git a/ai/strong/verify-package.py b/ai/strong/verify-package.py new file mode 100644 index 0000000..a79c4d1 --- /dev/null +++ b/ai/strong/verify-package.py @@ -0,0 +1,64 @@ +"""Read-only verification of extracted frozen CPU workers from an unrelated cwd.""" + +import argparse +import hashlib +import json +from pathlib import Path +import subprocess +import sys + +p = argparse.ArgumentParser() +p.add_argument("package") +p.add_argument("fixtures") +p.add_argument("--output", required=True) +a = p.parse_args() +root = Path(a.package).resolve() +manifest = json.loads((root / "manifest.json").read_text()) +for relative, expected in manifest["files"].items(): + assert hashlib.sha256((root / relative).read_bytes()).hexdigest() == expected, ( + relative + ) +worker = subprocess.Popen( + [sys.executable, str(root / "serve.py")], + cwd="/", + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + text=True, +) +seen = set() +try: + for line in Path(a.fixtures).read_text().splitlines(): + fixture = json.loads(line) + q = fixture["request"] + g = q["state"] + n = len(g["players"]) + key = (n, g["phase"], g["options"].get("variant"), g["options"].get("fastBid")) + if key in seen: + continue + seen.add(key) + worker.stdin.write(json.dumps(q) + "\n") + worker.stdin.flush() + result = json.loads(worker.stdout.readline()) + assert "error" not in result, result + assert result["move"] in fixture["legal"] + assert result["modelSha256"] == manifest["model_sha256"] + assert ( + result["requestId"] == q["requestId"] + and result["revision"] == q["revision"] + ) + assert result["playerOrder"] == [(q["player"] + j) % n for j in range(n)] + assert len(result["winProbabilities"]) == n + assert abs(sum(result["winProbabilities"]) - 1) < 1e-5 +finally: + worker.stdin.close() + worker.wait(timeout=10) + worker.stdout.close() +report = dict( + files_verified=len(manifest["files"]), + positions_verified=len(seen), + player_counts=sorted({key[0] for key in seen}), + all_moves_legal=True, + model_sha256=manifest["model_sha256"], +) +Path(a.output).write_text(json.dumps(report, indent=2) + "\n") +print(json.dumps(report)) From 04332cad8d4c9d84ab97cfcbacd1c4a3ec5d8a9f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:27:06 +0200 Subject: [PATCH 025/184] Audit multiplayer teacher data and generalize held-out final validation --- ai/strong/audit-teacher-dataset.py | 96 +++++++++++++++++++++++++++ ai/strong/check-export.py | 9 +++ ai/strong/experiments.json | 45 +++++++++++++ ai/strong/launch-final.py | 44 ++++++++---- ai/strong/launch-multiplayer-arena.sh | 25 +++++++ ai/strong/verify-final.py | 70 +++++++++++++++---- ai/strong/verify-package.py | 1 + 7 files changed, 263 insertions(+), 27 deletions(-) create mode 100644 ai/strong/audit-teacher-dataset.py create mode 100644 ai/strong/launch-multiplayer-arena.sh diff --git a/ai/strong/audit-teacher-dataset.py b/ai/strong/audit-teacher-dataset.py new file mode 100644 index 0000000..82df322 --- /dev/null +++ b/ai/strong/audit-teacher-dataset.py @@ -0,0 +1,96 @@ +"""Read-only audit of immutable HF teacher shards before GPU training.""" + +import argparse +from collections import Counter +import gzip +import json +from pathlib import Path +from huggingface_hub import hf_hub_download +from teacher_contract import validate_game, validation_seeds + +p = argparse.ArgumentParser() +p.add_argument("--revision", required=True) +p.add_argument("--version", default="multiplayer-teacher-v1") +p.add_argument("--output", required=True) +a = p.parse_args() +summary = {} +metadata = [] +seen = set() +for shard, n in enumerate(range(2, 7)): + path = hf_hub_download( + "coyotte508/powergrid-ai-training-v1", + f"{a.version}/{a.version}-{shard}.jsonl.gz", + repo_type="dataset", + revision=a.revision, + ) + stats = dict( + games=0, + positions=0, + truncated=0, + search_rollouts=0, + search_rollouts_truncated=0, + teacher_win_credit=0.0, + disagreements=0, + ) + cells = Counter() + phases = Counter() + opponents = {} + with gzip.open(path, "rt") as source: + for line in source: + game = json.loads(line) + validate_game(game) + assert game["playerCount"] == n + assert game["seed"] not in seen + seen.add(game["seed"]) + stats["games"] += 1 + stats["truncated"] += game["truncated"] + stats["positions"] += len(game["rows"]) + stats["search_rollouts"] += game["searchStats"]["evaluations"] + stats["search_rollouts_truncated"] += game["searchStats"]["truncated"] + if game["truncated"]: + continue + assert game["rows"] + seat = game["rows"][0]["seat"] + win = game["value"][seat] + stats["teacher_win_credit"] += win + opponent = ["economic", "heuristic", "rush"][game["id"] // (4 * n) % 3] + opp = opponents.setdefault(opponent, dict(games=0, win_credit=0.0)) + opp["games"] += 1 + opp["win_credit"] += win + cells[(seat, game["variant"], game["sealed"])] += 1 + for row in game["rows"]: + phases[row["phase"]] += 1 + stats["disagreements"] += not row["teacherAgrees"] + metadata.append( + { + **{ + k: game[k] for k in ["seed", "playerCount", "variant", "sealed"] + }, + "rows": [{"seat": seat}], + } + ) + assert stats["games"] == 240 and len(cells) == n * 4 + summary[str(n)] = { + **stats, + "seat_rule_cells": len(cells), + "phases": dict(phases), + "opponents": opponents, + } +selected = validation_seeds(metadata) +for n, stats in summary.items(): + stats["validation_games"] = sum( + g["playerCount"] == int(n) and g["seed"] in selected for g in metadata + ) + stats["training_games"] = sum( + g["playerCount"] == int(n) and g["seed"] not in selected for g in metadata + ) +report = dict( + revision=a.revision, + version=a.version, + counts=summary, + unique_games=len(seen), + validated=True, + scope="Teacher-generated development data; not held-out strength evidence", +) +Path(a.output).write_text(json.dumps(report, indent=2) + "\n") +print(json.dumps(report)) diff --git a/ai/strong/check-export.py b/ai/strong/check-export.py index 4001664..70b85d3 100644 --- a/ai/strong/check-export.py +++ b/ai/strong/check-export.py @@ -34,6 +34,8 @@ worker = subprocess.Popen( errors = [0.0, 0.0] count = 0 route_counts = {} +by_count = {} +inactive_values_zero = True try: for line in Path(a.fixtures).read_text().splitlines(): request = json.loads(line)["request"] @@ -64,6 +66,11 @@ try: for i in range(2): errors[i] = max(errors[i], float(np.max(np.abs(expected[i] - actual[i])))) np.testing.assert_allclose(actual[i], expected[i], rtol=1e-4, atol=1e-5) + n = len(request["state"]["players"]) + by_count[str(n)] = by_count.get(str(n), 0) + 1 + assert row["playerOrder"] == [(request["player"] + i) % n for i in range(n)] + assert np.all(actual[1][:, n:] == 0) + assert np.isfinite(actual[1]).all() and np.isclose(actual[1].sum(), 1) assert np.argmax(actual[0]) == np.argmax(expected[0]) count += 1 finally: @@ -72,6 +79,8 @@ finally: worker.stdout.close() report = { "positions": count, + "by_player_count": by_count, + "inactive_values_zero": inactive_values_zero, "feature_revision": revision, "model_sha256": hashlib.sha256(Path(a.model).read_bytes()).hexdigest(), "max_logit_error": errors[0], diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 311e8cf..b27912f 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -383,6 +383,14 @@ "status": "untrained initial-policy prototype; CPU feasibility only", "parity": { "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, "feature_revision": "4.0-multiplayer", "model_sha256": "2c0c9ea2d72179cf8be6327b5b9dc7ee963124512251d2fd726e8a8c1f70bae7", "max_logit_error": 0.0, @@ -460,6 +468,7 @@ } }, "package": { + "all_hashes_match": true, "files_verified": 1203, "positions_verified": 80, "player_counts": [ @@ -472,5 +481,41 @@ "all_moves_legal": true, "model_sha256": "2c0c9ea2d72179cf8be6327b5b9dc7ee963124512251d2fd726e8a8c1f70bae7" } + }, + "multiplayer_teacher_3p_audit": { + "revision": "71993d98c2bc025fa4d6df622af6006f956e082f", + "count": 3, + "opponents": { + "rush": { + "games": 84, + "wins": 73.0, + "positions": 10463 + }, + "economic": { + "games": 84, + "wins": 72.0, + "positions": 10670 + }, + "heuristic": { + "games": 72, + "wins": 68.0, + "positions": 8764 + } + }, + "game_truncations": 0, + "search_rollouts": 961984, + "search_rollout_truncations": 0, + "status": "completed teacher-data shard; development performance only" + }, + "deployment_interest": { + "browser_live_analysis": "User noted potential browser embedding on 2026-09-30; keep portable ONNX artifact; no browser deployment requested now", + "next_steps": "Continue strength training. Browser runtime performance and value calibration require separate validation." + }, + "multiplayer_final_tooling": { + "dry_run_jobs": 320, + "games": 20160, + "seed_prefix": "strong-multiplayer-final-reserved-v1", + "launched": false, + "negative_test": "Rejected development candidate, development seeds, missing counts/opponents, insufficient sample size and weak results" } } diff --git a/ai/strong/launch-final.py b/ai/strong/launch-final.py index 24c29ad..7aa40c5 100644 --- a/ai/strong/launch-final.py +++ b/ai/strong/launch-final.py @@ -18,17 +18,31 @@ protocol = json.loads(Path(a.protocol).read_text()) candidate = json.loads(Path(a.candidate).read_text()) plan = [] prefix = protocol["seed_prefix"] +multiplayer = isinstance(protocol.get("scope"), dict) +launcher = ( + "ai/strong/launch-multiplayer-arena.sh" + if multiplayer + else "ai/strong/launch-arena.sh" +) for opponent in protocol["opponents"]: - assert opponent["games"] % 48 == 0 - for shard in range(opponent["games"] // 48): - plan.append( - { - "name": f"{prefix}-{opponent['name']}-{shard:02}", - "seed": f"{prefix}-{shard}", - "opponent": opponent, - "games": 48, - } - ) + counts = opponent["counts"] if multiplayer else {"3": {"games": opponent["games"]}} + for count, spec in counts.items(): + n = int(count) + shard_games = 4 * n * 4 + assert spec["games"] % shard_games == 0 + for shard in range(spec["games"] // shard_games): + plan.append( + { + "name": f"{prefix}-{opponent['name']}-{n}p-{shard:02}" + if multiplayer + else f"{prefix}-{opponent['name']}-{shard:02}", + "seed": f"{prefix}-{n}p" if multiplayer else f"{prefix}-{shard}", + "player_count": n, + "deal_offset": shard * 4 if multiplayer else 0, + "opponent": opponent, + "games": shard_games, + } + ) print( json.dumps( { @@ -44,6 +58,8 @@ if not a.launch: raise SystemExit(0) if candidate.get("status") != "selected": raise ValueError("Select and freeze the candidate before spending final seeds") +if multiplayer and candidate.get("feature_revision") != "4.0-multiplayer": + raise ValueError("Multiplayer final requires a schema-4 candidate") from huggingface_hub import hf_hub_download model = Path( @@ -56,9 +72,7 @@ model = Path( assert hashlib.sha256(model.read_bytes()).hexdigest() == candidate["model_sha256"] manifest_path = root / "ai/strong/experiments.json" manifest = json.loads(manifest_path.read_text()) -launcher_sha256 = hashlib.sha256( - (root / "ai/strong/launch-arena.sh").read_bytes() -).hexdigest() +launcher_sha256 = hashlib.sha256((root / launcher).read_bytes()).hexdigest() fingerprint = hashlib.sha256( json.dumps( { @@ -94,6 +108,8 @@ for item in plan: env.pop("OPPONENT_MODEL_PATH", None) env.pop("OPPONENT_MODEL_REVISION", None) env["SEARCH_SCOPE"] = candidate.get("search_scope", "all") + env["PLAYER_COUNT"] = str(item["player_count"]) + env["DEAL_OFFSET"] = str(item["deal_offset"]) if "model_path" in opponent: env.update( OPPONENT_MODEL_PATH=opponent["model_path"], @@ -102,7 +118,7 @@ for item in plan: result = subprocess.run( [ "bash", - "ai/strong/launch-arena.sh", + launcher, item["name"], candidate["model_path"], candidate["model_revision"], diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh new file mode 100644 index 0000000..30e003a --- /dev/null +++ b/ai/strong/launch-multiplayer-arena.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -euo pipefail +# name model-path revision opponent samples geography games seed +extra_env=() +if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then + extra_env+=(--env "OPPONENT_MODEL_PATH=$OPPONENT_MODEL_PATH" --env "OPPONENT_MODEL_REVISION=${OPPONENT_MODEL_REVISION:?pin opponent revision}") +fi +hf jobs run --detach --flavor cpu-performance --timeout 3h \ + --secrets HF_TOKEN "${extra_env[@]}" \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 --env SEARCH_SCOPE="${SEARCH_SCOPE:-all}" \ + --env RUN_NAME="${1:?name}" --env MODEL_PATH="${2:?model path}" --env MODEL_REVISION="${3:?revision}" \ + --env OPPONENT="${4:?opponent}" --env SEARCH_SAMPLES="${5:?samples}" --env GEOGRAPHY="${6:?geography}" \ + --env PLAYER_COUNT="${PLAYER_COUNT:?Specify player count}" --env DEAL_OFFSET="${DEAL_OFFSET:-0}" \ + --env GAMES="${7:?games}" --env EVAL_SEED="${8:?seed}" --env WORKERS=24 \ + --label project=powergrid-ai --label stage="$1" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnxruntime==1.30.0 numpy==2.4.6 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v18.tgz\",repo_type=\"dataset\", revision=\"49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +python -u ai/strong/arena-job.py +' diff --git a/ai/strong/verify-final.py b/ai/strong/verify-final.py index ffabf7d..4773fc3 100644 --- a/ai/strong/verify-final.py +++ b/ai/strong/verify-final.py @@ -4,7 +4,7 @@ import argparse import json from pathlib import Path import sys -from arena_statistics import win_summary, search_summary +from arena_statistics import win_summary, search_summary, validate_pairs p = argparse.ArgumentParser() p.add_argument("candidate") @@ -25,7 +25,16 @@ def require(condition, message): errors.append(message) -expected = {x["name"]: x for x in protocol["opponents"]} +multiplayer = isinstance(protocol.get("scope"), dict) +expected = ( + { + f"{x['name']}/{n}p": {**x, **spec, "player_count": int(n)} + for x in protocol["opponents"] + for n, spec in x["counts"].items() + } + if multiplayer + else {x["name"]: {**x, "player_count": 3} for x in protocol["opponents"]} +) sha = candidate["model_sha256"] require( candidate.get("status") == "selected", "Candidate was not frozen before validation" @@ -37,9 +46,11 @@ for path in a.reports: x for x in expected.values() if ( - report.get("opponent_sha256") == x.get("model_sha256") + report.get("player_count", 3) == x["player_count"] + and report.get("opponent_sha256") == x.get("model_sha256") if "model_sha256" in x - else report.get("opponent") == x["name"] + else report.get("player_count", 3) == x["player_count"] + and report.get("opponent") == x["name"] and not report.get("opponent_sha256") ) ), @@ -48,7 +59,8 @@ for path in a.reports: if spec is None: errors.append(f"Unknown opponent report: {path}") continue - name = spec["name"] + n = spec["player_count"] + name = f"{spec['name']}/{n}p" if multiplayer else spec["name"] require(name not in audited, f"{name}: duplicate opponent report") require(report["model_sha256"] == sha, f"{name}: wrong checkpoint") require( @@ -74,6 +86,10 @@ for path in a.reports: require( len(rows) == report["games"] == spec["games"], f"{name}: incomplete game count" ) + try: + validate_pairs(rows, n) + except ValueError as error: + errors.append(f"{name}: {error}") pairs = set() deals = {} for row in rows: @@ -92,7 +108,7 @@ for path in a.reports: and row["roles"][row["seat"]] == "learner", f"{name}: incorrect learner seat", ) - role = "snapshot0" if "model_path" in spec else name + role = "snapshot0" if "model_path" in spec else spec["name"] require( all(r in ["learner", role] for r in row["roles"]), f"{name}: wrong opponent roles", @@ -106,13 +122,15 @@ for path in a.reports: (v, s, seat) for v in ["original", "recharged"] for s in [False, True] - for seat in range(3) + for seat in range(n) } require( all(x == required_pairs for x in deals.values()), f"{name}: missing seat/rule combinations", ) - require(len(deals) == spec["games"] // 12, f"{name}: wrong independent-deal count") + require( + len(deals) == spec["games"] // (4 * n), f"{name}: wrong independent-deal count" + ) summary = win_summary(rows) require( summary["win_rate"] >= spec["minimum_win_rate"], @@ -122,7 +140,11 @@ for path in a.reports: require( interval is not None and interval[0] - > protocol["requirements"]["overall_interval_lower_bound_above"], + > ( + 1 / n + if multiplayer + else protocol["requirements"]["overall_interval_lower_bound_above"] + ), f"{name}: overall advantage is not established", ) groups = [] @@ -139,7 +161,13 @@ for path in a.reports: require( interval is not None and interval[0] - > protocol["requirements"]["each_rule_interval_lower_bound_above"], + > ( + 1 / n + if multiplayer + else protocol["requirements"][ + "each_rule_interval_lower_bound_above" + ] + ), f"{name}: advantage not established for {variant}, sealed={sealed}", ) groups.append({"variant": variant, "sealed": sealed, **group}) @@ -154,11 +182,12 @@ parity, cpu, package = read(a.parity), read(a.cpu), read(a.package) for label, artifact in [("parity", parity), ("cpu", cpu), ("package", package)]: require(artifact["model_sha256"] == sha, f"{label}: wrong model hash") require( - parity["positions"] == 427 and parity["all_actions_match"], + parity["positions"] == (2553 if multiplayer else 427) + and parity["all_actions_match"], "Checkpoint/export parity did not cover all fixtures", ) require( - cpu["positions"] == 427 and cpu["all_moves_legal"], + cpu["positions"] == (2553 if multiplayer else 427) and cpu["all_moves_legal"], "CPU worker did not pass all legal fixtures", ) require("8840U" in cpu.get("processor_model", ""), "CPU benchmark was not on the 8840U") @@ -171,9 +200,24 @@ require( require( package["all_hashes_match"] and package["files_verified"] > 0 - and package["legal_fixture_responses"] == 427, + and ( + package.get("positions_verified") == 80 + and package.get("player_counts") == [2, 3, 4, 5, 6] + if multiplayer + else package["legal_fixture_responses"] == 427 + ), "Standalone archive verification incomplete", ) +if multiplayer: + require( + set(cpu.get("by_player_count", {})) == {"2", "3", "4", "5", "6"}, + "CPU benchmark missing player counts", + ) + require( + set(parity.get("by_player_count", {})) == {"2", "3", "4", "5", "6"} + and parity.get("inactive_values_zero"), + "Parity missing counts or inactive-value checks", + ) result = { "passed": not errors, "errors": errors, diff --git a/ai/strong/verify-package.py b/ai/strong/verify-package.py index a79c4d1..b3670bc 100644 --- a/ai/strong/verify-package.py +++ b/ai/strong/verify-package.py @@ -54,6 +54,7 @@ finally: worker.wait(timeout=10) worker.stdout.close() report = dict( + all_hashes_match=True, files_verified=len(manifest["files"]), positions_verified=len(seen), player_counts=sorted({key[0] for key in seen}), From 3b9de204fd80b53a38bb14950dd3214edbea519f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:31:04 +0200 Subject: [PATCH 026/184] Support balanced mixed-count PPO updates with full seat coverage --- ai/strong/bridge.cjs | 37 ++++++++++++++---- ai/strong/multiplayer.py | 16 ++++++++ ai/strong/test_model_v4.py | 15 ++++++++ ai/strong/test_multiplayer_bridge.py | 44 ++++++++++++++++++++++ ai/strong/train.py | 56 ++++++++++++++++++++++++---- 5 files changed, 152 insertions(+), 16 deletions(-) diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index b2b363c..ee827fd 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -70,7 +70,7 @@ function observation(e) { playerCount: e.g.players.length, }; } -function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, playerCount = 3) { +function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, playerCount = 3, trainingIndex, learnerSeat) { if (!Number.isInteger(playerCount) || playerCount < 2 || playerCount > 6) throw Error('Invalid player count'); if ( ![ @@ -89,8 +89,8 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, player ].includes(mode) ) throw Error('Unknown opponent mode: ' + mode); - const id = arenaSeed === undefined ? sequence++ : arenaId, - seat = Math.floor(id / 4) % playerCount, + const id = arenaSeed === undefined ? trainingIndex ?? sequence++ : arenaId, + seat = learnerSeat ?? Math.floor(id / 4) % playerCount, kind = Math.floor(c.seedrandom(seed + '-opponents-' + id)() * 8); const opponent = mode === 'mixed' || mode === 'mixed_search' @@ -133,11 +133,32 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, player try { const q = JSON.parse(line), ended = []; - if (q.op === 'reset') - envs = Array.from({ length: q.n }, (_, i) => - reset(q.mode, q.arenaSeed, (q.offset || 0) + i, q.featureRevisions, q.playerCount ?? 3) - ); - else if (q.op === 'step') + if (q.op === 'reset') { + const counts = q.playerCounts; + if ( + counts && + (q.arenaSeed !== undefined || + !Array.isArray(counts) || + !counts.length || + new Set(counts).size !== counts.length || + counts.some((n) => !Number.isInteger(n) || n < 2 || n > 6)) + ) + throw Error('Mixed player counts require a valid training-only schedule'); + envs = Array.from({ length: q.n }, (_, i) => { + const index = (q.offset || 0) + i; + const count = counts ? counts[Math.floor(index / 4) % counts.length] : q.playerCount ?? 3; + const seat = counts ? Math.floor(index / (4 * counts.length)) % count : undefined; + return reset( + q.mode, + q.arenaSeed, + index, + q.featureRevisions, + count, + counts ? index : undefined, + seat + ); + }); + } else if (q.op === 'step') for (let i = 0; i < envs.length; i++) { const e = envs[i]; if (q.actions[i] === null) continue; diff --git a/ai/strong/multiplayer.py b/ai/strong/multiplayer.py index c7108a7..fb2c983 100644 --- a/ai/strong/multiplayer.py +++ b/ai/strong/multiplayer.py @@ -15,3 +15,19 @@ def rotate_outcome(outcome, seat): if abs(sum(outcome) - 1) > 1e-6 or any(x < 0 for x in outcome): raise ValueError("Expected complete terminal win credits") return [outcome[(seat + j) % n] for j in range(n)] + [0.0] * (6 - n) + + +def balance_training_rows(rows): + """Normalize advantages within a count and give each count equal loss mass.""" + import numpy as np + + groups = {} + for row in rows: + groups.setdefault(row["playerCount"], []).append(row) + for group in groups.values(): + advantages = np.asarray([row["advantage"] for row in group]) + mean, std = advantages.mean(), advantages.std() + 1e-6 + weight = len(rows) / (len(groups) * len(group)) + for row in group: + row["normalized_advantage"] = float((row["advantage"] - mean) / std) + row["training_weight"] = weight diff --git a/ai/strong/test_model_v4.py b/ai/strong/test_model_v4.py index 3ddf81f..875d81f 100644 --- a/ai/strong/test_model_v4.py +++ b/ai/strong/test_model_v4.py @@ -6,9 +6,24 @@ import unittest import torch from model import tensors from model_v4 import MultiplayerPolicy +from multiplayer import balance_training_rows class MultiplayerTests(unittest.TestCase): + def test_training_balance_does_not_favor_longer_counts(self): + rows = [ + dict(playerCount=n, advantage=float(i % 2)) + for n in range(2, 7) + for i in range(n * 4) + ] + balance_training_rows(rows) + for n in range(2, 7): + group = [r for r in rows if r["playerCount"] == n] + self.assertAlmostEqual( + sum(r["training_weight"] for r in group), len(rows) / 5 + ) + self.assertAlmostEqual(sum(r["normalized_advantage"] for r in group), 0) + def test_all_counts_mask_values_and_legal_actions(self): root = Path(__file__).resolve().parents[2] rows = json.loads( diff --git a/ai/strong/test_multiplayer_bridge.py b/ai/strong/test_multiplayer_bridge.py index f1b6b95..e35588e 100644 --- a/ai/strong/test_multiplayer_bridge.py +++ b/ai/strong/test_multiplayer_bridge.py @@ -10,6 +10,50 @@ from multiplayer import ROLE_REVISIONS, rotate_outcome class BridgeTests(unittest.TestCase): + def test_mixed_training_schedule_covers_every_seat_and_rule(self): + pool = EnginePool(3, seed="mixed-count-protocol", script="ai/strong/bridge.cjs") + seen = {n: set() for n in range(2, 7)} + try: + for cycle in range(6): + reply = pool.call( + { + "op": "reset", + "n": 20, + "mode": "economic", + "playerCounts": [2, 3, 4, 5, 6], + "featureRevisions": ROLE_REVISIONS, + "offset": cycle * 20, + } + ) + current = reply["observations"] + self.assertEqual(len(current), 20) + for row in current: + n = row["playerCount"] + self.assertEqual(row["seat"], cycle % n) + seen[n].add((row["seat"], row["variant"], row["sealed"])) + self.assertEqual( + [sum(r["playerCount"] == n for r in current) for n in range(2, 7)], + [4] * 5, + ) + ends = [] + for _ in range(1800): + reply = pool.call( + { + "op": "step", + "actions": [r["teacher"] if r else None for r in current], + } + ) + ends.extend(reply["ended"]) + current = reply["observations"] + if all(r is None for r in current): + break + self.assertEqual(len(ends), 20) + self.assertFalse(any(e["truncated"] for e in ends)) + for n, cells in seen.items(): + self.assertEqual(len(cells), 4 * n) + finally: + pool.close() + def test_complete_paired_counts_and_rotate_terminal_targets(self): pool = EnginePool(3, seed="multiplayer-protocol", script="ai/strong/bridge.cjs") try: diff --git a/ai/strong/train.py b/ai/strong/train.py index ec79a26..868756a 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -11,8 +11,9 @@ import torch from torch.distributions import Categorical from model import Policy, tensors from model_v4 import MultiplayerPolicy -from multiplayer import ROLE_REVISIONS, rotate_outcome +from multiplayer import ROLE_REVISIONS, rotate_outcome, balance_training_rows from pool import EnginePool +from arena_statistics import search_summary from huggingface_hub import HfApi, hf_hub_download from feature_contract import FEATURE_REVISION, embed_revision @@ -22,6 +23,7 @@ if multiplayer: state_dim, action_dim = (1149, 98) if multiplayer else (738, 96) player_counts = [2, 3, 4, 5, 6] if multiplayer else [3] feature_revisions = ROLE_REVISIONS if multiplayer else {} +mix_player_counts = multiplayer and os.getenv("MIX_PLAYER_COUNTS") == "1" seed = int(os.getenv("TRAIN_SEED", "101")) random.seed(seed) @@ -108,6 +110,7 @@ def save(name, export=False): "feature_revision": FEATURE_REVISION, "strategic_only": strategic_only, "update": update, + "mixed_player_counts": mix_player_counts, "initial_checkpoint": initial_checkpoint, "initial_revision": initial_revision, "initial_feature_revision": checkpoint.get("feature_revision", "3.0") @@ -149,6 +152,7 @@ def save(name, export=False): "state_dim": state_dim, "action_dim": action_dim, "players": player_counts if multiplayer else 3, + "mixed_player_counts": mix_player_counts, "map": "Germany", "information": "all money public, sealed bids/deck/queued plans excluded", "run": run, @@ -293,6 +297,11 @@ try: "n": nenv, "mode": os.getenv("OPPONENT_MODE", "mixed"), "playerCount": player_counts[update % len(player_counts)], + **( + {"playerCounts": player_counts, "offset": update * nenv} + if mix_player_counts + else {} + ), "featureRevisions": feature_revisions, } )["observations"] @@ -366,6 +375,8 @@ try: advantages = np.array([r["advantage"] for r in batch]) mean = advantages.mean() std = advantages.std() + 1e-6 + if mix_player_counts: + balance_training_rows(batch) losses = [] net.train() for epoch in range(3): @@ -378,30 +389,46 @@ try: act = torch.tensor([r["choice"] for r in rows], device=device) old = torch.tensor([r["oldlogp"] for r in rows], device=device) adv = torch.tensor( - [(r["advantage"] - mean) / std for r in rows], + [ + r["normalized_advantage"] + if mix_player_counts + else (r["advantage"] - mean) / std + for r in rows + ], device=device, dtype=torch.float32, ) target = torch.tensor([r["value"] for r in rows], device=device) ratio = (dist.log_prob(act) - old).exp() - pg = -torch.minimum(ratio * adv, ratio.clamp(0.8, 1.2) * adv).mean() + weights = torch.tensor( + [r["training_weight"] if mix_player_counts else 1.0 for r in rows], + device=device, + ) + weighted_mean = lambda values: (values * weights).sum() / weights.sum() + pg = -weighted_mean( + torch.minimum(ratio * adv, ratio.clamp(0.8, 1.2) * adv) + ) if initial_anchor is not None: with torch.no_grad(): anchor = initial_anchor(*x)[0].softmax(-1) else: anchor = (x[1][:, :, 74] * 2).masked_fill(~x[2], -1e9).softmax(-1) - kl = torch.nn.functional.kl_div( - logits.log_softmax(-1), anchor, reduction="batchmean" + kl = weighted_mean( + torch.nn.functional.kl_div( + logits.log_softmax(-1), anchor, reduction="none" + ).sum(-1) ) loss = ( pg + 0.5 * ( - (((value - target) ** 2).sum(-1) / x[0][:, :6].sum(-1)).mean() + weighted_mean( + ((value - target) ** 2).sum(-1) / x[0][:, :6].sum(-1) + ) if multiplayer else ((value - target) ** 2).mean() ) - - float(os.getenv("ENTROPY", ".01")) * dist.entropy().mean() + - float(os.getenv("ENTROPY", ".01")) * weighted_mean(dist.entropy()) + float(os.getenv("ANCHOR", ".01")) * kl ) optimizer.zero_grad() @@ -414,7 +441,19 @@ try: "run": run, "update": update, "episodes": len(endings), - "player_count": player_counts[update % len(player_counts)], + "player_count": "mixed" + if mix_player_counts + else player_counts[update % len(player_counts)], + "by_player_count": { + n: { + "episodes": sum(e["playerCount"] == n for e in endings), + "truncated": sum( + e["playerCount"] == n and e["truncated"] for e in endings + ), + "samples": sum(r["playerCount"] == n for r in batch), + } + for n in player_counts + }, "truncated": sum(x["truncated"] for x in endings), "samples": len(batch), "rollout_seconds": rollout_seconds, @@ -433,6 +472,7 @@ try: group["wins"] += ending["value"][ending["roles"].index("learner")] group["truncated"] += ending["truncated"] metric["training_opponents"] = opponent_outcomes + metric.update(search_summary(endings)) metrics.append(metric) print(json.dumps(metric), flush=True) if (update + int(multiplayer)) % int( From 61db00486272fce96a9e09c344304dcfa8a50542 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:56:14 +0200 Subject: [PATCH 027/184] Validate complete teacher data and launch multiplayer distillation comparison --- ai/strong/experiments.json | 227 +++++++++++++++++++++++++++- ai/strong/multiplayer-progress.json | 9 +- ai/strong/preflight-distillation.py | 79 ++++++++++ 3 files changed, 310 insertions(+), 5 deletions(-) create mode 100644 ai/strong/preflight-distillation.py diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b27912f..84aa4c2 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -96,7 +96,9 @@ "multiplayer-teacher-v1-1": "6abd4259404719ba37613e1f", "multiplayer-teacher-v1-2": "6abd4259fbc85ba68235c124", "multiplayer-teacher-v1-3": "6abd425a404719ba37613e21", - "multiplayer-teacher-v1-4": "6abd425b404719ba37613e23" + "multiplayer-teacher-v1-4": "6abd425b404719ba37613e23", + "multiplayer-distillation-v1-soft": "6abd4d17404719ba37613fb6", + "multiplayer-distillation-v1-hard": "6abd4d17fbc85ba68235c391" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -230,8 +232,9 @@ "samples": 16, "geography": true, "all_phases": true, - "status": "submitted", - "validation_split_requirement": "Use deterministic seed hash or stratification; id modulo 5 confounds seat/rules at five players." + "status": "all five shards completed and validated", + "validation_split_requirement": "Use deterministic seed hash or stratification; id modulo 5 confounds seat/rules at five players.", + "dataset_revision": "082ca1456736940ee32c96db3ad1bc4e4d0b206b" }, "specialists_remaining_results": { "specialists-legacy-screen": { @@ -517,5 +520,223 @@ "seed_prefix": "strong-multiplayer-final-reserved-v1", "launched": false, "negative_test": "Rejected development candidate, development seeds, missing counts/opponents, insufficient sample size and weak results" + }, + "multiplayer_teacher_complete_audit": { + "revision": "082ca1456736940ee32c96db3ad1bc4e4d0b206b", + "version": "multiplayer-teacher-v1", + "counts": { + "2": { + "games": 240, + "positions": 36462, + "truncated": 0, + "search_rollouts": 1069792, + "search_rollouts_truncated": 0, + "teacher_win_credit": 196.0, + "disagreements": 5626, + "seat_rule_cells": 8, + "phases": { + "Auction": 8736, + "Resources": 14208, + "Building": 6017, + "Bureaucracy": 7501 + }, + "opponents": { + "rush": { + "games": 80, + "win_credit": 57.0 + }, + "heuristic": { + "games": 80, + "win_credit": 63.0 + }, + "economic": { + "games": 80, + "win_credit": 76.0 + } + }, + "validation_games": 48, + "training_games": 192 + }, + "3": { + "games": 240, + "positions": 29897, + "truncated": 0, + "search_rollouts": 961984, + "search_rollouts_truncated": 0, + "teacher_win_credit": 213.0, + "disagreements": 4471, + "seat_rule_cells": 12, + "phases": { + "Auction": 7998, + "Resources": 11549, + "Building": 4926, + "Bureaucracy": 5424 + }, + "opponents": { + "rush": { + "games": 84, + "win_credit": 73.0 + }, + "economic": { + "games": 84, + "win_credit": 72.0 + }, + "heuristic": { + "games": 72, + "win_credit": 68.0 + } + }, + "validation_games": 48, + "training_games": 192 + }, + "4": { + "games": 240, + "positions": 28800, + "truncated": 0, + "search_rollouts": 976624, + "search_rollouts_truncated": 0, + "teacher_win_credit": 205.0, + "disagreements": 4229, + "seat_rule_cells": 16, + "phases": { + "Auction": 7951, + "Resources": 10958, + "Building": 4841, + "Bureaucracy": 5050 + }, + "opponents": { + "heuristic": { + "games": 80, + "win_credit": 77.0 + }, + "economic": { + "games": 80, + "win_credit": 66.0 + }, + "rush": { + "games": 80, + "win_credit": 62.0 + } + }, + "validation_games": 48, + "training_games": 192 + }, + "5": { + "games": 240, + "positions": 24903, + "truncated": 0, + "search_rollouts": 902032, + "search_rollouts_truncated": 0, + "teacher_win_credit": 219.0, + "disagreements": 3639, + "seat_rule_cells": 20, + "phases": { + "Auction": 7405, + "Resources": 9121, + "Building": 4239, + "Bureaucracy": 4138 + }, + "opponents": { + "economic": { + "games": 80, + "win_credit": 72.0 + }, + "heuristic": { + "games": 80, + "win_credit": 78.0 + }, + "rush": { + "games": 80, + "win_credit": 69.0 + } + }, + "validation_games": 40, + "training_games": 200 + }, + "6": { + "games": 240, + "positions": 22742, + "truncated": 0, + "search_rollouts": 836032, + "search_rollouts_truncated": 0, + "teacher_win_credit": 202.0, + "disagreements": 3579, + "seat_rule_cells": 24, + "phases": { + "Auction": 6946, + "Resources": 8201, + "Building": 3822, + "Bureaucracy": 3773 + }, + "opponents": { + "heuristic": { + "games": 96, + "win_credit": 92.0 + }, + "rush": { + "games": 72, + "win_credit": 57.0 + }, + "economic": { + "games": 72, + "win_credit": 53.0 + } + }, + "validation_games": 48, + "training_games": 192 + } + }, + "unique_games": 1200, + "validated": true, + "scope": "Teacher-generated development data; not held-out strength evidence" + }, + "multiplayer_mixed_training": { + "source_archive": "strong-source-v19.tgz", + "source_revision": "082ca1456736940ee32c96db3ad1bc4e4d0b206b", + "git_revision": "3b9de20", + "enabled_by": "MIX_PLAYER_COUNTS=1", + "verified": "every count/seat/rule reached; 100 complete protocol games; per-count loss mass equal" + }, + "multiplayer_distillation_dispatch": { + "status": "submitted after network restoration", + "dataset_revision": "082ca1456736940ee32c96db3ad1bc4e4d0b206b", + "planned_modes": [ + "soft", + "hard" + ], + "failed_attempt": "soft launcher failed resolving Hugging Face during whoami, before job submission", + "network_permission_request": "returned no network grant", + "existing_pipeline_job": "6abd41d2404719ba37613e0f", + "existing_pipeline_status": "RUNNING, revalidated after network restoration", + "offline_preflight": { + "purpose": "Offline CPU preflight only; no training", + "shards": 5, + "positions": 403, + "counts": { + "5": 80, + "6": 80, + "3": 82, + "4": 81, + "2": 80 + }, + "seat_rule_phase_action_cells": 202, + "hard_soft_targets_valid": true, + "inactive_values_zero": true, + "mean_initial_cross_entropy": { + "hard": 1.3058999043965747, + "soft": 1.3987828060399936 + } + }, + "consecutive_network_blocked_goal_turns": 0, + "latest_connectivity_check": { + "operation": "inspect existing job and submit both distillation jobs", + "result": "success" + }, + "submitted_jobs": { + "soft": "6abd4d17404719ba37613fb6", + "hard": "6abd4d17fbc85ba68235c391" + }, + "source_archive": "strong-source-v18.tgz", + "source_revision": "49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d" } } diff --git a/ai/strong/multiplayer-progress.json b/ai/strong/multiplayer-progress.json index 1cf8827..4efbe9e 100644 --- a/ai/strong/multiplayer-progress.json +++ b/ai/strong/multiplayer-progress.json @@ -1,5 +1,5 @@ { - "status": "HF pipeline training and teacher jobs launched; not strength-qualified", + "status": "network restored; soft and hard multiplayer distillation submitted to HF", "feature_revision": "4.0-multiplayer", "scope": { "map": "Germany", @@ -39,7 +39,12 @@ "amd_8840u_legal_positions": 2553, "amd_8840u_prototype_p95_ms": 4.688831949897575, "standalone_verified_files": 1203, - "standalone_positions": 80 + "standalone_positions": 80, + "teacher_games": 1200, + "teacher_positions": 142804, + "teacher_search_rollouts": 4746464, + "teacher_truncated_games": 0, + "teacher_truncated_rollouts": 0 }, "pending": [ "Complete HF pipeline run and inspect count-specific learning stability", diff --git a/ai/strong/preflight-distillation.py b/ai/strong/preflight-distillation.py new file mode 100644 index 0000000..2ca8ccc --- /dev/null +++ b/ai/strong/preflight-distillation.py @@ -0,0 +1,79 @@ +"""Offline CPU inference and target checks; no gradients or optimizer steps.""" + +import argparse +from collections import Counter +import gzip +import json +from pathlib import Path +import numpy as np +import torch +from model import tensors +from model_v4 import MultiplayerPolicy +from distillation_targets import policy_targets + +p = argparse.ArgumentParser() +p.add_argument("dataset_directory") +p.add_argument("--output", required=True) +a = p.parse_args() +selected = [] +cells = Counter() +files = sorted(Path(a.dataset_directory).glob("multiplayer-teacher-v1-*.jsonl.gz")) +if len(files) != 5: + raise ValueError("Need all five immutable teacher shards") +for path in files: + with gzip.open(path, "rt") as source: + for line in source: + game = json.loads(line) + if game["truncated"]: + raise ValueError("Dataset contains truncated games") + for row in game["rows"]: + move_type = int(np.argmax(row["actions"][row["target"]][:10])) + cell = ( + game["playerCount"], + game["variant"], + game["sealed"], + row["phase"], + move_type, + ) + if cells[cell] >= 2: + continue + cells[cell] += 1 + selected.append({**row, "playerCount": game["playerCount"]}) +# Mix counts in each batch to exercise padding and masked-value targets. +np.random.default_rng(742).shuffle(selected) +torch.set_num_threads(1) +net = MultiplayerPolicy().eval() +losses = {mode: [] for mode in ["hard", "soft"]} +with torch.inference_mode(): + for start in range(0, len(selected), 64): + rows = selected[start : start + 64] + x = tensors(rows, "cpu") + logits, values = net(*x) + assert torch.isfinite(logits).all() and torch.isfinite(values).all() + np.testing.assert_allclose(values.sum(-1).numpy(), 1, atol=1e-6) + for index, row in enumerate(rows): + n = row["playerCount"] + assert torch.all(values[index, n:] == 0) + assert row["value"][n:] == [0] * (6 - n) + for mode in losses: + targets = policy_targets(rows, logits.shape[1], soft=mode == "soft") + assert np.isfinite(targets).all() and np.all(targets >= 0) + np.testing.assert_allclose(targets.sum(-1), 1, atol=1e-6) + assert np.all(targets[~x[2].numpy()] == 0) + ce = -(torch.from_numpy(targets) * logits.log_softmax(-1)).sum(-1) + assert torch.isfinite(ce).all() + losses[mode].extend(ce.tolist()) +report = { + "purpose": "Offline CPU preflight only; no training", + "shards": len(files), + "positions": len(selected), + "counts": dict(Counter(r["playerCount"] for r in selected)), + "seat_rule_phase_action_cells": len(cells), + "hard_soft_targets_valid": True, + "inactive_values_zero": True, + "mean_initial_cross_entropy": { + mode: float(np.mean(xs)) for mode, xs in losses.items() + }, +} +Path(a.output).write_text(json.dumps(report, indent=2) + "\n") +print(json.dumps(report)) From 7559d3ef00f05cf10524cfe7a162baf904b390dc Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 19:59:34 +0200 Subject: [PATCH 028/184] Freeze multiplayer update-5 checkpoint and launch independent screening --- ai/strong/experiments.json | 52 +++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 84aa4c2..49fd4d0 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -98,7 +98,14 @@ "multiplayer-teacher-v1-3": "6abd425a404719ba37613e21", "multiplayer-teacher-v1-4": "6abd425b404719ba37613e23", "multiplayer-distillation-v1-soft": "6abd4d17404719ba37613fb6", - "multiplayer-distillation-v1-hard": "6abd4d17fbc85ba68235c391" + "multiplayer-distillation-v1-hard": "6abd4d17fbc85ba68235c391", + "multiplayer-p5-economic-2p": "6abd4db1fbc85ba68235c3a8", + "multiplayer-p5-economic-3p": "6abd4db2fbc85ba68235c3aa", + "multiplayer-p5-economic-4p": "6abd4db2404719ba37613fd5", + "multiplayer-p5-economic-5p": "6abd4db3fbc85ba68235c3ac", + "multiplayer-p5-economic-6p": "6abd4db4404719ba37613fd7", + "multiplayer-p5-a260-3p": "6abd4dce404719ba37613fdc", + "multiplayer-p5-search-probe-6p": "6abd4dcffbc85ba68235c3ae" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -738,5 +745,48 @@ }, "source_archive": "strong-source-v18.tgz", "source_revision": "49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d" + }, + "multiplayer_p5_screening": { + "candidate": { + "status": "development", + "model_revision": "a1b729b75c3639606a169afa0f043fcd16b65efb", + "model_path": "runs/multiplayer-pipeline-v1/best.onnx", + "model_sha256": "b17143c7f9183b2d49d6bd139b1befff5c72ae54796562fc8753a958138bf787", + "update": 5, + "feature_revision": "4.0-multiplayer", + "search_samples": 0, + "geographic_search": false, + "search_scope": "all" + }, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "b17143c7f9183b2d49d6bd139b1befff5c72ae54796562fc8753a958138bf787", + "max_logit_error": 1.9073486328125e-06, + "max_value_error": 4.172325134277344e-07, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "economic_games": { + "2": 320, + "3": 480, + "4": 640, + "5": 800, + "6": 960 + }, + "economic_independent_deals_per_count": 40, + "a260_games_3p": 480, + "search_probe_games_6p": 48, + "search_probe_independent_deals": 2, + "scope": "Development comparisons only; six-player search probe is too small for a strength claim", + "status": "submitted" } } From 4e486495b3fc95535289c28c3c4bc8f139e8d96f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:00:01 +0200 Subject: [PATCH 029/184] Record two-player screening weakness before teacher refinement --- ai/strong/experiments.json | 62 +++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 49fd4d0..60c4c6f 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -787,6 +787,66 @@ "search_probe_games_6p": 48, "search_probe_independent_deals": 2, "scope": "Development comparisons only; six-player search probe is too small for a strength claim", - "status": "submitted" + "status": "submitted", + "economic_2p_result": { + "games": 320, + "win_rate": 0.559375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.50625, + 0.615625 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.5875 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.725 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.7 + ] + } + ] + }, + "economic_2p_assessment": "Marginal overall advantage; original sealed below 50%; does not satisfy strong-play gate." } } From f2a258e863672539d245bb6d3cf53144f07dee67 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:07:58 +0200 Subject: [PATCH 030/184] Preserve opponent identity in multiplayer policy context --- ai/strong/distill.py | 10 +- ai/strong/experiments.json | 409 +++++++++++++++++++++++- ai/strong/launch-multiplayer-distill.sh | 2 +- ai/strong/model.py | 7 +- ai/strong/model_v4.py | 13 +- ai/strong/preflight-distillation.py | 5 +- ai/strong/test_model_v4.py | 57 +++- ai/strong/train.py | 10 +- 8 files changed, 481 insertions(+), 32 deletions(-) diff --git a/ai/strong/distill.py b/ai/strong/distill.py index d19f94a..afca799 100644 --- a/ai/strong/distill.py +++ b/ai/strong/distill.py @@ -20,7 +20,9 @@ from teacher_contract import validate_game, validation_seeds from distillation_targets import policy_targets from feature_contract import FEATURE_REVISION, embed_revision -multiplayer = os.getenv("ARCHITECTURE") == "multiplayer" +architecture = os.getenv("ARCHITECTURE", "policy") +multiplayer = architecture in ["multiplayer", "multiplayer_ordered"] +ordered_players = architecture == "multiplayer_ordered" if multiplayer: FEATURE_REVISION = "4.0-multiplayer" if not os.getenv("DATA_REVISION"): @@ -38,7 +40,9 @@ run = os.getenv("RUN_NAME", "search-distillation-v1") out = Path("ai/runs") / run out.mkdir(parents=True, exist_ok=True) device = "cuda" -net = (MultiplayerPolicy() if multiplayer else Policy()).to(device) +net = ( + MultiplayerPolicy(ordered_players=ordered_players) if multiplayer else Policy() +).to(device) train, validation = [], [] dataset_revisions = [] seen_games = set() @@ -112,7 +116,7 @@ def export(name): torch.save( { "schema": 4 if multiplayer else 3, - "architecture": "multiplayer" if multiplayer else "policy", + "architecture": architecture if multiplayer else "policy", "feature_revision": FEATURE_REVISION, "state_dim": state_dim, "action_dim": action_dim, diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 60c4c6f..58798d4 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -98,14 +98,15 @@ "multiplayer-teacher-v1-3": "6abd425a404719ba37613e21", "multiplayer-teacher-v1-4": "6abd425b404719ba37613e23", "multiplayer-distillation-v1-soft": "6abd4d17404719ba37613fb6", - "multiplayer-distillation-v1-hard": "6abd4d17fbc85ba68235c391", + "multiplayer-distillation-v1-hard": "6abd4e63fbc85ba68235c408", "multiplayer-p5-economic-2p": "6abd4db1fbc85ba68235c3a8", "multiplayer-p5-economic-3p": "6abd4db2fbc85ba68235c3aa", "multiplayer-p5-economic-4p": "6abd4db2404719ba37613fd5", "multiplayer-p5-economic-5p": "6abd4db3fbc85ba68235c3ac", "multiplayer-p5-economic-6p": "6abd4db4404719ba37613fd7", "multiplayer-p5-a260-3p": "6abd4dce404719ba37613fdc", - "multiplayer-p5-search-probe-6p": "6abd4dcffbc85ba68235c3ae" + "multiplayer-p5-search-probe-6p": "6abd4dcffbc85ba68235c3ae", + "multiplayer-distillation-v1-hard-canceled-queued": "6abd4d17fbc85ba68235c391" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -705,7 +706,7 @@ "verified": "every count/seat/rule reached; 100 complete protocol games; per-count loss mass equal" }, "multiplayer_distillation_dispatch": { - "status": "submitted after network restoration", + "status": "v1 queued runs canceled before start; preparing ordered-opponent architecture v2", "dataset_revision": "082ca1456736940ee32c96db3ad1bc4e4d0b206b", "planned_modes": [ "soft", @@ -741,10 +742,21 @@ }, "submitted_jobs": { "soft": "6abd4d17404719ba37613fb6", - "hard": "6abd4d17fbc85ba68235c391" + "hard": "6abd4e63fbc85ba68235c408" }, "source_archive": "strong-source-v18.tgz", - "source_revision": "49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d" + "source_revision": "49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d", + "hard_reschedule": { + "original_job": "6abd4d17fbc85ba68235c391", + "original_status": "CANCELED before start, verified", + "replacement_job": "6abd4e63fbc85ba68235c408", + "flavor": "h200", + "reason": "A10G hardware queue; try a separate resource pool without duplicate training" + }, + "canceled_before_start": [ + "6abd4d17404719ba37613fb6", + "6abd4e63fbc85ba68235c408" + ] }, "multiplayer_p5_screening": { "candidate": { @@ -847,6 +859,391 @@ } ] }, - "economic_2p_assessment": "Marginal overall advantage; original sealed below 50%; does not satisfy strong-play gate." + "economic_2p_assessment": "Marginal overall advantage; original sealed below 50%; does not satisfy strong-play gate.", + "economic_results": { + "2": { + "games": 320, + "win_rate": 0.559375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.50625, + 0.615625 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.5875 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.725 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.7 + ] + } + ] + }, + "3": { + "games": 480, + "win_rate": 0.4375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.39166666666666666, + 0.48125 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.38333333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.475 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.3416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.26666666666666666, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.5583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4666666666666667, + 0.65 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.4666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.39166666666666666, + 0.55 + ] + } + ] + }, + "4": { + "games": 640, + "win_rate": 0.34375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.29375, + 0.39375 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.3625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2875, + 0.4375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.25, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.175, + 0.325 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.4, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.31875, + 0.48125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.3625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.28125, + 0.44375 + ] + } + ] + }, + "5": { + "games": 800, + "win_rate": 0.3875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.345, + 0.4275 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.36, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.295, + 0.425 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.39, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.32, + 0.46 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.435, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.36, + 0.505 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.365, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.295, + 0.435 + ] + } + ] + }, + "6": { + "games": 960, + "win_rate": 0.33125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.296875, + 0.365625 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.3125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.32083333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.26666666666666666, + 0.37916666666666665 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.37083333333333335, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.44166666666666665 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.32083333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.26666666666666666, + 0.375 + ] + } + ] + } + }, + "assessment": "All counts show overall advantage versus economic baseline, but none meets the required economic win-rate floor; original/sealed near chance at 2\u20134 players.", + "a260_3p_result": { + "games": 480, + "win_rate": 0.13541666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.09583333333333334, + 0.18125 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.14166666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.20833333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.13333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.075, + 0.19166666666666668 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.11666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.05, + 0.2 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.15, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.075, + 0.23333333333333334 + ] + } + ] + } + }, + "multiplayer_ordered_architecture": { + "architecture": "multiplayer_ordered", + "feature_revision": "4.0-multiplayer", + "parameters": 983682, + "reason": "Preserve explicit association between each opponent holdings and the city/territory features for that relative seat; pooled opponent embeddings alone obscure it. This is a representational limitation, not proof of the cause of all screening losses.", + "checkpoint_compatibility": "Old multiplayer factory keeps pooled architecture; new architecture has separate identifier", + "preflight": { + "purpose": "Offline CPU preflight only; no training", + "architecture": "multiplayer_ordered", + "parameters": 983682, + "shards": 5, + "positions": 403, + "counts": { + "5": 80, + "6": 80, + "3": 82, + "4": 81, + "2": 80 + }, + "seat_rule_phase_action_cells": 202, + "hard_soft_targets_valid": true, + "inactive_values_zero": true, + "mean_initial_cross_entropy": { + "hard": 1.3058999043965747, + "soft": 1.3987828060399936 + } + } } } diff --git a/ai/strong/launch-multiplayer-distill.sh b/ai/strong/launch-multiplayer-distill.sh index e86d2ba..c90f9db 100644 --- a/ai/strong/launch-multiplayer-distill.sh +++ b/ai/strong/launch-multiplayer-distill.sh @@ -3,7 +3,7 @@ set -euo pipefail revision=${1:?Pin completed dataset revision} mode=${2:-soft} [[ "$mode" == hard || "$mode" == soft ]] -hf jobs run --detach --flavor a10g-large --timeout 3h \ +hf jobs run --detach --flavor "${HF_FLAVOR:-a10g-large}" --timeout 3h \ --secrets HF_TOKEN \ --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ diff --git a/ai/strong/model.py b/ai/strong/model.py index 0281741..d75de7f 100644 --- a/ai/strong/model.py +++ b/ai/strong/model.py @@ -69,10 +69,13 @@ class RuleSpecialists(nn.Module): def policy_from_checkpoint(checkpoint): architecture = checkpoint.get("architecture", "policy") - if architecture == "multiplayer": + if architecture in ["multiplayer", "multiplayer_ordered"]: from model_v4 import MultiplayerPolicy - net = MultiplayerPolicy(**checkpoint.get("model_args", {})) + args = dict(checkpoint.get("model_args", {})) + if architecture == "multiplayer_ordered": + args["ordered_players"] = True + net = MultiplayerPolicy(**args) elif architecture == "rule_specialists": net = RuleSpecialists(**checkpoint["model_args"]) elif architecture == "policy": diff --git a/ai/strong/model_v4.py b/ai/strong/model_v4.py index 4932bc8..c200cea 100644 --- a/ai/strong/model_v4.py +++ b/ai/strong/model_v4.py @@ -5,12 +5,13 @@ from torch import nn class MultiplayerPolicy(nn.Module): - def __init__(self, width=384): + def __init__(self, width=384, ordered_players=False): super().__init__() + self.ordered_players = ordered_players self.player = nn.Sequential(nn.Linear(74, 128), nn.LayerNorm(128), nn.SiLU()) # Global context, city ownership and territory occupancy retain seat order. self.context = nn.Sequential( - nn.Linear(258 + 308 + 133 + 256 + 6, width), + nn.Linear(258 + 308 + 133 + (896 if ordered_players else 256) + 6, width), nn.LayerNorm(width), nn.SiLU(), nn.Linear(width, width), @@ -32,9 +33,15 @@ class MultiplayerPolicy(nn.Module): pooled = (p * active[:, :, None]).sum(1) / active.sum(1, keepdim=True).clamp( min=1 ) + # Keep holdings attached to the same relative seats used by city ownership + # and action territory features. The mean alone loses those associations. + player_context = ( + (p * active[:, :, None]).flatten(1) if self.ordered_players else p[:, 0] + ) s = self.context( torch.cat( - (state[:, 6:264], state[:, 708:], p[:, 0], pooled, state[:, :6]), -1 + (state[:, 6:264], state[:, 708:], player_context, pooled, state[:, :6]), + -1, ) ) a = self.action(actions) diff --git a/ai/strong/preflight-distillation.py b/ai/strong/preflight-distillation.py index 2ca8ccc..f4e0245 100644 --- a/ai/strong/preflight-distillation.py +++ b/ai/strong/preflight-distillation.py @@ -14,6 +14,7 @@ from distillation_targets import policy_targets p = argparse.ArgumentParser() p.add_argument("dataset_directory") p.add_argument("--output", required=True) +p.add_argument("--ordered-players", action="store_true") a = p.parse_args() selected = [] cells = Counter() @@ -42,7 +43,7 @@ for path in files: # Mix counts in each batch to exercise padding and masked-value targets. np.random.default_rng(742).shuffle(selected) torch.set_num_threads(1) -net = MultiplayerPolicy().eval() +net = MultiplayerPolicy(ordered_players=a.ordered_players).eval() losses = {mode: [] for mode in ["hard", "soft"]} with torch.inference_mode(): for start in range(0, len(selected), 64): @@ -65,6 +66,8 @@ with torch.inference_mode(): losses[mode].extend(ce.tolist()) report = { "purpose": "Offline CPU preflight only; no training", + "architecture": "multiplayer_ordered" if a.ordered_players else "multiplayer", + "parameters": sum(p.numel() for p in net.parameters()), "shards": len(files), "positions": len(selected), "counts": dict(Counter(r["playerCount"] for r in selected)), diff --git a/ai/strong/test_model_v4.py b/ai/strong/test_model_v4.py index 875d81f..187f0b1 100644 --- a/ai/strong/test_model_v4.py +++ b/ai/strong/test_model_v4.py @@ -4,12 +4,42 @@ import subprocess import unittest import torch -from model import tensors +from model import tensors, policy_from_checkpoint from model_v4 import MultiplayerPolicy from multiplayer import balance_training_rows class MultiplayerTests(unittest.TestCase): + def test_opponent_holdings_remain_attached_to_relative_seats(self): + state = torch.zeros(2, 1149) + state[:, :3] = 1 + state[0, 338:412] = torch.linspace(0, 1, 74) + state[0, 412:486] = torch.linspace(1, 0, 74) + state[1] = state[0] + state[1, 338:412] = state[0, 412:486] + state[1, 412:486] = state[0, 338:412] + actions = torch.zeros(2, 1, 98) + mask = torch.ones(2, 1, dtype=torch.bool) + for ordered in [False, True]: + net = MultiplayerPolicy(ordered_players=ordered).eval() + captured = [] + hook = net.context[0].register_forward_pre_hook( + lambda module, args: captured.append(args[0].clone()) + ) + with torch.inference_mode(): + net(state, actions, mask) + hook.remove() + if ordered: + self.assertFalse(torch.allclose(captured[0][0], captured[0][1])) + else: + torch.testing.assert_close(captured[0][0], captured[0][1]) + checkpoint = { + "architecture": "multiplayer_ordered" if ordered else "multiplayer", + "state_dict": net.state_dict(), + } + restored = policy_from_checkpoint(checkpoint) + self.assertEqual(restored.ordered_players, ordered) + def test_training_balance_does_not_favor_longer_counts(self): rows = [ dict(playerCount=n, advantage=float(i % 2)) @@ -37,18 +67,19 @@ class MultiplayerTests(unittest.TestCase): cwd=root, ) ) - net = MultiplayerPolicy().eval() - with torch.inference_mode(): - logits, values = net(*tensors(rows, "cpu")) - self.assertEqual(tuple(values.shape), (5, 6)) - for row, n in enumerate(range(2, 7)): - self.assertTrue(torch.isfinite(logits[row]).all()) - self.assertTrue(torch.isfinite(values[row]).all()) - self.assertEqual(values[row, n:].sum().item(), 0) - self.assertAlmostEqual(values[row, :n].sum().item(), 1, places=6) - self.assertLess(logits[row].argmax().item(), len(rows[row]["actions"])) - expected = torch.tensor(rows[row]["prior"]).argmax().item() - self.assertEqual(logits[row].argmax().item(), expected) + for ordered in [False, True]: + net = MultiplayerPolicy(ordered_players=ordered).eval() + with torch.inference_mode(): + logits, values = net(*tensors(rows, "cpu")) + self.assertEqual(tuple(values.shape), (5, 6)) + for row, n in enumerate(range(2, 7)): + self.assertTrue(torch.isfinite(logits[row]).all()) + self.assertTrue(torch.isfinite(values[row]).all()) + self.assertEqual(values[row, n:].sum().item(), 0) + self.assertAlmostEqual(values[row, :n].sum().item(), 1, places=6) + self.assertLess(logits[row].argmax().item(), len(rows[row]["actions"])) + expected = torch.tensor(rows[row]["prior"]).argmax().item() + self.assertEqual(logits[row].argmax().item(), expected) if __name__ == "__main__": diff --git a/ai/strong/train.py b/ai/strong/train.py index 868756a..0a3749c 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -17,7 +17,9 @@ from arena_statistics import search_summary from huggingface_hub import HfApi, hf_hub_download from feature_contract import FEATURE_REVISION, embed_revision -multiplayer = os.getenv("ARCHITECTURE") == "multiplayer" +architecture = os.getenv("ARCHITECTURE", "policy") +multiplayer = architecture in ["multiplayer", "multiplayer_ordered"] +ordered_players = architecture == "multiplayer_ordered" if multiplayer: FEATURE_REVISION = "4.0-multiplayer" state_dim, action_dim = (1149, 98) if multiplayer else (738, 96) @@ -74,7 +76,9 @@ strategic_only = ( if multiplayer and strategic_only: raise ValueError("Strategic-only schema-3 routing cannot be used with schema 4") net = ( - MultiplayerPolicy() if multiplayer else Policy(strategic_only=strategic_only) + MultiplayerPolicy(ordered_players=ordered_players) + if multiplayer + else Policy(strategic_only=strategic_only) ).to(device) if checkpoint: net.load_state_dict(checkpoint["state_dict"]) @@ -106,7 +110,7 @@ def save(name, export=False): "state_dim": state_dim, "action_dim": action_dim, "schema": 4 if multiplayer else 3, - "architecture": "multiplayer" if multiplayer else "policy", + "architecture": architecture if multiplayer else "policy", "feature_revision": FEATURE_REVISION, "strategic_only": strategic_only, "update": update, From 41843e56521df71d06fd6663f892e7fd23e82c04 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:09:34 +0200 Subject: [PATCH 031/184] Launch ordered-opponent teacher distillation on separate GPU pools --- ai/strong/experiments.json | 39 +++++++++++++++++++++- ai/strong/launch-multiplayer-distill-v2.sh | 24 +++++++++++++ ai/strong/multiplayer-progress.json | 8 +++-- 3 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 ai/strong/launch-multiplayer-distill-v2.sh diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 58798d4..2371dd4 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -106,7 +106,9 @@ "multiplayer-p5-economic-6p": "6abd4db4404719ba37613fd7", "multiplayer-p5-a260-3p": "6abd4dce404719ba37613fdc", "multiplayer-p5-search-probe-6p": "6abd4dcffbc85ba68235c3ae", - "multiplayer-distillation-v1-hard-canceled-queued": "6abd4d17fbc85ba68235c391" + "multiplayer-distillation-v1-hard-canceled-queued": "6abd4d17fbc85ba68235c391", + "multiplayer-distillation-v2-soft": "6abd5021fbc85ba68235c463", + "multiplayer-distillation-v2-hard": "6abd5022404719ba37614022" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -1244,6 +1246,41 @@ "hard": 1.3058999043965747, "soft": 1.3987828060399936 } + }, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "6892efae963a1a0611b485c7afd26b3e965c5416fc2b9e6724691ebf4bd41226", + "max_logit_error": 0.0, + "max_value_error": 5.960464477539063e-08, + "all_actions_match": true, + "specialist_route_counts": {} } + }, + "multiplayer_distillation_v2": { + "status": "submitted", + "architecture": "multiplayer_ordered", + "source_archive": "strong-source-v20.tgz", + "source_revision": "c259cc1664fe39565bdbdd5d64789c9825a62692", + "dataset_revision": "082ca1456736940ee32c96db3ad1bc4e4d0b206b", + "jobs": { + "soft": { + "id": "6abd5021fbc85ba68235c463", + "flavor": "l4x1" + }, + "hard": { + "id": "6abd5022404719ba37614022", + "flavor": "h200" + } + }, + "supersedes": "Both v1 runs were verified canceled while queued; no v1 teacher model was trained." } } diff --git a/ai/strong/launch-multiplayer-distill-v2.sh b/ai/strong/launch-multiplayer-distill-v2.sh new file mode 100644 index 0000000..4e85648 --- /dev/null +++ b/ai/strong/launch-multiplayer-distill-v2.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -euo pipefail +revision=${1:?Pin completed dataset revision} +mode=${2:-soft} +[[ "$mode" == hard || "$mode" == soft ]] +hf jobs run --detach --flavor "${HF_FLAVOR:-a10g-large}" --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME="multiplayer-distillation-v2-$mode" --env TARGET_MODE="$mode" --env TRAIN_SEED=622 --env ARCHITECTURE=multiplayer_ordered --env DATA_REVISION="$revision" --env EPOCHS=20 --env DATA_VERSION=multiplayer-teacher-v1 --env SHARDS=5 --env DISAGREEMENT_WEIGHT=2 \ + --label project=powergrid-ai --label stage="multiplayer-distillation-v2-$mode" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnx==1.20.1 onnxruntime==1.30.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v20.tgz\",repo_type=\"dataset\",revision=\"c259cc1664fe39565bdbdd5d64789c9825a62692\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python ai/strong/test_teacher_contract.py +python ai/strong/test_model_v4.py +python -u ai/strong/distill.py +' diff --git a/ai/strong/multiplayer-progress.json b/ai/strong/multiplayer-progress.json index 4efbe9e..f0783ff 100644 --- a/ai/strong/multiplayer-progress.json +++ b/ai/strong/multiplayer-progress.json @@ -1,5 +1,5 @@ { - "status": "network restored; soft and hard multiplayer distillation submitted to HF", + "status": "ordered-opponent architecture verified; v2 teacher distillation submitted on L4/H200", "feature_revision": "4.0-multiplayer", "scope": { "map": "Germany", @@ -25,7 +25,9 @@ "action": 98, "player_slots": 6, "player_width": 74, - "value": "six slots with inactive players masked to zero" + "value": "six slots with inactive players masked to zero", + "architecture": "multiplayer_ordered", + "parameters": 983682 }, "verified": { "complete_games": 20, @@ -47,7 +49,7 @@ "teacher_truncated_rollouts": 0 }, "pending": [ - "Complete HF pipeline run and inspect count-specific learning stability", + "Collect original pooled-architecture pipeline completion as a development baseline", "Collect and validate all 1200 HF teacher games; pin immutable dataset revision", "Run prepared multiplayer distillation with whole-game stratified validation on HF", "Refine distilled policy against strong opponents and self-play on HF", From 42ed8416f1cd3c3b1317e9e5e602f512366335c5 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:15:40 +0200 Subject: [PATCH 032/184] Record restored HF access and completed multiplayer baseline --- ai/strong/experiments.json | 145 +++++++++++++++++++++++++++++++++++-- 1 file changed, 140 insertions(+), 5 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 2371dd4..8686abe 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -717,7 +717,7 @@ "failed_attempt": "soft launcher failed resolving Hugging Face during whoami, before job submission", "network_permission_request": "returned no network grant", "existing_pipeline_job": "6abd41d2404719ba37613e0f", - "existing_pipeline_status": "RUNNING, revalidated after network restoration", + "existing_pipeline_status": "COMPLETED", "offline_preflight": { "purpose": "Offline CPU preflight only; no training", "shards": 5, @@ -1266,7 +1266,7 @@ } }, "multiplayer_distillation_v2": { - "status": "submitted", + "status": "active", "architecture": "multiplayer_ordered", "source_archive": "strong-source-v20.tgz", "source_revision": "c259cc1664fe39565bdbdd5d64789c9825a62692", @@ -1274,13 +1274,148 @@ "jobs": { "soft": { "id": "6abd5021fbc85ba68235c463", - "flavor": "l4x1" + "flavor": "l4x1", + "status": { + "stage": "SCHEDULING", + "message": "Waiting for requested hardware to become available" + } }, "hard": { "id": "6abd5022404719ba37614022", - "flavor": "h200" + "flavor": "h200", + "status": { + "stage": "RUNNING" + } } }, - "supersedes": "Both v1 runs were verified canceled while queued; no v1 teacher model was trained." + "supersedes": "Both v1 runs were verified canceled while queued; no v1 teacher model was trained.", + "checked_at": "2026-09-30T18:15:28.274201+00:00", + "hard_data_loaded": { + "training_positions": 115144, + "validation_positions": 27660, + "player_counts": [ + 2, + 3, + 4, + 5, + 6 + ] + } + }, + "multiplayer_pipeline_completion": { + "job_id": "6abd41d2404719ba37613e0f", + "status": { + "stage": "COMPLETED" + }, + "model_repository_revision": "a0b9535d1b5aed4b5210272c22e0018b21e32e0d", + "training_updates": 10, + "episodes": 1200, + "truncated": 0, + "last_selection_evaluation": { + "update": 9, + "results": { + "2p/economic": { + "games": 16, + "win": 0.5, + "truncated": 0 + }, + "2p/heuristic": { + "games": 16, + "win": 0.6875, + "truncated": 0 + }, + "2p/rush": { + "games": 16, + "win": 0.75, + "truncated": 0 + }, + "2p/legacy": { + "games": 16, + "win": 0.875, + "truncated": 0 + }, + "3p/economic": { + "games": 24, + "win": 0.625, + "truncated": 0 + }, + "3p/heuristic": { + "games": 24, + "win": 0.8333333333333334, + "truncated": 0 + }, + "3p/rush": { + "games": 24, + "win": 0.3333333333333333, + "truncated": 0 + }, + "3p/legacy": { + "games": 24, + "win": 0.9166666666666666, + "truncated": 0 + }, + "4p/economic": { + "games": 32, + "win": 0.5, + "truncated": 0 + }, + "4p/heuristic": { + "games": 32, + "win": 0.9375, + "truncated": 0 + }, + "4p/rush": { + "games": 32, + "win": 0.4375, + "truncated": 0 + }, + "4p/legacy": { + "games": 32, + "win": 0.875, + "truncated": 0 + }, + "5p/economic": { + "games": 40, + "win": 0.4, + "truncated": 0 + }, + "5p/heuristic": { + "games": 40, + "win": 0.825, + "truncated": 0 + }, + "5p/rush": { + "games": 40, + "win": 0.65, + "truncated": 0 + }, + "5p/legacy": { + "games": 40, + "win": 0.925, + "truncated": 0 + }, + "6p/economic": { + "games": 48, + "win": 0.3958333333333333, + "truncated": 0 + }, + "6p/heuristic": { + "games": 48, + "win": 0.8541666666666666, + "truncated": 0 + }, + "6p/rush": { + "games": 48, + "win": 0.3958333333333333, + "truncated": 0 + }, + "6p/legacy": { + "games": 48, + "win": 0.8958333333333334, + "truncated": 0 + } + } + }, + "scope": "Short pooled-architecture baseline. Selection evaluations have only two independent deals per count; not strength qualification." } } From a4f3d54b8408b88f37d98befec55aa0e9beabb3d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:17:03 +0200 Subject: [PATCH 033/184] Prepare balanced multiplayer refinement from screened teacher checkpoint --- ai/strong/experiments.json | 14 ++++++++++ ai/strong/launch-multiplayer-refine-v1.sh | 33 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 ai/strong/launch-multiplayer-refine-v1.sh diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 8686abe..b57e848 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1417,5 +1417,19 @@ } }, "scope": "Short pooled-architecture baseline. Selection evaluations have only two independent deals per count; not strength qualification." + }, + "multiplayer_refinement_preparation": { + "launcher": "ai/strong/launch-multiplayer-refine-v1.sh", + "status": "prepared, not submitted", + "source_revision": "c259cc1664fe39565bdbdd5d64789c9825a62692", + "architecture": "multiplayer_ordered", + "mixed_player_counts": true, + "envs": 240, + "workers": 16, + "updates": 80, + "opponent_mode": "mixed_search", + "anchor_policy": "initial", + "selection_requirement": "Pin independently screened teacher checkpoint before dispatch", + "compute_rationale": "Prior six-player rollouts took about 648 seconds versus about 8 seconds optimization. Prefer CPU capacity and parallel environments; GPU memory occupancy is not the optimization target." } } diff --git a/ai/strong/launch-multiplayer-refine-v1.sh b/ai/strong/launch-multiplayer-refine-v1.sh new file mode 100644 index 0000000..4fe5e74 --- /dev/null +++ b/ai/strong/launch-multiplayer-refine-v1.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Warm-start balanced 2–6 player PPO after independent teacher-model screening. +set -euo pipefail +checkpoint=${1:?Supply selected ordered-model checkpoint path} +revision=${2:?Pin its immutable model repository commit} +run=${3:?Supply a unique refinement run name} +[[ "$revision" =~ ^[0-9a-f]{40}$ ]] +[[ "$checkpoint" == runs/*/best.pt ]] +[[ "$run" =~ ^[a-zA-Z0-9_-]+$ ]] +hf jobs run --detach --flavor "${HF_FLAVOR:-h200}" --timeout 12h \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env INIT_CHECKPOINT="$checkpoint" --env INIT_REVISION="$revision" --env ANCHOR_POLICY=initial \ + --env ARCHITECTURE=multiplayer_ordered --env MIX_PLAYER_COUNTS=1 --env OPPONENT_MODE=mixed_search \ + --env RUN_NAME="$run" --env TRAIN_SEED="${TRAIN_SEED:-623}" \ + --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.03 \ + --env UPDATES="${UPDATES:-80}" --env EVAL_EVERY=10 \ + --env ENVS=240 --env WORKERS="${WORKERS:-16}" --env BATCH_SIZE=512 \ + --label project=powergrid-ai --label stage="$run" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnx==1.20.1 onnxruntime==1.30.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v20.tgz\",repo_type=\"dataset\",revision=\"c259cc1664fe39565bdbdd5d64789c9825a62692\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python ai/strong/test_teacher_contract.py +python ai/strong/test_model_v4.py +python ai/strong/test_multiplayer_bridge.py +python -u ai/strong/train.py +' From 5614ffe55c7fc8efecb66957500d0287f5ed407a Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:19:20 +0200 Subject: [PATCH 034/184] Screen ordered teacher model on independent two-player and frozen-policy arenas --- ai/strong/experiments.json | 39 +++++++++++++++++++++++++++ ai/strong/launch-multiplayer-arena.sh | 4 +++ 2 files changed, 43 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b57e848..3101746 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1431,5 +1431,44 @@ "anchor_policy": "initial", "selection_requirement": "Pin independently screened teacher checkpoint before dispatch", "compute_rationale": "Prior six-player rollouts took about 648 seconds versus about 8 seconds optimization. Prefer CPU capacity and parallel environments; GPU memory occupancy is not the optimization target." + }, + "multiplayer_hard_e10_screening": { + "candidate": { + "status": "development", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "architecture": "multiplayer_ordered", + "feature_revision": "4.0-multiplayer", + "epoch": 10 + }, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "max_logit_error": 3.4332275390625e-05, + "max_value_error": 2.6226043701171875e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": { + "economic_2p": "6abd5271404719ba3761405e", + "a260_3p": "6abd5295fbc85ba68235c4ee" + }, + "canceled_invalid_opponent_argument": "6abd5279404719ba37614060", + "games": { + "economic_2p": 320, + "a260_3p": 480 + }, + "independent_deals": 40, + "scope": "Development seeds shared with pooled baseline for comparison, separate from teacher data and reserved final seeds." } } diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index 30e003a..2d22a6a 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail # name model-path revision opponent samples geography games seed +case "${4:?opponent}" in + economic|heuristic|rush|legacy|search|search_geo) ;; + *) echo "Unsupported opponent mode; use OPPONENT_MODEL_PATH for a frozen model" >&2; exit 2 ;; +esac extra_env=() if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then extra_env+=(--env "OPPONENT_MODEL_PATH=$OPPONENT_MODEL_PATH" --env "OPPONENT_MODEL_REVISION=${OPPONENT_MODEL_REVISION:?pin opponent revision}") From fe89ded8b83d5dc70efe87011eca64fe96c34214 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:21:11 +0200 Subject: [PATCH 035/184] Benchmark trained ordered model on 8840U and retain best teacher epoch --- ai/strong/experiments.json | 102 ++++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 3101746..aa9db1b 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1284,7 +1284,7 @@ "id": "6abd5022404719ba37614022", "flavor": "h200", "status": { - "stage": "RUNNING" + "stage": "COMPLETED" } } }, @@ -1300,6 +1300,19 @@ 5, 6 ] + }, + "hard_completion": { + "repository_revision": "8ffdf35738a0f6b68114febb3b375a78106c0e8c", + "best_epoch": 10, + "best_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "selection_scores": { + "0": 0.22111111111111112, + "5": 0.25958333333333333, + "10": 0.44916666666666666, + "15": 0.3884722222222222, + "20": 0.2668055555555556 + }, + "interpretation": "Later epochs lower training loss but worsen small-sample game selection score; retain epoch 10 pending broad independent screening." } }, "multiplayer_pipeline_completion": { @@ -1469,6 +1482,91 @@ "a260_3p": 480 }, "independent_deals": 40, - "scope": "Development seeds shared with pooled baseline for comparison, separate from teacher data and reserved final seeds." + "scope": "Development seeds shared with pooled baseline for comparison, separate from teacher data and reserved final seeds.", + "amd8840u_benchmark": { + "hostname": "coyotte508-4X4-BOX-8840U", + "processor_model": "AMD Ryzen 7 8840U w/ Radeon 780M Graphics", + "python_version": "3.12.3", + "positions": 2553, + "by_player_count": { + "2": { + "positions": 349, + "p95_ms": 3.95037000416778 + }, + "3": { + "positions": 427, + "p95_ms": 3.4167905934737064 + }, + "4": { + "positions": 527, + "p95_ms": 4.352853006275836 + }, + "5": { + "positions": 609, + "p95_ms": 4.413062802632339 + }, + "6": { + "positions": 641, + "p95_ms": 5.718704996979795 + } + }, + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "all_moves_legal": true, + "search_samples": 0, + "search_scope": "all", + "geographic_search": false, + "cold_start_ms": 171.4546720031649, + "warm_roundtrip_p50_ms": 2.072249502816703, + "warm_roundtrip_p95_ms": 4.7730467063956885, + "worker_p95_ms": 2.8293874551309264, + "max_roundtrip_ms": 171.4546720031649, + "search_decisions": 0, + "search_evaluations": 0, + "search_truncated_rollouts": 0, + "search_roundtrip_p50_ms": null, + "search_roundtrip_p95_ms": null, + "by_phase": { + "Auction": { + "positions": 840, + "p50_ms": 2.002690998779144, + "p95_ms": 4.439569146052236, + "max_ms": 171.4546720031649 + }, + "Resources": { + "positions": 755, + "p50_ms": 2.045212997472845, + "p95_ms": 4.881730204215273, + "max_ms": 7.542260995251127 + }, + "Building": { + "positions": 491, + "p50_ms": 2.3341699998127297, + "p95_ms": 5.320301999745425, + "max_ms": 7.003602993790992 + }, + "Bureaucracy": { + "positions": 467, + "p50_ms": 2.047267000307329, + "p95_ms": 4.796132692717947, + "max_ms": 7.277851007529534 + } + } + }, + "package_verification": { + "all_hashes_match": true, + "files_verified": 1203, + "positions_verified": 80, + "player_counts": [ + 2, + 3, + 4, + 5, + 6 + ], + "all_moves_legal": true, + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c" + }, + "remote_research_directory": "~/powergrid-ai-multiplayer-hard-e10", + "deployment_status": "Research benchmark only; no production routing changed" } } From 9ab5fd70e71b170372df5c9a76189a184e9bfcd7 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:23:35 +0200 Subject: [PATCH 036/184] Audit ambiguous teacher labels and broaden independent ordered-model screening --- ai/strong/audit-teacher-margins.py | 61 +++++++ ai/strong/experiments.json | 249 ++++++++++++++++++++++++++++- 2 files changed, 307 insertions(+), 3 deletions(-) create mode 100644 ai/strong/audit-teacher-margins.py diff --git a/ai/strong/audit-teacher-margins.py b/ai/strong/audit-teacher-margins.py new file mode 100644 index 0000000..e1d0eff --- /dev/null +++ b/ai/strong/audit-teacher-margins.py @@ -0,0 +1,61 @@ +"""Measure ambiguity in held-out search labels; estimates are not true win values.""" + +import argparse +from collections import defaultdict +import gzip +import json +from pathlib import Path +from teacher_contract import validation_seeds + +p = argparse.ArgumentParser() +p.add_argument("dataset_directory", type=Path) +p.add_argument("--output", type=Path, required=True) +a = p.parse_args() +paths = sorted(a.dataset_directory.glob("*.jsonl.gz")) +assert len(paths) == 5 +metadata = [] +for path in paths: + with gzip.open(path, "rt") as source: + for line in source: + game = json.loads(line) + metadata.append( + { + **{ + k: game[k] for k in ["seed", "playerCount", "variant", "sealed"] + }, + "rows": [{"seat": r["seat"]} for r in game["rows"]], + } + ) +held_out = validation_seeds(metadata) +groups = defaultdict(lambda: defaultdict(int)) +for path in paths: + with gzip.open(path, "rt") as source: + for line in source: + game = json.loads(line) + if game["seed"] not in held_out: + continue + for row in game["rows"]: + for key in [ + str(game["playerCount"]), + f"{game['playerCount']}/{row['phase']}", + ]: + g = groups[key] + g["positions"] += 1 + values = sorted([v for _, v in row["searchValues"]], reverse=True) + if len(values) < 2: + g["fewer_than_two_searched_candidates"] += 1 + continue + g["search_comparisons"] += 1 + margin = values[0] - values[1] + g["tied_top_estimates"] += margin < 1e-9 + g["top_gap_at_most_one_of_16_rollouts"] += margin <= 1 / 16 + 1e-9 + if not row["teacherAgrees"]: + g["teacher_disagreements"] += 1 + g["disagreements_with_tied_top"] += margin < 1e-9 +report = { + "scope": "Held-out teacher states; finite 16-rollout estimates, not calibrated confidence or true action quality.", + "validation_games": len(held_out), + "groups": dict(groups), +} +a.output.write_text(json.dumps(report, indent=2) + "\n") +print(json.dumps({k: v for k, v in groups.items() if "/" not in k})) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index aa9db1b..e0cea7a 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1474,12 +1474,20 @@ }, "jobs": { "economic_2p": "6abd5271404719ba3761405e", - "a260_3p": "6abd5295fbc85ba68235c4ee" + "a260_3p": "6abd5295fbc85ba68235c4ee", + "economic_3p": "6abd5348fbc85ba68235c51c", + "economic_4p": "6abd5349404719ba3761406f", + "economic_5p": "6abd5349404719ba37614071", + "economic_6p": "6abd534a404719ba37614073" }, "canceled_invalid_opponent_argument": "6abd5279404719ba37614060", "games": { "economic_2p": 320, - "a260_3p": 480 + "a260_3p": 480, + "economic_3p": 480, + "economic_4p": 640, + "economic_5p": 800, + "economic_6p": 960 }, "independent_deals": 40, "scope": "Development seeds shared with pooled baseline for comparison, separate from teacher data and reserved final seeds.", @@ -1567,6 +1575,241 @@ "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c" }, "remote_research_directory": "~/powergrid-ai-multiplayer-hard-e10", - "deployment_status": "Research benchmark only; no production routing changed" + "deployment_status": "Research benchmark only; no production routing changed", + "economic_2p_result": { + "games": 320, + "win_rate": 0.5046875, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.425, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.5375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.65 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.6375 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.4515625, + 0.559375 + ] + } + }, + "multiplayer_teacher_margin_audit": { + "scope": "Held-out teacher states; finite 16-rollout estimates, not calibrated confidence or true action quality.", + "validation_games": 232, + "groups": { + "2": { + "positions": 7393, + "search_comparisons": 2708, + "tied_top_estimates": 1587, + "top_gap_at_most_one_of_16_rollouts": 2202, + "teacher_disagreements": 1037, + "disagreements_with_tied_top": 284, + "fewer_than_two_searched_candidates": 4685 + }, + "2/Auction": { + "positions": 1792, + "search_comparisons": 1495, + "tied_top_estimates": 818, + "top_gap_at_most_one_of_16_rollouts": 1191, + "teacher_disagreements": 646, + "disagreements_with_tied_top": 165, + "fewer_than_two_searched_candidates": 297 + }, + "2/Resources": { + "positions": 2890, + "fewer_than_two_searched_candidates": 2890 + }, + "2/Building": { + "positions": 1213, + "search_comparisons": 1213, + "tied_top_estimates": 769, + "top_gap_at_most_one_of_16_rollouts": 1011, + "teacher_disagreements": 391, + "disagreements_with_tied_top": 119 + }, + "2/Bureaucracy": { + "positions": 1498, + "fewer_than_two_searched_candidates": 1498 + }, + "3": { + "positions": 5975, + "search_comparisons": 2331, + "tied_top_estimates": 1385, + "top_gap_at_most_one_of_16_rollouts": 1858, + "teacher_disagreements": 900, + "disagreements_with_tied_top": 276, + "fewer_than_two_searched_candidates": 3644 + }, + "3/Auction": { + "positions": 1582, + "search_comparisons": 1346, + "tied_top_estimates": 709, + "top_gap_at_most_one_of_16_rollouts": 1021, + "teacher_disagreements": 606, + "disagreements_with_tied_top": 171, + "fewer_than_two_searched_candidates": 236 + }, + "3/Resources": { + "positions": 2292, + "fewer_than_two_searched_candidates": 2292 + }, + "3/Building": { + "positions": 985, + "search_comparisons": 985, + "tied_top_estimates": 676, + "top_gap_at_most_one_of_16_rollouts": 837, + "teacher_disagreements": 294, + "disagreements_with_tied_top": 105 + }, + "3/Bureaucracy": { + "positions": 1116, + "fewer_than_two_searched_candidates": 1116 + }, + "4": { + "positions": 5768, + "search_comparisons": 2333, + "tied_top_estimates": 1474, + "top_gap_at_most_one_of_16_rollouts": 1969, + "teacher_disagreements": 791, + "disagreements_with_tied_top": 203, + "fewer_than_two_searched_candidates": 3435 + }, + "4/Auction": { + "positions": 1560, + "search_comparisons": 1375, + "tied_top_estimates": 789, + "top_gap_at_most_one_of_16_rollouts": 1127, + "teacher_disagreements": 543, + "disagreements_with_tied_top": 130, + "fewer_than_two_searched_candidates": 185 + }, + "4/Resources": { + "positions": 2246, + "fewer_than_two_searched_candidates": 2246 + }, + "4/Building": { + "positions": 958, + "search_comparisons": 958, + "tied_top_estimates": 685, + "top_gap_at_most_one_of_16_rollouts": 842, + "teacher_disagreements": 248, + "disagreements_with_tied_top": 73 + }, + "4/Bureaucracy": { + "positions": 1004, + "fewer_than_two_searched_candidates": 1004 + }, + "5": { + "positions": 4117, + "search_comparisons": 1782, + "tied_top_estimates": 1133, + "top_gap_at_most_one_of_16_rollouts": 1469, + "teacher_disagreements": 625, + "disagreements_with_tied_top": 170, + "fewer_than_two_searched_candidates": 2335 + }, + "5/Auction": { + "positions": 1214, + "search_comparisons": 1088, + "tied_top_estimates": 645, + "top_gap_at_most_one_of_16_rollouts": 882, + "teacher_disagreements": 436, + "disagreements_with_tied_top": 121, + "fewer_than_two_searched_candidates": 126 + }, + "5/Resources": { + "positions": 1506, + "fewer_than_two_searched_candidates": 1506 + }, + "5/Building": { + "positions": 694, + "search_comparisons": 694, + "tied_top_estimates": 488, + "top_gap_at_most_one_of_16_rollouts": 587, + "teacher_disagreements": 189, + "disagreements_with_tied_top": 49 + }, + "5/Bureaucracy": { + "positions": 703, + "fewer_than_two_searched_candidates": 703 + }, + "6": { + "positions": 4407, + "search_comparisons": 2019, + "tied_top_estimates": 1193, + "top_gap_at_most_one_of_16_rollouts": 1565, + "teacher_disagreements": 739, + "disagreements_with_tied_top": 185, + "fewer_than_two_searched_candidates": 2388 + }, + "6/Auction": { + "positions": 1374, + "search_comparisons": 1250, + "tied_top_estimates": 684, + "top_gap_at_most_one_of_16_rollouts": 952, + "teacher_disagreements": 518, + "disagreements_with_tied_top": 127, + "fewer_than_two_searched_candidates": 124 + }, + "6/Resources": { + "positions": 1505, + "fewer_than_two_searched_candidates": 1505 + }, + "6/Building": { + "positions": 769, + "search_comparisons": 769, + "tied_top_estimates": 509, + "top_gap_at_most_one_of_16_rollouts": 613, + "teacher_disagreements": 221, + "disagreements_with_tied_top": 58 + }, + "6/Bureaucracy": { + "positions": 759, + "fewer_than_two_searched_candidates": 759 + } + } } } From 2787ffb06554051d00bb034acfa76b8575bc8ce1 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:25:49 +0200 Subject: [PATCH 037/184] Record multiplayer screening and launch balanced terminal-reward refinement --- ai/strong/experiments.json | 324 ++++++++++++++++++++++++++++++++++++- 1 file changed, 320 insertions(+), 4 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e0cea7a..cf1b016 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1273,11 +1273,10 @@ "dataset_revision": "082ca1456736940ee32c96db3ad1bc4e4d0b206b", "jobs": { "soft": { - "id": "6abd5021fbc85ba68235c463", - "flavor": "l4x1", + "id": "6abd53d4404719ba37614088", + "flavor": "h200", "status": { - "stage": "SCHEDULING", - "message": "Waiting for requested hardware to become available" + "stage": "submitted" } }, "hard": { @@ -1313,6 +1312,13 @@ "20": 0.2668055555555556 }, "interpretation": "Later epochs lower training loss but worsen small-sample game selection score; retain epoch 10 pending broad independent screening." + }, + "soft_reschedule": { + "previous_job": "6abd5021fbc85ba68235c463", + "previous_status": "CANCELED before start, verified", + "replacement_job": "6abd53d4404719ba37614088", + "flavor": "h200", + "reason": "L4 waited over 15 minutes; H200 successfully completed identical hard-target workload." } }, "multiplayer_pipeline_completion": { @@ -1634,6 +1640,301 @@ 0.4515625, 0.559375 ] + }, + "economic_3p_result": { + "games": 480, + "win_rate": 0.5020833333333333, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.425, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.5333333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.3416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.44166666666666665 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5583333333333333, + 0.725 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5333333333333333, + 0.6666666666666666 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.4583333333333333, + 0.54375 + ] + }, + "economic_4p_result": { + "games": 640, + "win_rate": 0.50390625, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.4, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.475 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.453125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.365625, + 0.540625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.61875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55, + 0.6875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.46875, + 0.61875 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.46015625, + 0.54609375 + ] + }, + "economic_5p_result": { + "games": 800, + "win_rate": 0.539375, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.4825, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4125, + 0.555 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.455, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.385, + 0.525 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.655, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.595, + 0.72 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.565, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.49, + 0.64 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.505625, + 0.571875 + ] + }, + "a260_3p_result": { + "games": 480, + "win_rate": 0.19583333333333333, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.19166666666666668, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.26666666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.18333333333333332, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1, + 0.275 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.25, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15833333333333333, + 0.35 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.15833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.09166666666666666, + 0.23333333333333334 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.15208333333333332, + 0.24375 + ] + }, + "economic_6p_result": { + "games": 960, + "win_rate": 0.45416666666666666, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.37083333333333335, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.43333333333333335 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.35, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.29791666666666666, + 0.4041666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.5666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.49166666666666664, + 0.6416666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.5291666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.45, + 0.6083333333333333 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.41770833333333335, + 0.4875 + ] } }, "multiplayer_teacher_margin_audit": { @@ -1811,5 +2112,20 @@ "fewer_than_two_searched_candidates": 759 } } + }, + "multiplayer_refine_hard_v1": { + "job_id": "6abd541cfbc85ba68235c542", + "flavor": "a10g-large", + "workers": 8, + "envs": 240, + "updates": 80, + "mixed_player_counts": true, + "initial_checkpoint": "runs/multiplayer-distillation-v2-hard/best.pt", + "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "source_revision": "c259cc1664fe39565bdbdd5d64789c9825a62692", + "architecture": "multiplayer_ordered", + "opponent_mode": "mixed_search", + "anchor_policy": "initial", + "rationale": "Independent screening shows higher-count improvement but inadequate 2p and frozen 3p performance. Test terminal-reward refinement while preserving teacher model for comparison; not a promoted candidate." } } From 9162188e2f93cf8bdc8a13f8d48e4ff8b0920939 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:26:38 +0200 Subject: [PATCH 038/184] Quantify paired multiplayer gains and unresolved two-player weakness --- ai/strong/experiments.json | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index cf1b016..009faef 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1935,6 +1935,63 @@ 0.41770833333333335, 0.4875 ] + }, + "paired_comparison_to_pooled": { + "2": { + "games": 320, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + -0.13125, + 0.0203125 + ], + "win_rate_delta": -0.0546875, + "scope": "Paired development comparison; same independent deals, seats and rules. Positive means ordered teacher model wins more often." + }, + "3": { + "games": 480, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.00625, + 0.12291666666666666 + ], + "win_rate_delta": 0.06458333333333334, + "scope": "Paired development comparison; same independent deals, seats and rules. Positive means ordered teacher model wins more often." + }, + "4": { + "games": 640, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1015625, + 0.21484375 + ], + "win_rate_delta": 0.16015625, + "scope": "Paired development comparison; same independent deals, seats and rules. Positive means ordered teacher model wins more often." + }, + "5": { + "games": 800, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.098125, + 0.20875 + ], + "win_rate_delta": 0.151875, + "scope": "Paired development comparison; same independent deals, seats and rules. Positive means ordered teacher model wins more often." + }, + "6": { + "games": 960, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.07604166666666666, + 0.16927083333333334 + ], + "win_rate_delta": 0.12291666666666666, + "scope": "Paired development comparison; same independent deals, seats and rules. Positive means ordered teacher model wins more often." + } } }, "multiplayer_teacher_margin_audit": { From 1b87302d6306816b902884480076180818725ddf Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:30:43 +0200 Subject: [PATCH 039/184] Launch paired search recovery experiment and track active soft-target training --- ai/strong/experiments.json | 74 +++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 009faef..3dca339 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1276,7 +1276,7 @@ "id": "6abd53d4404719ba37614088", "flavor": "h200", "status": { - "stage": "submitted" + "stage": "RUNNING" } }, "hard": { @@ -2184,5 +2184,77 @@ "opponent_mode": "mixed_search", "anchor_policy": "initial", "rationale": "Independent screening shows higher-count improvement but inadequate 2p and frozen 3p performance. Test terminal-reward refinement while preserving teacher model for comparison; not a promoted candidate." + }, + "multiplayer_search_recovery_2p": { + "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "opponent": "economic", + "games_per_arm": 160, + "independent_deals": 20, + "seed": "multiplayer-search-recovery-v1-2p", + "jobs": { + "search48_geographic": "6abd54b8404719ba3761409e", + "raw_control": "6abd54c3fbc85ba68235c558" + }, + "purpose": "Paired development experiment on whether runtime search recovers two-player weakness; separate strength/latency tradeoff, not final qualification.", + "raw_result": { + "games": 160, + "win_rate": 0.49375, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 40, + "win_rate": 0.55, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.7 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 40, + "win_rate": 0.45, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 40, + "win_rate": 0.575, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.725 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 40, + "win_rate": 0.4, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.225, + 0.575 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.40625, + 0.5875 + ] + } } } From b6d7e96dc14ad1368d3d263f10a96ddb9474a9f8 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:36:16 +0200 Subject: [PATCH 040/184] Screen completed soft-target model and measure search latency on 8840U --- ai/strong/experiments.json | 98 +++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 3dca339..d43d391 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -1276,7 +1276,7 @@ "id": "6abd53d4404719ba37614088", "flavor": "h200", "status": { - "stage": "RUNNING" + "stage": "COMPLETED" } }, "hard": { @@ -2255,6 +2255,102 @@ 0.40625, 0.5875 ] + }, + "amd8840u_benchmark": { + "hostname": "coyotte508-4X4-BOX-8840U", + "processor_model": "AMD Ryzen 7 8840U w/ Radeon 780M Graphics", + "python_version": "3.12.3", + "positions": 349, + "by_player_count": { + "2": { + "positions": 349, + "p95_ms": 4444.561270394479 + } + }, + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "all_moves_legal": true, + "search_samples": 48, + "search_scope": "all", + "geographic_search": true, + "cold_start_ms": 3338.661242989474, + "warm_roundtrip_p50_ms": 4.975974501576275, + "warm_roundtrip_p95_ms": 4444.885748844536, + "worker_p95_ms": 4444.546710541181, + "max_roundtrip_ms": 5988.6466010066215, + "search_decisions": 125, + "search_evaluations": 29328, + "search_truncated_rollouts": 0, + "search_roundtrip_p50_ms": 3031.9444140041014, + "search_roundtrip_p95_ms": 5289.782245203969, + "by_phase": { + "Auction": { + "positions": 89, + "p50_ms": 3228.3607429999392, + "p95_ms": 5302.299627600587, + "max_ms": 5698.2844680023845 + }, + "Resources": { + "positions": 119, + "p50_ms": 3.951420003431849, + "p95_ms": 5.850050295703111, + "max_ms": 7.459674001438543 + }, + "Building": { + "positions": 69, + "p50_ms": 1259.1618620062945, + "p95_ms": 4394.480760997975, + "max_ms": 5988.6466010066215 + }, + "Bureaucracy": { + "positions": 72, + "p50_ms": 3.6588400034816004, + "p95_ms": 6.007221357140224, + "max_ms": 7.891396002378315 + } + } } + }, + "multiplayer_soft_e15_screening": { + "candidate": { + "status": "development", + "model_revision": "74974a0740df2a110baac31ef4c4ce9d4878102e", + "model_path": "runs/multiplayer-distillation-v2-soft/best.onnx", + "model_sha256": "d92f9966c8c6215669a18a5b32f63c7e332650d587b73a753ec53cb696ad1683", + "best_epoch": 15, + "selection_scores": { + "0": 0.22111111111111112, + "5": 0.39763888888888893, + "10": 0.31958333333333333, + "15": 0.43097222222222226, + "20": 0.21791666666666668 + } + }, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "d92f9966c8c6215669a18a5b32f63c7e332650d587b73a753ec53cb696ad1683", + "max_logit_error": 9.1552734375e-05, + "max_value_error": 2.8014183044433594e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": { + "economic_2p": "6abd5682fbc85ba68235c5b3", + "economic_3p": "6abd5683404719ba376140d2", + "economic_4p": "6abd5684404719ba376140d4", + "economic_5p": "6abd5684fbc85ba68235c5b7", + "economic_6p": "6abd5685404719ba376140d6", + "a260_3p": "6abd5693fbc85ba68235c5bb" + }, + "independent_deals_per_count": 40, + "scope": "Development comparison sharing independent seeds with hard and pooled candidates; not final qualification." } } From b29f60953d5d45ce46192eb856ed1a36871f1b9b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:38:48 +0200 Subject: [PATCH 041/184] Record soft-target screening and paired comparison with hard supervision --- ai/strong/experiments.json | 349 ++++++++++++++++++++++++++++++++++++- 1 file changed, 348 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index d43d391..15f31ab 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2351,6 +2351,353 @@ "a260_3p": "6abd5693fbc85ba68235c5bb" }, "independent_deals_per_count": 40, - "scope": "Development comparison sharing independent seeds with hard and pooled candidates; not final qualification." + "scope": "Development comparison sharing independent seeds with hard and pooled candidates; not final qualification.", + "economic_2p_result": { + "games": 320, + "win_rate": 0.5, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.425, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.525 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.65, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.7625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3375, + 0.5625 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.4375, + 0.5625 + ] + }, + "economic_3p_result": { + "games": 480, + "win_rate": 0.528125, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.31666666666666665, + 0.48333333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.5541666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4583333333333333, + 0.6458333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6083333333333333, + 0.7583333333333333 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.475, + 0.5802083333333333 + ] + }, + "economic_4p_result": { + "games": 640, + "win_rate": 0.5609375, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.6125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.40625, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.6125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.53125, + 0.69375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.61875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.7 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.515625, + 0.6046875 + ] + }, + "economic_5p_result": { + "games": 800, + "win_rate": 0.52625, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.43, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.36, + 0.495 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.56, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.485, + 0.635 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.51, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.435, + 0.585 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.605, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.54, + 0.67 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.49, + 0.5625 + ] + }, + "a260_3p_result": { + "games": 480, + "win_rate": 0.23645833333333333, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.15833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.24166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.22083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.3, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.4 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.26666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19166666666666668, + 0.3416666666666667 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.196875, + 0.27708333333333335 + ] + }, + "paired_soft_minus_hard": { + "economic_2p": { + "games": 320, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + -0.08125, + 0.071875 + ], + "win_rate_delta": -0.0046875 + }, + "economic_3p": { + "games": 480, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + -0.041666666666666664, + 0.09375 + ], + "win_rate_delta": 0.026041666666666668 + }, + "economic_4p": { + "games": 640, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.1140625 + ], + "win_rate_delta": 0.05703125 + }, + "economic_5p": { + "games": 800, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + -0.063125, + 0.03625 + ], + "win_rate_delta": -0.013125 + }, + "a260_3p": { + "games": 480, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + -0.014583333333333334, + 0.096875 + ], + "win_rate_delta": 0.040625 + } + } } } From 9889fd8e2b8ee64a23fea04d506043ef19237859 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:40:30 +0200 Subject: [PATCH 042/184] Complete soft-target screening across all player counts --- ai/strong/experiments.json | 72 +++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 15f31ab..7dc1913 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2697,7 +2697,77 @@ 0.096875 ], "win_rate_delta": 0.040625 + }, + "economic_6p": { + "games": 960, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + -0.06980468749999999, + 0.018229166666666668 + ], + "win_rate_delta": -0.026041666666666668 } - } + }, + "economic_6p_result": { + "games": 960, + "win_rate": 0.428125, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.3854166666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.4479166666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.38125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.32083333333333336, + 0.44583333333333336 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.44166666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.5041666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.5041666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.43333333333333335, + 0.575 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.3890625, + 0.4671875 + ] + }, + "status": "all screening completed" } } From a4999e1e1ab5778ea981b728a876eeb5ae436e09 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:41:06 +0200 Subject: [PATCH 043/184] Move queued refinement to H200 with more rollout workers --- ai/strong/experiments.json | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 7dc1913..b49c3d5 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2171,9 +2171,9 @@ } }, "multiplayer_refine_hard_v1": { - "job_id": "6abd541cfbc85ba68235c542", - "flavor": "a10g-large", - "workers": 8, + "job_id": "6abd57b1fbc85ba68235c5fb", + "flavor": "h200", + "workers": 16, "envs": 240, "updates": 80, "mixed_player_counts": true, @@ -2183,7 +2183,18 @@ "architecture": "multiplayer_ordered", "opponent_mode": "mixed_search", "anchor_policy": "initial", - "rationale": "Independent screening shows higher-count improvement but inadequate 2p and frozen 3p performance. Test terminal-reward refinement while preserving teacher model for comparison; not a promoted candidate." + "rationale": "Independent screening shows higher-count improvement but inadequate 2p and frozen 3p performance. Test terminal-reward refinement while preserving teacher model for comparison; not a promoted candidate.", + "rescheduled": { + "previous_job": "6abd541cfbc85ba68235c542", + "previous_status": "CANCELED before start, verified", + "previous_flavor": "a10g-large", + "previous_workers": 8, + "reason": "Waited about 15 minutes for A10G hardware. H200 has successfully run both recent distillation jobs and provides more rollout CPU capacity." + }, + "status": { + "stage": "SCHEDULING", + "message": "Scheduling" + } }, "multiplayer_search_recovery_2p": { "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", From d989a9f742b027d358b08640e5ec9ccdcd0eb07c Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:45:34 +0200 Subject: [PATCH 044/184] Avoid unused replacement fuel calculations during rollout planning --- ai/strong/economics.cjs | 2 +- ai/strong/experiments.json | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ai/strong/economics.cjs b/ai/strong/economics.cjs index 0211f56..caf18b2 100644 --- a/ai/strong/economics.cjs +++ b/ai/strong/economics.cjs @@ -49,7 +49,7 @@ function plan(g, p, target = p.cities.length, { buy = true, unused = false, budg const cost = buy ? purchaseCost(g, p, option.used) : 0; if (cost > budget) continue; const powered = Math.min(target, option.power + (unused ? p.citiesPowered : 0)); - const replacement = option.used.reduce((s, n, i) => s + n * c.resourcePrice(g, c.RES[i]), 0); + const replacement = buy ? 0 : option.used.reduce((s, n, i) => s + n * c.resourcePrice(g, c.RES[i]), 0); const score = (endgame ? powered * 1000 : income(g, powered)) - cost - (buy ? 0 : replacement * 0.2); if (score > best.score) best = { ...option, powered, cost, score }; } diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b49c3d5..cd20406 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2780,5 +2780,33 @@ ] }, "status": "all screening completed" + }, + "rollout_replacement_cost_optimization": { + "change": "Skip replacement fuel price calculation when buy=true; score already discards it in that branch.", + "equivalence": { + "fixtures": 2553, + "scores_identical": true, + "plan_modes_per_fixture": 4, + "full_search_result_identical": true + }, + "timing": { + "baseline": [ + 2.8573514360000445, + 3.1259411280002496, + 3.005175191000035, + 2.9449805059998653 + ], + "optimized": [ + 2.146242207999876, + 2.4928782890001457, + 2.291965985999923, + 2.39531736500021 + ], + "median_speedup": 1.2694252195635467, + "identical_full_search_results": true, + "scope": "One fixed two-player auction search, 48 samples, alternating four process runs per implementation; local CPU only." + }, + "tests": "node --test ai/strong/test.cjs passed", + "deployment": "Local source only; running HF jobs retain pinned source v20/v18." } } From d177f44469a18236eb83de3fbad1ea9c558ef02f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:47:23 +0200 Subject: [PATCH 045/184] Verify rollout speedup on 8840U and pin optimized source for future jobs --- ai/strong/experiments.json | 29 ++++++++++++++++++++++- ai/strong/launch-multiplayer-arena.sh | 2 +- ai/strong/launch-multiplayer-refine-v1.sh | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index cd20406..38aae30 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2807,6 +2807,33 @@ "scope": "One fixed two-player auction search, 48 samples, alternating four process runs per implementation; local CPU only." }, "tests": "node --test ai/strong/test.cjs passed", - "deployment": "Local source only; running HF jobs retain pinned source v20/v18." + "deployment": "Future multiplayer arena and refinement launchers pin v21. Existing jobs retain their original source. AMD benchmark used a separate injected module; frozen package untouched.", + "amd8840u_single_search_benchmark": { + "baseline": [ + 2.907086548002553, + 2.924952880013734, + 2.9167694200004917, + 2.9271296079969034 + ], + "optimized": [ + 2.252641618993948, + 2.2491685319982935, + 2.266650090998155, + 2.246913505005068 + ], + "median_speedup": 1.297638528520945, + "identical_full_search_results": true, + "scope": "AMD8840U single fixed two-player auction; 48 samples; four alternating runs per version" + }, + "source_bundle": { + "archive": "strong-source-v21.tgz", + "revision": "29c6621fa5884a182129ff0ef053a45ad9a76156", + "base_archive": "strong-source-v20.tgz", + "base_revision": "c259cc1664fe39565bdbdd5d64789c9825a62692", + "only_replaced_file": "ai/strong/economics.cjs", + "economics_sha256": "6c90230112d9b20aaa54a1c981a5355dd10952f32c920353483962e8d4e11025", + "archive_sha256": "0c01de0eb3d12a7ac7d69ae7214180e6f9b2dce3b4dc1fd721bb1e6567e2d162", + "git_revision": "d989a9f" + } } } diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index 2d22a6a..8c4318f 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -23,7 +23,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v18.tgz\",repo_type=\"dataset\", revision=\"49cc1bb94678e6ede37b606ae1ce9a8cb2018c1d\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v21.tgz\",repo_type=\"dataset\", revision=\"29c6621fa5884a182129ff0ef053a45ad9a76156\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' diff --git a/ai/strong/launch-multiplayer-refine-v1.sh b/ai/strong/launch-multiplayer-refine-v1.sh index 4fe5e74..32d59d6 100644 --- a/ai/strong/launch-multiplayer-refine-v1.sh +++ b/ai/strong/launch-multiplayer-refine-v1.sh @@ -23,7 +23,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v20.tgz\",repo_type=\"dataset\",revision=\"c259cc1664fe39565bdbdd5d64789c9825a62692\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v21.tgz\",repo_type=\"dataset\",revision=\"29c6621fa5884a182129ff0ef053a45ad9a76156\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace node --test ai/test.cjs ai/strong/test.cjs python ai/strong/test_teacher_contract.py From 8d92a5ce91d676c3ee1c29d62741dc648a2d98f5 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:50:42 +0200 Subject: [PATCH 046/184] Hoist rollout resource lookups with verified semantic equivalence --- ai/strong/economics.cjs | 13 +++-- ai/strong/experiments.json | 67 +++++++++++++++++++++++ ai/strong/launch-multiplayer-arena.sh | 2 +- ai/strong/launch-multiplayer-refine-v1.sh | 2 +- 4 files changed, 78 insertions(+), 6 deletions(-) diff --git a/ai/strong/economics.cjs b/ai/strong/economics.cjs index caf18b2..6cbcc71 100644 --- a/ai/strong/economics.cjs +++ b/ai/strong/economics.cjs @@ -35,11 +35,16 @@ function plans(g, p, unused = false) { } function purchaseCost(g, p, used) { let cost = 0; - for (let i = 0; i < 4; i++) - for (let k = 0; k < Math.max(0, used[i] - p[c.RES[i] + 'Left']); k++) { - if (k >= g[c.RES[i] + 'Market']) return Infinity; - cost += c.resourcePrice(g, c.RES[i], k); + for (let i = 0; i < 4; i++) { + const resource = c.RES[i], + needed = Math.max(0, used[i] - p[resource + 'Left']), + count = g[resource + 'Market'], + prices = g[resource + 'Prices']; + for (let k = 0; k < needed; k++) { + if (k >= count) return Infinity; + cost += prices && count > k ? prices[prices.length - count + k] : 20; } + } return cost; } function plan(g, p, target = p.cities.length, { buy = true, unused = false, budget = p.money, endgame = false } = {}) { diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 38aae30..1895dd5 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2835,5 +2835,72 @@ "archive_sha256": "0c01de0eb3d12a7ac7d69ae7214180e6f9b2dce3b4dc1fd721bb1e6567e2d162", "git_revision": "d989a9f" } + }, + "rollout_purchase_cost_optimization": { + "change": "Hoist resource key, market count, held fuel and price array out of per-unit purchase cost loop; preserve exact summation order and fallback. Includes prior unused-replacement-cost optimization.", + "fixture_equivalence": { + "positions": 2553, + "scores_identical": true, + "plan_modes_per_position": 4 + }, + "search_equivalence": { + "searches": 6, + "counts": [ + 2, + 3, + 6 + ], + "phases": [ + "Auction", + "Building" + ], + "minimum_round": 5, + "identical_results": true, + "evaluations": 264 + }, + "local_timing": { + "baseline": [ + 3.7346250519999558, + 3.717656344000261, + 3.945521218000067, + 4.057125717999952 + ], + "optimized": [ + 2.53055489999997, + 2.676548421999996, + 2.9400776590000532, + 3.200367819999883 + ], + "median_speedup": 1.3673949732884052, + "identical_full_search_results": true + }, + "amd8840u_timing": { + "baseline": [ + 2.9023294590006117, + 2.9474724769970635, + 2.9103795530099887, + 2.961018548012362 + ], + "optimized": [ + 2.0889377550047357, + 2.110661614991841, + 2.1198867430066457, + 2.1356612500094343 + ], + "median_speedup": 1.3846554948206429, + "identical_full_search_results": true, + "scope": "AMD8840U single fixed two-player auction; 48 samples; four alternating runs per version" + }, + "source_bundle": { + "archive": "strong-source-v22.tgz", + "revision": "bcea005fb81ee05c662600b3238cba10d529abc5", + "base_archive": "strong-source-v20.tgz", + "base_revision": "c259cc1664fe39565bdbdd5d64789c9825a62692", + "only_replaced_file": "ai/strong/economics.cjs", + "economics_sha256": "9ce50e386ea39a2e5e09237d6f35a990ae2b51fed8b5649157d1e8c474bff6ba", + "archive_sha256": "7da9575da9f3e2dacc9889ec15d539e923b6324f10e61f4ab2f40a24e42e8213" + }, + "tests": "node --test ai/strong/test.cjs passed", + "scope": "Timing is one fixed 2p auction search; no general latency or strength claim. Existing jobs unchanged." } } diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index 8c4318f..fecce2f 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -23,7 +23,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v21.tgz\",repo_type=\"dataset\", revision=\"29c6621fa5884a182129ff0ef053a45ad9a76156\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v22.tgz\",repo_type=\"dataset\", revision=\"bcea005fb81ee05c662600b3238cba10d529abc5\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' diff --git a/ai/strong/launch-multiplayer-refine-v1.sh b/ai/strong/launch-multiplayer-refine-v1.sh index 32d59d6..be17f8c 100644 --- a/ai/strong/launch-multiplayer-refine-v1.sh +++ b/ai/strong/launch-multiplayer-refine-v1.sh @@ -23,7 +23,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v21.tgz\",repo_type=\"dataset\",revision=\"29c6621fa5884a182129ff0ef053a45ad9a76156\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v22.tgz\",repo_type=\"dataset\",revision=\"bcea005fb81ee05c662600b3238cba10d529abc5\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace node --test ai/test.cjs ai/strong/test.cjs python ai/strong/test_teacher_contract.py From a12deca1772be40c2b6102cc528e7fd9db6cec66 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:53:01 +0200 Subject: [PATCH 047/184] Run HF CPU-training pilot to measure a fallback for GPU queues --- ai/strong/experiments.json | 22 ++++++++++++++++++++++ ai/strong/launch-multiplayer-refine-v1.sh | 3 ++- ai/strong/train.py | 14 ++++++++++---- 3 files changed, 34 insertions(+), 5 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 1895dd5..3c41b8d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2902,5 +2902,27 @@ }, "tests": "node --test ai/strong/test.cjs passed", "scope": "Timing is one fixed 2p auction search; no general latency or strength claim. Existing jobs unchanged." + }, + "multiplayer_cpu_training_pilot": { + "job_id": "6abd5a79fbc85ba68235c670", + "flavor": "cpu-performance", + "device": "cpu", + "torch_threads": 4, + "workers": 16, + "envs": 240, + "updates": 2, + "mixed_player_counts": true, + "source_bundle": { + "archive": "strong-source-v23.tgz", + "revision": "578c024e1cbbdfafa1df11763239ea81954e1e71", + "base_archive": "strong-source-v22.tgz", + "base_revision": "bcea005fb81ee05c662600b3238cba10d529abc5", + "only_replaced_file": "ai/strong/train.py", + "archive_sha256": "c6e89a74cb79334e38dca4036db148fd7146316374f2553a7c788851ee53816b" + }, + "initial_checkpoint": "runs/multiplayer-distillation-v2-hard/best.pt", + "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "run": "multiplayer-refine-cpu-pilot-v1", + "purpose": "Measure whether HF CPU training is viable while GPU capacity is queued; all optimization remains on HF Jobs. Short pilot is not strength qualification." } } diff --git a/ai/strong/launch-multiplayer-refine-v1.sh b/ai/strong/launch-multiplayer-refine-v1.sh index be17f8c..ec7b8ea 100644 --- a/ai/strong/launch-multiplayer-refine-v1.sh +++ b/ai/strong/launch-multiplayer-refine-v1.sh @@ -13,6 +13,7 @@ hf jobs run --detach --flavor "${HF_FLAVOR:-h200}" --timeout 12h \ --env INIT_CHECKPOINT="$checkpoint" --env INIT_REVISION="$revision" --env ANCHOR_POLICY=initial \ --env ARCHITECTURE=multiplayer_ordered --env MIX_PLAYER_COUNTS=1 --env OPPONENT_MODE=mixed_search \ --env RUN_NAME="$run" --env TRAIN_SEED="${TRAIN_SEED:-623}" \ + --env TRAIN_DEVICE="${TRAIN_DEVICE:-cuda}" --env TORCH_THREADS="${TORCH_THREADS:-2}" \ --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.03 \ --env UPDATES="${UPDATES:-80}" --env EVAL_EVERY=10 \ --env ENVS=240 --env WORKERS="${WORKERS:-16}" --env BATCH_SIZE=512 \ @@ -23,7 +24,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v22.tgz\",repo_type=\"dataset\",revision=\"bcea005fb81ee05c662600b3238cba10d529abc5\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v23.tgz\",repo_type=\"dataset\",revision=\"578c024e1cbbdfafa1df11763239ea81954e1e71\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace node --test ai/test.cjs ai/strong/test.cjs python ai/strong/test_teacher_contract.py diff --git a/ai/strong/train.py b/ai/strong/train.py index 0a3749c..c397293 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -31,9 +31,12 @@ seed = int(os.getenv("TRAIN_SEED", "101")) random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) -torch.set_num_threads(2) -device = "cuda" -assert torch.cuda.is_available(), "Training must run on a GPU HF Job" +torch.set_num_threads(int(os.getenv("TORCH_THREADS", "2"))) +device = os.getenv("TRAIN_DEVICE", "cuda") +if device not in ["cuda", "cpu"]: + raise ValueError("TRAIN_DEVICE must be cuda or cpu") +if device == "cuda": + assert torch.cuda.is_available(), "CUDA training requires a GPU HF Job" initial_checkpoint = os.getenv("INIT_CHECKPOINT") initial_revision = os.getenv("INIT_REVISION") checkpoint = None @@ -115,6 +118,7 @@ def save(name, export=False): "strategic_only": strategic_only, "update": update, "mixed_player_counts": mix_player_counts, + "training_device": device, "initial_checkpoint": initial_checkpoint, "initial_revision": initial_revision, "initial_feature_revision": checkpoint.get("feature_revision", "3.0") @@ -282,7 +286,9 @@ try: "parameters": sum(p.numel() for p in net.parameters()), "workers": workers, "envs": nenv, - "gpu": torch.cuda.get_device_name(), + "device": device, + "torch_threads": torch.get_num_threads(), + "gpu": torch.cuda.get_device_name() if device == "cuda" else None, } ), flush=True, From b2cb7ed6f5e7f5eb6751537a479ad5a181c05b0b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:55:17 +0200 Subject: [PATCH 048/184] Record failed six-player search-opponent probe for early baseline --- ai/strong/experiments.json | 69 +++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 3c41b8d..3dcd24a 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -801,7 +801,7 @@ "search_probe_games_6p": 48, "search_probe_independent_deals": 2, "scope": "Development comparisons only; six-player search probe is too small for a strength claim", - "status": "submitted", + "status": "completed development screening; strength gate failed", "economic_2p_result": { "games": 320, "win_rate": 0.559375, @@ -1218,6 +1218,73 @@ ] } ] + }, + "search_probe_6p_result": { + "games": 48, + "win_rate": 0.0, + "truncated": 0, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 12, + "win_rate": 0.0, + "independent_seeds": 2, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 12, + "win_rate": 0.0, + "independent_seeds": 2, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 12, + "win_rate": 0.0, + "independent_seeds": 2, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 12, + "win_rate": 0.0, + "independent_seeds": 2, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + } + ], + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ], + "search_stats": { + "search_geo": { + "decisions": 11223, + "evaluations": 915472, + "truncated": 0 + } + }, + "seconds": 3215.1210224089996 } }, "multiplayer_ordered_architecture": { From 579bd90de8e916a4e21beadb648edf2df3bfc70f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 20:58:32 +0200 Subject: [PATCH 049/184] Expose rollout progress and separate engine from policy timing --- ai/strong/train.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ai/strong/train.py b/ai/strong/train.py index c397293..b5b3cfd 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -301,6 +301,7 @@ try: save("best", export=True) for update in range(updates): start = time.perf_counter() + engine_start = start current = rollout.call( { "op": "reset", @@ -315,6 +316,9 @@ try: "featureRevisions": feature_revisions, } )["observations"] + engine_seconds = time.perf_counter() - engine_start + policy_seconds = 0.0 + last_progress = time.perf_counter() pending = [[] for _ in range(nenv)] batch = [] endings = [] @@ -327,6 +331,7 @@ try: logps = [0.0] * len(rows) values = [[0.0] * (6 if multiplayer else 3)] * len(rows) roles = {r["roles"][r["seat"]] for r in rows} + policy_start = time.perf_counter() for role in roles: indices = [ j for j, r in enumerate(rows) if r["roles"][r["seat"]] == role @@ -351,6 +356,7 @@ try: choice[j] = a logps[j] = lp values[j] = v + policy_seconds += time.perf_counter() - policy_start actions = [None] * nenv for j, i in enumerate(live): actions[i] = choice[j] @@ -365,7 +371,9 @@ try: } ) decisions += 1 + engine_start = time.perf_counter() reply = rollout.call({"op": "step", "actions": actions}) + engine_seconds += time.perf_counter() - engine_start current = reply["observations"] for end in reply["ended"]: endings.append(end) @@ -379,6 +387,32 @@ try: r["advantage"] = r["value"][0] - r["oldvalue"] batch.append(r) pending[end["env"]] = [] + if time.perf_counter() - last_progress >= 60: + active = [r for r in current if r is not None] + print( + json.dumps( + { + "stage": "rollout_progress", + "run": run, + "update": update, + "completed_games": len(endings), + "requested_games": nenv, + "decisions": decisions, + "active_games": len(active), + "active_round_min": min( + (r["round"] for r in active), default=None + ), + "active_round_max": max( + (r["round"] for r in active), default=None + ), + "engine_seconds": engine_seconds, + "policy_seconds": policy_seconds, + "seconds": time.perf_counter() - start, + } + ), + flush=True, + ) + last_progress = time.perf_counter() rollout_seconds = time.perf_counter() - start if not batch: raise RuntimeError("No completed training episodes") @@ -467,6 +501,8 @@ try: "truncated": sum(x["truncated"] for x in endings), "samples": len(batch), "rollout_seconds": rollout_seconds, + "engine_seconds": engine_seconds, + "policy_seconds": policy_seconds, "seconds": time.perf_counter() - start, "loss": float(np.mean(losses)), } From 5484552d2d64864e0d28eaebaf9c0999a89566a4 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:02:34 +0200 Subject: [PATCH 050/184] Launch balanced CPU refinement against stronger geographic-search league --- ai/strong/bridge.cjs | 5 +- ai/strong/experiments.json | 124 +++++++++++++++++++++- ai/strong/launch-multiplayer-refine-v1.sh | 6 +- ai/strong/test_multiplayer_bridge.py | 41 +++++++ 4 files changed, 170 insertions(+), 6 deletions(-) diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index ee827fd..f37f8d4 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -76,6 +76,7 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, player ![ 'mixed', 'mixed_search', + 'mixed_search_geo', 'economic', 'heuristic', 'rush', @@ -93,12 +94,12 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, player seat = learnerSeat ?? Math.floor(id / 4) % playerCount, kind = Math.floor(c.seedrandom(seed + '-opponents-' + id)() * 8); const opponent = - mode === 'mixed' || mode === 'mixed_search' + mode === 'mixed' || mode === 'mixed_search' || mode === 'mixed_search_geo' ? [ 'economic', 'heuristic', 'rush', - mode === 'mixed_search' ? 'search' : 'legacy', + mode === 'mixed_search_geo' ? 'search_geo' : mode === 'mixed_search' ? 'search' : 'legacy', 'selfplay', 'snapshot0', 'snapshot1', diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 3dcd24a..34314a0 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2990,6 +2990,128 @@ "initial_checkpoint": "runs/multiplayer-distillation-v2-hard/best.pt", "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", "run": "multiplayer-refine-cpu-pilot-v1", - "purpose": "Measure whether HF CPU training is viable while GPU capacity is queued; all optimization remains on HF Jobs. Short pilot is not strength qualification." + "purpose": "Measure whether HF CPU training is viable while GPU capacity is queued; all optimization remains on HF Jobs. Short pilot is not strength qualification.", + "first_update": { + "stage": "train", + "run": "multiplayer-refine-cpu-pilot-v1", + "update": 0, + "episodes": 240, + "player_count": "mixed", + "by_player_count": { + "2": { + "episodes": 48, + "truncated": 0, + "samples": 7926 + }, + "3": { + "episodes": 48, + "truncated": 0, + "samples": 8109 + }, + "4": { + "episodes": 48, + "truncated": 0, + "samples": 8788 + }, + "5": { + "episodes": 48, + "truncated": 0, + "samples": 6968 + }, + "6": { + "episodes": 48, + "truncated": 0, + "samples": 8331 + } + }, + "truncated": 0, + "samples": 40122, + "rollout_seconds": 361.7861359352246, + "seconds": 421.67150955926627, + "loss": 0.0672784899416692, + "training_opponents": { + "economic": { + "games": 40, + "wins": 5, + "truncated": 0 + }, + "search": { + "games": 31, + "wins": 4, + "truncated": 0 + }, + "rush": { + "games": 30, + "wins": 5, + "truncated": 0 + }, + "heuristic": { + "games": 31, + "wins": 19, + "truncated": 0 + }, + "snapshot0": { + "games": 28, + "wins": 2, + "truncated": 0 + }, + "snapshot1": { + "games": 27, + "wins": 3, + "truncated": 0 + }, + "snapshot2": { + "games": 27, + "wins": 4, + "truncated": 0 + } + }, + "search_rollouts_reported": true, + "search_stats": { + "search": { + "decisions": 3991, + "evaluations": 64196, + "truncated": 0 + } + } + } + }, + "multiplayer_geoleague_cpu_v1": { + "job_id": "6abd5cb4fbc85ba68235c728", + "run": "multiplayer-refine-geoleague-cpu-v1", + "flavor": "cpu-performance", + "device": "cpu", + "workers": 24, + "torch_threads": 4, + "envs": 240, + "updates": 80, + "timeout": "24h", + "mixed_player_counts": true, + "opponent_mode": "mixed_search_geo", + "opponents": [ + "economic", + "heuristic", + "rush", + "search_geo", + "selfplay", + "snapshot0", + "snapshot1", + "snapshot2" + ], + "search_opponent_samples": 16, + "source_bundle": { + "archive": "strong-source-v24.tgz", + "revision": "0fe849528790ab616c9eddb7caf6ad1c7c2a5966", + "base_revision": "578c024e1cbbdfafa1df11763239ea81954e1e71", + "replaced_files": [ + "ai/strong/train.py", + "ai/strong/bridge.cjs", + "ai/strong/test_multiplayer_bridge.py" + ], + "archive_sha256": "dcd6ee09bfffea572032436c9524a2b1c0ff73946cd77283aac8629b6c3ebc6a" + }, + "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "initial_checkpoint": "runs/multiplayer-distillation-v2-hard/best.pt", + "rationale": "CPU pilot completed 240 balanced games and one update in 422 seconds. Train against stronger geographic search while retaining self-play and frozen snapshots; independent screening still required." } } diff --git a/ai/strong/launch-multiplayer-refine-v1.sh b/ai/strong/launch-multiplayer-refine-v1.sh index ec7b8ea..4cd908f 100644 --- a/ai/strong/launch-multiplayer-refine-v1.sh +++ b/ai/strong/launch-multiplayer-refine-v1.sh @@ -7,11 +7,11 @@ run=${3:?Supply a unique refinement run name} [[ "$revision" =~ ^[0-9a-f]{40}$ ]] [[ "$checkpoint" == runs/*/best.pt ]] [[ "$run" =~ ^[a-zA-Z0-9_-]+$ ]] -hf jobs run --detach --flavor "${HF_FLAVOR:-h200}" --timeout 12h \ +hf jobs run --detach --flavor "${HF_FLAVOR:-h200}" --timeout "${JOB_TIMEOUT:-12h}" \ --secrets HF_TOKEN \ --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ --env INIT_CHECKPOINT="$checkpoint" --env INIT_REVISION="$revision" --env ANCHOR_POLICY=initial \ - --env ARCHITECTURE=multiplayer_ordered --env MIX_PLAYER_COUNTS=1 --env OPPONENT_MODE=mixed_search \ + --env ARCHITECTURE=multiplayer_ordered --env MIX_PLAYER_COUNTS=1 --env OPPONENT_MODE="${OPPONENT_MODE:-mixed_search}" \ --env RUN_NAME="$run" --env TRAIN_SEED="${TRAIN_SEED:-623}" \ --env TRAIN_DEVICE="${TRAIN_DEVICE:-cuda}" --env TORCH_THREADS="${TORCH_THREADS:-2}" \ --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.03 \ @@ -24,7 +24,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v23.tgz\",repo_type=\"dataset\",revision=\"578c024e1cbbdfafa1df11763239ea81954e1e71\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v24.tgz\",repo_type=\"dataset\",revision=\"0fe849528790ab616c9eddb7caf6ad1c7c2a5966\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace node --test ai/test.cjs ai/strong/test.cjs python ai/strong/test_teacher_contract.py diff --git a/ai/strong/test_multiplayer_bridge.py b/ai/strong/test_multiplayer_bridge.py index e35588e..b94dd89 100644 --- a/ai/strong/test_multiplayer_bridge.py +++ b/ai/strong/test_multiplayer_bridge.py @@ -10,6 +10,47 @@ from multiplayer import ROLE_REVISIONS, rotate_outcome class BridgeTests(unittest.TestCase): + def test_stronger_mixture_retains_selfplay_and_all_opponent_families(self): + # Fixed independent RNG seeds exercise every league family through reset. + cases = [ + (8, "economic"), + (2, "heuristic"), + (7, "rush"), + (1, "search_geo"), + (10, "learner"), + (3, "snapshot0"), + (0, "snapshot1"), + (9, "snapshot2"), + ] + for seed, expected in cases: + pool = EnginePool( + 1, seed=f"league-mixture-{seed}", script="ai/strong/bridge.cjs" + ) + try: + for n in range(2, 7): + for mode in ["mixed_search_geo", "mixed_search"]: + row = pool.call( + { + "op": "reset", + "n": 1, + "mode": mode, + "playerCounts": [n], + "offset": 0, + "featureRevisions": ROLE_REVISIONS, + } + )["observations"][0] + opponent = ( + "search" + if expected == "search_geo" and mode == "mixed_search" + else expected + ) + self.assertEqual( + row["roles"], ["learner"] + [opponent] * (n - 1) + ) + self.assertEqual(row["playerCount"], n) + finally: + pool.close() + def test_mixed_training_schedule_covers_every_seat_and_rule(self): pool = EnginePool(3, seed="mixed-count-protocol", script="ai/strong/bridge.cjs") seen = {n: set() for n in range(2, 7)} From 816bca05421c33e2d8568330b272e57e9c986027 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:10:47 +0200 Subject: [PATCH 051/184] Validate completed CPU pilot timing, balanced episodes and trained export --- ai/strong/experiments.json | 238 ++++++++++++++++++++++++++++++++++++- 1 file changed, 237 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 34314a0..cd25e56 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3074,7 +3074,243 @@ "truncated": 0 } } - } + }, + "status": "COMPLETED", + "result_revision": "3b6b60eeae43823db41e898b90e01747db33bd18", + "updates_completed": [ + { + "stage": "train", + "run": "multiplayer-refine-cpu-pilot-v1", + "update": 0, + "episodes": 240, + "player_count": "mixed", + "by_player_count": { + "2": { + "episodes": 48, + "truncated": 0, + "samples": 7926 + }, + "3": { + "episodes": 48, + "truncated": 0, + "samples": 8109 + }, + "4": { + "episodes": 48, + "truncated": 0, + "samples": 8788 + }, + "5": { + "episodes": 48, + "truncated": 0, + "samples": 6968 + }, + "6": { + "episodes": 48, + "truncated": 0, + "samples": 8331 + } + }, + "truncated": 0, + "samples": 40122, + "rollout_seconds": 361.7861359352246, + "seconds": 421.67150955926627, + "loss": 0.0672784899416692, + "training_opponents": { + "economic": { + "games": 40, + "wins": 5, + "truncated": 0 + }, + "search": { + "games": 31, + "wins": 4, + "truncated": 0 + }, + "rush": { + "games": 30, + "wins": 5, + "truncated": 0 + }, + "heuristic": { + "games": 31, + "wins": 19, + "truncated": 0 + }, + "snapshot0": { + "games": 28, + "wins": 2, + "truncated": 0 + }, + "snapshot1": { + "games": 27, + "wins": 3, + "truncated": 0 + }, + "snapshot2": { + "games": 27, + "wins": 4, + "truncated": 0 + } + }, + "search_rollouts_reported": true, + "search_stats": { + "search": { + "decisions": 3991, + "evaluations": 64196, + "truncated": 0 + } + } + }, + { + "stage": "train", + "run": "multiplayer-refine-cpu-pilot-v1", + "update": 1, + "episodes": 240, + "player_count": "mixed", + "by_player_count": { + "2": { + "episodes": 48, + "truncated": 0, + "samples": 8943 + }, + "3": { + "episodes": 48, + "truncated": 0, + "samples": 9983 + }, + "4": { + "episodes": 48, + "truncated": 0, + "samples": 7851 + }, + "5": { + "episodes": 48, + "truncated": 0, + "samples": 10645 + }, + "6": { + "episodes": 48, + "truncated": 0, + "samples": 8419 + } + }, + "truncated": 0, + "samples": 45841, + "rollout_seconds": 341.4953621355817, + "seconds": 414.2559402799234, + "loss": 0.06531770333423521, + "training_opponents": { + "heuristic": { + "games": 30, + "wins": 16, + "truncated": 0 + }, + "search": { + "games": 25, + "wins": 11, + "truncated": 0 + }, + "rush": { + "games": 31, + "wins": 7, + "truncated": 0 + }, + "economic": { + "games": 22, + "wins": 9, + "truncated": 0 + }, + "snapshot1": { + "games": 28, + "wins": 2, + "truncated": 0 + }, + "snapshot0": { + "games": 40, + "wins": 2, + "truncated": 0 + }, + "snapshot2": { + "games": 20, + "wins": 2, + "truncated": 0 + } + }, + "search_rollouts_reported": true, + "search_stats": { + "search": { + "decisions": 3612, + "evaluations": 58236, + "truncated": 0 + } + } + } + ], + "selection_evaluation_win_rates": [ + { + "2p/economic": 0.375, + "2p/heuristic": 0.3125, + "2p/rush": 0.34375, + "2p/legacy": 1.0, + "3p/economic": 0.4583333333333333, + "3p/heuristic": 0.6666666666666666, + "3p/rush": 0.4583333333333333, + "3p/legacy": 0.9166666666666666, + "4p/economic": 0.625, + "4p/heuristic": 1.0, + "4p/rush": 0.59375, + "4p/legacy": 0.84375, + "5p/economic": 0.425, + "5p/heuristic": 0.925, + "5p/rush": 0.45, + "5p/legacy": 0.975, + "6p/economic": 0.2916666666666667, + "6p/heuristic": 0.875, + "6p/rush": 0.375, + "6p/legacy": 0.9791666666666666 + }, + { + "2p/economic": 0.4375, + "2p/heuristic": 0.1875, + "2p/rush": 0.5625, + "2p/legacy": 1.0, + "3p/economic": 0.4583333333333333, + "3p/heuristic": 0.625, + "3p/rush": 0.375, + "3p/legacy": 0.875, + "4p/economic": 0.5, + "4p/heuristic": 1.0, + "4p/rush": 0.59375, + "4p/legacy": 0.75, + "5p/economic": 0.4, + "5p/heuristic": 0.875, + "5p/rush": 0.475, + "5p/legacy": 0.875, + "6p/economic": 0.3125, + "6p/heuristic": 0.8541666666666666, + "6p/rush": 0.4166666666666667, + "6p/legacy": 0.8541666666666666 + } + ], + "latest_export_parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "40240c9a8ebde8f93b94d94f2e58d7b86f0dea1764c6fb17d6ca4aa1ff09420f", + "max_logit_error": 3.4332275390625e-05, + "max_value_error": 1.7285346984863281e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "conclusion": "Two complete updates, 480 games, exactly 96/count, no game or search-rollout truncations. About 7 minutes/update including 60\u201373 seconds optimization. CPU training/export viable; tiny gameplay selection sample shows no reliable strength improvement after two updates." }, "multiplayer_geoleague_cpu_v1": { "job_id": "6abd5cb4fbc85ba68235c728", From 7a859fde6a44cb332a42278cd7b3fb98f6117485 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:12:36 +0200 Subject: [PATCH 052/184] Test per-game engine processes to reduce search-worker imbalance --- ai/strong/experiments.json | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index cd25e56..37f0672 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2259,8 +2259,7 @@ "reason": "Waited about 15 minutes for A10G hardware. H200 has successfully run both recent distillation jobs and provides more rollout CPU capacity." }, "status": { - "stage": "SCHEDULING", - "message": "Scheduling" + "stage": "RUNNING" } }, "multiplayer_search_recovery_2p": { @@ -3349,5 +3348,38 @@ "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", "initial_checkpoint": "runs/multiplayer-distillation-v2-hard/best.pt", "rationale": "CPU pilot completed 240 balanced games and one update in 422 seconds. Train against stronger geographic search while retaining self-play and frozen snapshots; independent screening still required." + }, + "multiplayer_envworker_pilot": { + "job_id": "6abd5f0afbc85ba68235c7b1", + "run": "multiplayer-geoleague-envworkers-pilot-v1", + "flavor": "cpu-performance", + "device": "cpu", + "workers": 240, + "envs": 240, + "torch_threads": 4, + "updates": 1, + "timeout": "3h", + "opponent_mode": "mixed_search_geo", + "source_revision": "0fe849528790ab616c9eddb7caf6ad1c7c2a5966", + "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "hypothesis": "One process per game avoids several expensive search games serialized on one engine worker. OS schedules processes over available CPU cores.", + "predicted_first_update_search_load": { + "24_workers": { + "search_games": 27, + "search_seats": 87, + "max_search_seats_per_worker": 16, + "workers_with_search": 16 + }, + "240_workers": { + "search_games": 29, + "search_seats": 86, + "max_search_seats_per_worker": 5, + "workers_with_search": 29 + } + }, + "comparison_limit": "Changing worker count also changes worker-derived RNG seeds, so workloads are similar rather than identical. Measure rollout counts and durations; no strength claim from throughput.", + "status": { + "stage": "RUNNING" + } } } From f45fa1248772fbcde1494dd21ec45e0461881411 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:20:03 +0200 Subject: [PATCH 053/184] Pilot asynchronous frozen-policy game collection on HF --- ai/strong/async_pool.py | 71 +++++++++++++++++++++++ ai/strong/experiments.json | 33 +++++++++++ ai/strong/launch-multiplayer-refine-v1.sh | 5 +- ai/strong/test_async_pool.py | 71 +++++++++++++++++++++++ ai/strong/train.py | 12 +++- 5 files changed, 189 insertions(+), 3 deletions(-) create mode 100644 ai/strong/async_pool.py create mode 100644 ai/strong/test_async_pool.py diff --git a/ai/strong/async_pool.py b/ai/strong/async_pool.py new file mode 100644 index 0000000..a33e590 --- /dev/null +++ b/ai/strong/async_pool.py @@ -0,0 +1,71 @@ +"""One engine per game; advance ready games without a global step barrier.""" + +from concurrent.futures import FIRST_COMPLETED, wait +import sys +from pathlib import Path + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +from pool import EnginePool + + +class AsyncEnginePool(EnginePool): + def __init__(self, workers, seed="rollout-v1", script="ai/strong/bridge.cjs"): + super().__init__(workers, seed, script) + self.pending = {} + self.ready = set() + self.started = False + + def _submit(self, index, request): + future = self.executor.submit(self._call, (self.processes[index], request)) + self.pending[future] = index + + def _collect(self): + observations = [None] * len(self.processes) + ended = [] + while self.pending: + done, _ = wait(self.pending, return_when=FIRST_COMPLETED) + # Also consume replies that finished during the wakeup. + done.update(f for f in self.pending if f.done()) + for future in sorted(done, key=lambda f: self.pending[f]): + index = self.pending.pop(future) + result = future.result() + if len(result["observations"]) != 1: + raise ValueError("Async engines must own exactly one game") + row = result["observations"][0] + observations[index] = row + if row is not None: + self.ready.add(index) + for e in result["ended"]: + if e["env"] != 0: + raise ValueError("Unexpected worker-local environment index") + ended.append({**e, "env": index}) + if self.ready: + break + # Completed games alone must not end the caller's loop while other + # engines still have requests in flight. + return {"observations": observations, "ended": ended} + + def call(self, request): + count = len(self.processes) + if request["op"] == "reset": + if self.pending or self.ready: + raise ValueError("Cannot reset while a batch is active") + if request["n"] != count: + raise ValueError("Async training needs one worker per environment") + self.started = True + offset = request.get("offset", 0) + for index in range(count): + self._submit(index, {**request, "n": 1, "offset": offset + index}) + elif request["op"] == "step": + actions = request["actions"] + if not self.started or len(actions) != count: + raise ValueError("Incorrect action count or missing reset") + supplied = {i for i, action in enumerate(actions) if action is not None} + if supplied != self.ready: + raise ValueError("Actions must match the ready environments exactly") + for index in sorted(self.ready): + self._submit(index, {"op": "step", "actions": [actions[index]]}) + self.ready.clear() + else: + raise ValueError("Unknown operation") + return self._collect() diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 37f0672..44c9980 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3381,5 +3381,38 @@ "status": { "stage": "RUNNING" } + }, + "multiplayer_async_pilot": { + "job_id": "6abd60cefbc85ba68235c81d", + "run": "multiplayer-geoleague-async-pilot-v1", + "flavor": "cpu-performance", + "device": "cpu", + "workers": 240, + "envs": 240, + "torch_threads": 4, + "updates": 1, + "opponent_mode": "mixed_search_geo", + "async_rollout": true, + "source_bundle": { + "archive": "strong-source-v25.tgz", + "revision": "a8fa4ea6213c46f978dd3c25735296049df22571", + "base_revision": "0fe849528790ab616c9eddb7caf6ad1c7c2a5966", + "changed_files": [ + "ai/strong/train.py", + "ai/strong/async_pool.py", + "ai/strong/test_async_pool.py" + ], + "archive_sha256": "5eca56c9cfa474c31c1615004ef77c0112e5bd70eb9da776d892e70f49c04c01" + }, + "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "hypothesis": "Advance ready games while other engine processes search, removing the per-step slowest-worker barrier. Policy stays frozen until every game in the batch completes.", + "tests": [ + "20 real mixed-count complete games match synchronous pool exactly under deterministic teacher actions, including terminal vectors and total decision count", + "Delayed fake worker verifies no premature batch completion or dropped terminal records" + ], + "comparison_limit": "Same game seeds and opponent assignments as synchronous 240-worker pilot, but stochastic learner RNG is consumed in readiness order, so sampled trajectories can differ.", + "status": { + "stage": "RUNNING" + } } } diff --git a/ai/strong/launch-multiplayer-refine-v1.sh b/ai/strong/launch-multiplayer-refine-v1.sh index 4cd908f..6b26b22 100644 --- a/ai/strong/launch-multiplayer-refine-v1.sh +++ b/ai/strong/launch-multiplayer-refine-v1.sh @@ -13,7 +13,7 @@ hf jobs run --detach --flavor "${HF_FLAVOR:-h200}" --timeout "${JOB_TIMEOUT:-12h --env INIT_CHECKPOINT="$checkpoint" --env INIT_REVISION="$revision" --env ANCHOR_POLICY=initial \ --env ARCHITECTURE=multiplayer_ordered --env MIX_PLAYER_COUNTS=1 --env OPPONENT_MODE="${OPPONENT_MODE:-mixed_search}" \ --env RUN_NAME="$run" --env TRAIN_SEED="${TRAIN_SEED:-623}" \ - --env TRAIN_DEVICE="${TRAIN_DEVICE:-cuda}" --env TORCH_THREADS="${TORCH_THREADS:-2}" \ + --env ASYNC_ROLLOUT="${ASYNC_ROLLOUT:-0}" --env TRAIN_DEVICE="${TRAIN_DEVICE:-cuda}" --env TORCH_THREADS="${TORCH_THREADS:-2}" \ --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.03 \ --env UPDATES="${UPDATES:-80}" --env EVAL_EVERY=10 \ --env ENVS=240 --env WORKERS="${WORKERS:-16}" --env BATCH_SIZE=512 \ @@ -24,11 +24,12 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v24.tgz\",repo_type=\"dataset\",revision=\"0fe849528790ab616c9eddb7caf6ad1c7c2a5966\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v25.tgz\",repo_type=\"dataset\",revision=\"a8fa4ea6213c46f978dd3c25735296049df22571\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace node --test ai/test.cjs ai/strong/test.cjs python ai/strong/test_teacher_contract.py python ai/strong/test_model_v4.py python ai/strong/test_multiplayer_bridge.py +python ai/strong/test_async_pool.py python -u ai/strong/train.py ' diff --git a/ai/strong/test_async_pool.py b/ai/strong/test_async_pool.py new file mode 100644 index 0000000..99b55b1 --- /dev/null +++ b/ai/strong/test_async_pool.py @@ -0,0 +1,71 @@ +"""Check scheduling and complete-game equivalence without local optimization.""" + +from pathlib import Path +import sys +import tempfile +import unittest + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +from pool import EnginePool +from async_pool import AsyncEnginePool +from multiplayer import ROLE_REVISIONS + + +class AsyncPoolTests(unittest.TestCase): + def play(self, cls): + pool = cls(20, seed="async-equivalence", script="ai/strong/bridge.cjs") + try: + reply = pool.call( + { + "op": "reset", + "n": 20, + "playerCounts": [2, 3, 4, 5, 6], + "offset": 20, + "mode": "selfplay", + "featureRevisions": ROLE_REVISIONS, + } + ) + endings = [] + decisions = 0 + while any(r is not None for r in reply["observations"]): + actions = [r["teacher"] if r else None for r in reply["observations"]] + decisions += sum(a is not None for a in actions) + reply = pool.call({"op": "step", "actions": actions}) + endings.extend(reply["ended"]) + self.assertEqual(len(endings), 20) + self.assertFalse(any(e["truncated"] for e in endings)) + return sorted(endings, key=lambda e: e["env"]), decisions + finally: + pool.close() + + def test_complete_games_match_synchronous_pool(self): + self.assertEqual(self.play(EnginePool), self.play(AsyncEnginePool)) + + def test_pending_game_survives_other_game_completion(self): + with tempfile.TemporaryDirectory() as directory: + script = Path(directory) / "fake.cjs" + script.write_text("""const r=require('readline').createInterface({input:process.stdin}); +const slow=process.env.SEED.endsWith('-1');r.on('line',line=>{const q=JSON.parse(line); +setTimeout(()=>console.log(JSON.stringify(q.op==='reset'?{observations:[{teacher:0}],ended:[]}: +{observations:[null],ended:[{env:0}]})),slow?100:0);});""") + pool = AsyncEnginePool(2, script=str(script)) + try: + reply = pool.call({"op": "reset", "n": 2}) + ended = [] + while any(r is not None for r in reply["observations"]): + reply = pool.call( + { + "op": "step", + "actions": [ + 0 if r else None for r in reply["observations"] + ], + } + ) + ended.extend(reply["ended"]) + self.assertEqual(sorted(e["env"] for e in ended), [0, 1]) + finally: + pool.close() + + +if __name__ == "__main__": + unittest.main() diff --git a/ai/strong/train.py b/ai/strong/train.py index b5b3cfd..2aaca7a 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -98,7 +98,15 @@ workers = int(os.getenv("WORKERS", "4")) nenv = int(os.getenv("ENVS", "64")) batchsize = int(os.getenv("BATCH_SIZE", "512")) updates = int(os.getenv("UPDATES", "10")) -rollout = EnginePool( +async_rollout = os.getenv("ASYNC_ROLLOUT") == "1" +rollout_class = EnginePool +if async_rollout: + from async_pool import AsyncEnginePool + + if workers != nenv: + raise ValueError("Async rollout requires WORKERS == ENVS") + rollout_class = AsyncEnginePool +rollout = rollout_class( workers, seed=f"strong-train-{seed}", script="ai/strong/bridge.cjs" ) snapshots = [copy.deepcopy(net).eval()] @@ -119,6 +127,7 @@ def save(name, export=False): "update": update, "mixed_player_counts": mix_player_counts, "training_device": device, + "async_rollout": async_rollout, "initial_checkpoint": initial_checkpoint, "initial_revision": initial_revision, "initial_feature_revision": checkpoint.get("feature_revision", "3.0") @@ -288,6 +297,7 @@ try: "envs": nenv, "device": device, "torch_threads": torch.get_num_threads(), + "async_rollout": async_rollout, "gpu": torch.cuda.get_device_name() if device == "cuda" else None, } ), From 435bcbaf77e9c5cfc826cf6ec707b0a8375d4d5d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:23:01 +0200 Subject: [PATCH 054/184] Record first balanced H200 refinement update and rollout bottleneck --- ai/strong/experiments.json | 87 +++++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 44c9980..cb810ef 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2260,7 +2260,92 @@ }, "status": { "stage": "RUNNING" - } + }, + "first_update": { + "stage": "train", + "run": "multiplayer-refine-hard-v1", + "update": 0, + "episodes": 240, + "player_count": "mixed", + "by_player_count": { + "2": { + "episodes": 48, + "truncated": 0, + "samples": 8011 + }, + "3": { + "episodes": 48, + "truncated": 0, + "samples": 7811 + }, + "4": { + "episodes": 48, + "truncated": 0, + "samples": 8676 + }, + "5": { + "episodes": 48, + "truncated": 0, + "samples": 6666 + }, + "6": { + "episodes": 48, + "truncated": 0, + "samples": 8355 + } + }, + "truncated": 0, + "samples": 39519, + "rollout_seconds": 358.0984410038218, + "seconds": 368.51974144997075, + "loss": 0.07155261155246555, + "training_opponents": { + "search": { + "games": 31, + "wins": 1, + "truncated": 0 + }, + "economic": { + "games": 40, + "wins": 10, + "truncated": 0 + }, + "heuristic": { + "games": 31, + "wins": 13, + "truncated": 0 + }, + "rush": { + "games": 30, + "wins": 8, + "truncated": 0 + }, + "snapshot2": { + "games": 27, + "wins": 3, + "truncated": 0 + }, + "snapshot1": { + "games": 27, + "wins": 3, + "truncated": 0 + }, + "snapshot0": { + "games": 28, + "wins": 2, + "truncated": 0 + } + }, + "search_rollouts_reported": true, + "search_stats": { + "search": { + "decisions": 3922, + "evaluations": 62612, + "truncated": 0 + } + } + }, + "timing_comparison_limit": "GPU and CPU pilot use different source optimizations and stochastic trajectories; elapsed components establish practical viability and bottleneck, not a controlled hardware speed ratio." }, "multiplayer_search_recovery_2p": { "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", From 24f6c6f10104277eff335e2e8b1e3b11ec60a2e0 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:23:44 +0200 Subject: [PATCH 055/184] Distinguish ready and in-flight games in asynchronous telemetry --- ai/strong/train.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ai/strong/train.py b/ai/strong/train.py index 2aaca7a..8fb6c72 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -408,14 +408,18 @@ try: "completed_games": len(endings), "requested_games": nenv, "decisions": decisions, - "active_games": len(active), - "active_round_min": min( + "unfinished_games": nenv - len(endings), + "ready_games": len(active), + "in_flight_games": nenv - len(endings) - len(active), + "ready_round_min": min( (r["round"] for r in active), default=None ), - "active_round_max": max( + "ready_round_max": max( (r["round"] for r in active), default=None ), "engine_seconds": engine_seconds, + "engine_timing": "blocking_call_wall_time", + "async_rollout": async_rollout, "policy_seconds": policy_seconds, "seconds": time.perf_counter() - start, } @@ -512,6 +516,8 @@ try: "samples": len(batch), "rollout_seconds": rollout_seconds, "engine_seconds": engine_seconds, + "engine_timing": "blocking_call_wall_time", + "async_rollout": async_rollout, "policy_seconds": policy_seconds, "seconds": time.perf_counter() - start, "loss": float(np.mean(losses)), From 9bf47b1ccbe100c40dcccd400107dab27045afaf Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:26:42 +0200 Subject: [PATCH 056/184] Guard complete rollout batches before optimization --- ai/strong/experiments.json | 11 +++++++++++ ai/strong/launch-multiplayer-refine-v1.sh | 2 +- ai/strong/train.py | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index cb810ef..cfada00 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3499,5 +3499,16 @@ "status": { "stage": "RUNNING" } + }, + "async_training_batch_guard": { + "source_bundle": { + "archive": "strong-source-v26.tgz", + "revision": "80fcc719b64b13fe1592e206712b68f94ef19951", + "base_revision": "a8fa4ea6213c46f978dd3c25735296049df22571", + "only_replaced_file": "ai/strong/train.py", + "archive_sha256": "03348439ae91b3e3ccbc6061d885c4c443721cc2b2d6d7fad3fd57bb5b3c1e2f" + }, + "invariant": "Before optimization, exactly ENVS terminal records with unique environment indices covering 0..ENVS-1.", + "telemetry": "Ready games are distinct from unfinished/in-flight games; engine timing is blocking-call wall time, not aggregate background CPU work." } } diff --git a/ai/strong/launch-multiplayer-refine-v1.sh b/ai/strong/launch-multiplayer-refine-v1.sh index 6b26b22..a972542 100644 --- a/ai/strong/launch-multiplayer-refine-v1.sh +++ b/ai/strong/launch-multiplayer-refine-v1.sh @@ -24,7 +24,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v25.tgz\",repo_type=\"dataset\",revision=\"a8fa4ea6213c46f978dd3c25735296049df22571\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v26.tgz\",repo_type=\"dataset\",revision=\"80fcc719b64b13fe1592e206712b68f94ef19951\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace node --test ai/test.cjs ai/strong/test.cjs python ai/strong/test_teacher_contract.py diff --git a/ai/strong/train.py b/ai/strong/train.py index 8fb6c72..154e99d 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -428,6 +428,8 @@ try: ) last_progress = time.perf_counter() rollout_seconds = time.perf_counter() - start + if len(endings) != nenv or {e["env"] for e in endings} != set(range(nenv)): + raise RuntimeError("Every training environment must finish exactly once") if not batch: raise RuntimeError("No completed training episodes") advantages = np.array([r["advantage"] for r in batch]) From d41b815ff154bdda4b05c51c059a7ac4cab93c1a Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:33:18 +0200 Subject: [PATCH 057/184] Verify asynchronous pilot and launch stronger league and search tests --- ai/strong/experiments.json | 260 ++++++++++++++++++++++++++++++++++++- 1 file changed, 257 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index cfada00..06560c2 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -2470,7 +2470,99 @@ "max_ms": 7.891396002378315 } } - } + }, + "search_result": { + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "seed": "multiplayer-search-recovery-v1-2p", + "games": 160, + "win_rate": 0.925, + "truncated": 0, + "seconds": 3683.0019175199996, + "inference_p95_ms": 0.3714829999807989, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 40, + "win_rate": 1.0, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 1.0, + 1.0 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 40, + "win_rate": 0.85, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.75, + 0.95 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 40, + "win_rate": 0.95, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.875, + 1.0 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 40, + "win_rate": 0.9, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.775, + 1.0 + ] + } + ], + "independent_seeds": 20, + "seed_bootstrap_95_interval": [ + 0.88125, + 0.9625 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 8868, + "evaluations": 2135136, + "truncated": 0 + } + } + }, + "paired_improvement": 0.43125, + "paired_seed_bootstrap_95_interval": [ + 0.33125, + 0.525 + ], + "result_revision": "d4e92108af9cc7a51c9450600e71cdd200a701af", + "status": "COMPLETED" }, "multiplayer_soft_e15_screening": { "candidate": { @@ -3497,8 +3589,113 @@ ], "comparison_limit": "Same game seeds and opponent assignments as synchronous 240-worker pilot, but stochastic learner RNG is consumed in readiness order, so sampled trajectories can differ.", "status": { - "stage": "RUNNING" - } + "stage": "COMPLETED" + }, + "result_revision": "d4e92108af9cc7a51c9450600e71cdd200a701af", + "training_result": { + "stage": "train", + "run": "multiplayer-geoleague-async-pilot-v1", + "update": 0, + "episodes": 240, + "player_count": "mixed", + "by_player_count": { + "2": { + "episodes": 48, + "truncated": 0, + "samples": 8620 + }, + "3": { + "episodes": 48, + "truncated": 0, + "samples": 6972 + }, + "4": { + "episodes": 48, + "truncated": 0, + "samples": 10177 + }, + "5": { + "episodes": 48, + "truncated": 0, + "samples": 6271 + }, + "6": { + "episodes": 48, + "truncated": 0, + "samples": 8422 + } + }, + "truncated": 0, + "samples": 40462, + "rollout_seconds": 447.53190804800033, + "engine_seconds": 339.11456483498387, + "policy_seconds": 107.27118742997118, + "seconds": 506.27836810699955, + "loss": 0.072037932293703, + "training_opponents": { + "heuristic": { + "games": 30, + "wins": 12, + "truncated": 0 + }, + "rush": { + "games": 28, + "wins": 2, + "truncated": 0 + }, + "economic": { + "games": 30, + "wins": 5, + "truncated": 0 + }, + "snapshot2": { + "games": 29, + "wins": 4, + "truncated": 0 + }, + "snapshot1": { + "games": 30, + "wins": 3, + "truncated": 0 + }, + "snapshot0": { + "games": 35, + "wins": 2, + "truncated": 0 + }, + "search_geo": { + "games": 29, + "wins": 0, + "truncated": 0 + } + }, + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 4050, + "evaluations": 327344, + "truncated": 0 + } + } + }, + "export_parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "2e603953785da2a295a0915a4582ca1aa884c7dd88bb08d7a722c9e1d2a7a1ec", + "max_logit_error": 3.814697265625e-05, + "max_value_error": 1.7285346984863281e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "conclusion": "Complete balanced batch passed; rollout 447.53 seconds and total update 506.28 seconds. Synchronous 240-worker pilot was still in its first batch after 1048 seconds. Different stochastic trajectories prevent an exact matched speed ratio. No strength conclusion from one update." }, "async_training_batch_guard": { "source_bundle": { @@ -3510,5 +3707,62 @@ }, "invariant": "Before optimization, exactly ENVS terminal records with unique environment indices covering 0..ENVS-1.", "telemetry": "Ready games are distinct from unfinished/in-flight games; engine timing is blocking-call wall time, not aggregate background CPU work." + }, + "multiplayer_async_geoleague_refinement": { + "job_id": "6abd63b8fbc85ba68235c8d9", + "run": "multiplayer-refine-geoleague-async-v1", + "source_revision": "80fcc719b64b13fe1592e206712b68f94ef19951", + "source_archive": "strong-source-v26.tgz", + "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "initial_checkpoint": "runs/multiplayer-distillation-v2-hard/best.pt", + "flavor": "cpu-performance", + "device": "cpu", + "workers": 240, + "envs": 240, + "torch_threads": 4, + "updates": 80, + "async_rollout": true, + "opponent_mode": "mixed_search_geo", + "timeout": "24h", + "status": "SUBMITTED", + "purpose": "Scale verified asynchronous full-game collection against geographic-search league; preserve original teacher warm start for clear comparison." + }, + "multiplayer_search_strong_probe": { + "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "source_revision": "bcea005fb81ee05c662600b3238cba10d529abc5", + "samples": 48, + "geographic": true, + "deals_per_matchup": 8, + "purpose": "Small development screen against stronger opponents after economic success, not final qualification. Two shards of four paired deals per matchup.", + "jobs": [ + { + "run": "multiplayer-hard-e10-search48-search_geo-2p-probe-0", + "offset": 0, + "players": 2, + "opponent": "search_geo", + "job_id": "6abd63cbfbc85ba68235c8dd" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-2p-probe-4", + "offset": 4, + "players": 2, + "opponent": "search_geo", + "job_id": "6abd63cc404719ba376142b4" + }, + { + "run": "multiplayer-hard-e10-search48-a260-3p-probe-0", + "offset": 0, + "players": 3, + "opponent": "a260", + "job_id": "6abd63cc404719ba376142b6" + }, + { + "run": "multiplayer-hard-e10-search48-a260-3p-probe-4", + "offset": 4, + "players": 3, + "opponent": "a260", + "job_id": "6abd63cdfbc85ba68235c8df" + } + ] } } From b5274d00d78aea6ccf48c20baa27881e1a24533b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:36:44 +0200 Subject: [PATCH 058/184] Measure neural proposal contribution separately from rollout search --- ai/strong/arena-job.py | 2 ++ ai/strong/bridge.cjs | 2 +- ai/strong/combine-arenas.py | 5 +++- ai/strong/evaluate.py | 9 +++++++ ai/strong/experiments.json | 34 ++++++++++++++++++++++++++- ai/strong/launch-multiplayer-arena.sh | 3 ++- ai/strong/verify-final.py | 4 ++++ 7 files changed, 55 insertions(+), 4 deletions(-) diff --git a/ai/strong/arena-job.py b/ai/strong/arena-job.py index 3c4674f..3352aae 100644 --- a/ai/strong/arena-job.py +++ b/ai/strong/arena-job.py @@ -33,6 +33,8 @@ command = [ "--output", "evaluation.json", ] +if os.getenv("DISABLE_SEARCH_PROPOSAL") == "1": + command.append("--disable-search-proposal") if os.getenv("GEOGRAPHY") == "1": command.append("--geographic-search") if os.getenv("OPPONENT_MODEL_PATH"): diff --git a/ai/strong/bridge.cjs b/ai/strong/bridge.cjs index f37f8d4..992ed02 100644 --- a/ai/strong/bridge.cjs +++ b/ai/strong/bridge.cjs @@ -174,7 +174,7 @@ function reset(mode = 'mixed', arenaSeed, arenaId, featureRevisions = {}, player ? searchMove(e, seat, { samples: choice.searchSamples, candidates: 6, - extraCandidates: [index], + extraCandidates: choice.disableSearchProposal ? [] : [index], geography: !!choice.geography, seed: 'arena-guided-' + e.id + '-' + e.steps, }) diff --git a/ai/strong/combine-arenas.py b/ai/strong/combine-arenas.py index 5a7fe31..7e8cfb7 100644 --- a/ai/strong/combine-arenas.py +++ b/ai/strong/combine-arenas.py @@ -24,7 +24,10 @@ keys = [ for report in reports: report.setdefault("candidate_search_scope", "all") report.setdefault("player_count", 3) -keys.extend(["candidate_search_scope", "player_count"]) + report.setdefault("candidate_search_model_proposal", True) +keys.extend( + ["candidate_search_scope", "player_count", "candidate_search_model_proposal"] +) config = {k: reports[0][k] for k in keys} rows = [] seen = set() diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index 3d38c0d..904be07 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -24,6 +24,11 @@ p.add_argument( p.add_argument("--opponent-model", help="Frozen ONNX policy in every opponent seat") p.add_argument("--workers", type=int, default=4) p.add_argument("--geographic-search", action="store_true") +p.add_argument( + "--disable-search-proposal", + action="store_true", + help="Ablation: omit the model candidate from search; keep model actions outside search", +) p.add_argument( "--search-samples", type=int, @@ -41,6 +46,8 @@ p.add_argument( args = p.parse_args() if not 0 <= args.search_samples <= 64: p.error("--search-samples must be 0..64") +if args.disable_search_proposal and not args.search_samples: + p.error("--disable-search-proposal requires positive --search-samples") if args.geographic_search and not args.search_samples: p.error("--geographic-search requires positive --search-samples") model = Model(args.model) @@ -107,6 +114,7 @@ try: "proposal": a, "searchSamples": args.search_samples, "geography": args.geographic_search, + "disableSearchProposal": args.disable_search_proposal, } if actor is model and args.search_samples @@ -160,6 +168,7 @@ report = { "candidate_search_samples": args.search_samples, "candidate_search_scope": args.search_scope, "candidate_geographic_search": args.geographic_search, + "candidate_search_model_proposal": not args.disable_search_proposal, "seed": args.seed, "games": len(rows), "win_rate": float(np.mean([r["win"] for r in rows])), diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 06560c2..92d093c 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3724,7 +3724,7 @@ "async_rollout": true, "opponent_mode": "mixed_search_geo", "timeout": "24h", - "status": "SUBMITTED", + "status": "RUNNING", "purpose": "Scale verified asynchronous full-game collection against geographic-search league; preserve original teacher warm start for clear comparison." }, "multiplayer_search_strong_probe": { @@ -3764,5 +3764,37 @@ "job_id": "6abd63cdfbc85ba68235c8df" } ] + }, + "multiplayer_search_proposal_ablation": { + "job_id": "6abd64b7404719ba376142d8", + "run": "multiplayer-hard-e10-search48-no-proposal-2p", + "source_bundle": { + "archive": "strong-source-v27.tgz", + "revision": "fe12e7a6b1fec2e04b749765af73477d39ded699", + "base_revision": "80fcc719b64b13fe1592e206712b68f94ef19951", + "changed_files": [ + "ai/strong/bridge.cjs", + "ai/strong/evaluate.py", + "ai/strong/arena-job.py", + "ai/strong/combine-arenas.py" + ], + "archive_sha256": "727a876c342853535ce14ecb4dfad1ca5f0876cb0e66e4a5acd0cf362ad43a7e" + }, + "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "seed": "multiplayer-search-recovery-v1-2p", + "games": 160, + "independent_deals": 20, + "players": 2, + "samples": 48, + "geographic": true, + "model_proposal": false, + "opponent": "economic", + "interpretation": "Only omit model action from strategic search candidate set. Non-search moves still use model, so this is not a pure heuristic-search baseline. Compare paired completed model-proposal arm (92.5%).", + "validation": [ + "8 complete real games covering both seats and four rules, zero game or rollout truncation", + "Combiner rejects mixing enabled/disabled proposal reports", + "Final verifier rejects ablation reports as deployment evidence" + ], + "status": "SUBMITTED" } } diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index fecce2f..0cb4118 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -11,6 +11,7 @@ if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then fi hf jobs run --detach --flavor cpu-performance --timeout 3h \ --secrets HF_TOKEN "${extra_env[@]}" \ + --env DISABLE_SEARCH_PROPOSAL="${DISABLE_SEARCH_PROPOSAL:-0}" \ --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 --env SEARCH_SCOPE="${SEARCH_SCOPE:-all}" \ --env RUN_NAME="${1:?name}" --env MODEL_PATH="${2:?model path}" --env MODEL_REVISION="${3:?revision}" \ --env OPPONENT="${4:?opponent}" --env SEARCH_SAMPLES="${5:?samples}" --env GEOGRAPHY="${6:?geography}" \ @@ -23,7 +24,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v22.tgz\",repo_type=\"dataset\", revision=\"bcea005fb81ee05c662600b3238cba10d529abc5\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v27.tgz\",repo_type=\"dataset\", revision=\"fe12e7a6b1fec2e04b749765af73477d39ded699\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' diff --git a/ai/strong/verify-final.py b/ai/strong/verify-final.py index 4773fc3..f865be1 100644 --- a/ai/strong/verify-final.py +++ b/ai/strong/verify-final.py @@ -82,6 +82,10 @@ for path in a.reports: == candidate.get("search_scope", "all"), f"{name}: wrong search scope", ) + require( + report.get("candidate_search_model_proposal", True) is True, + f"{name}: search proposal ablation is not the deployment configuration", + ) rows = report["results"] require( len(rows) == report["games"] == spec["games"], f"{name}: incomplete game count" From 7d70626edeae52803eaf229785cd6b36d3aded5c Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:37:10 +0200 Subject: [PATCH 059/184] Retire slower synchronous refinement after asynchronous validation --- ai/strong/experiments.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 92d093c..e72d5c0 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3796,5 +3796,22 @@ "Final verifier rejects ablation reports as deployment evidence" ], "status": "SUBMITTED" + }, + "synchronous_geoleague_superseded": { + "job_id": "6abd5cb4fbc85ba68235c728", + "replacement_job_id": "6abd63b8fbc85ba68235c8d9", + "reason": "Verified complete async pilot and confirmed long async replacement running. Release capacity for independent strength evaluations.", + "first_batch": { + "episodes": 240, + "episodes_per_count": 48, + "samples": 38888, + "truncated": 0, + "rollout_seconds": 1685.610223481, + "total_seconds": 1745.5442109609999, + "search_evaluations": 347296, + "search_truncated": 0 + }, + "status": "CANCELED", + "checkpoint_note": "Stopped after first logged batch; no newly trained checkpoint saved at the 10-update checkpoint interval. Original teacher warm start remains pinned." } } From e1a633ca53d947ac640ff363c8ee922565194bf2 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:38:18 +0200 Subject: [PATCH 060/184] Screen search-assisted model against strong bots across all player counts --- ai/strong/experiments.json | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e72d5c0..015a416 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3813,5 +3813,82 @@ }, "status": "CANCELED", "checkpoint_note": "Stopped after first logged batch; no newly trained checkpoint saved at the 10-update checkpoint interval. Original teacher warm start remains pinned." + }, + "multiplayer_search_strong_wide_probe": { + "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "source_bundle": { + "archive": "strong-source-v27.tgz", + "revision": "fe12e7a6b1fec2e04b749765af73477d39ded699", + "base_revision": "80fcc719b64b13fe1592e206712b68f94ef19951", + "changed_files": [ + "ai/strong/bridge.cjs", + "ai/strong/evaluate.py", + "ai/strong/arena-job.py", + "ai/strong/combine-arenas.py" + ], + "archive_sha256": "727a876c342853535ce14ecb4dfad1ca5f0876cb0e66e4a5acd0cf362ad43a7e" + }, + "samples": 48, + "geographic": true, + "deals_per_count": 8, + "purpose": "Development screen at 4\u20136 players against all geographic-search opponents; both variants, both auction modes, every learner seat. Not final qualification.", + "jobs": [ + { + "run": "multiplayer-hard-e10-search48-search_geo-4p-probe-0", + "offset": 0, + "players": 4, + "opponent": "search_geo", + "job_id": "6abd6513404719ba376142e8" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-4p-probe-4", + "offset": 4, + "players": 4, + "opponent": "search_geo", + "job_id": "6abd6514404719ba376142ea" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-0", + "offset": 0, + "players": 5, + "opponent": "search_geo", + "job_id": "6abd6515404719ba376142ec" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-4", + "offset": 4, + "players": 5, + "opponent": "search_geo", + "job_id": "6abd6516404719ba376142ee" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-6p-probe-0", + "offset": 0, + "players": 6, + "opponent": "search_geo", + "job_id": "6abd6516404719ba376142f0" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-6p-probe-4", + "offset": 4, + "players": 6, + "opponent": "search_geo", + "job_id": "6abd6517404719ba376142f4" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-3p-probe-0", + "offset": 0, + "players": 3, + "opponent": "search_geo", + "job_id": "6abd6529404719ba376142f7" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-3p-probe-4", + "offset": 4, + "players": 3, + "opponent": "search_geo", + "job_id": "6abd652afbc85ba68235c940" + } + ] } } From d710b809238a13792f5789ef14cb3780bff1141e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:39:32 +0200 Subject: [PATCH 061/184] Record completed synchronous 240-worker timing comparison --- ai/strong/experiments.json | 91 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 015a416..4b5a7e2 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3890,5 +3890,96 @@ "job_id": "6abd652afbc85ba68235c940" } ] + }, + "synchronous_240_worker_completed": { + "job_id": "6abd5f0afbc85ba68235c7b1", + "result_revision": "1f1df3af2b8ee82289e6848c2559aea7f92019ed", + "training_result": { + "stage": "train", + "run": "multiplayer-geoleague-envworkers-pilot-v1", + "update": 0, + "episodes": 240, + "player_count": "mixed", + "by_player_count": { + "2": { + "episodes": 48, + "truncated": 0, + "samples": 8755 + }, + "3": { + "episodes": 48, + "truncated": 0, + "samples": 6939 + }, + "4": { + "episodes": 48, + "truncated": 0, + "samples": 10299 + }, + "5": { + "episodes": 48, + "truncated": 0, + "samples": 6139 + }, + "6": { + "episodes": 48, + "truncated": 0, + "samples": 8228 + } + }, + "truncated": 0, + "samples": 40360, + "rollout_seconds": 1391.270637919195, + "engine_seconds": 1373.6085159713402, + "policy_seconds": 16.895370207726955, + "seconds": 1453.1871870215982, + "loss": 0.06967934356269992, + "training_opponents": { + "search_geo": { + "games": 29, + "wins": 0, + "truncated": 0 + }, + "rush": { + "games": 28, + "wins": 6, + "truncated": 0 + }, + "heuristic": { + "games": 30, + "wins": 17, + "truncated": 0 + }, + "economic": { + "games": 30, + "wins": 8, + "truncated": 0 + }, + "snapshot2": { + "games": 29, + "wins": 2, + "truncated": 0 + }, + "snapshot1": { + "games": 30, + "wins": 3, + "truncated": 0 + }, + "snapshot0": { + "games": 35, + "wins": 5, + "truncated": 0 + } + }, + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 4292, + "evaluations": 347936, + "truncated": 0 + } + } + }, + "comparison": "Async pilot rollout447.53s versus this synchronous pilot. Same 240 workers, but readiness-dependent policy sampling differs; not exact trajectory match." } } From aa1d6c6d37c74918bd68861f1ee70816ecfd4dfa Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:43:41 +0200 Subject: [PATCH 062/184] Verify first complete asynchronous geographic league training update --- ai/strong/experiments.json | 91 +++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 4b5a7e2..a0d126c 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3725,7 +3725,96 @@ "opponent_mode": "mixed_search_geo", "timeout": "24h", "status": "RUNNING", - "purpose": "Scale verified asynchronous full-game collection against geographic-search league; preserve original teacher warm start for clear comparison." + "purpose": "Scale verified asynchronous full-game collection against geographic-search league; preserve original teacher warm start for clear comparison.", + "first_completed_update": { + "stage": "train", + "run": "multiplayer-refine-geoleague-async-v1", + "update": 0, + "episodes": 240, + "player_count": "mixed", + "by_player_count": { + "2": { + "episodes": 48, + "truncated": 0, + "samples": 8421 + }, + "3": { + "episodes": 48, + "truncated": 0, + "samples": 6841 + }, + "4": { + "episodes": 48, + "truncated": 0, + "samples": 10308 + }, + "5": { + "episodes": 48, + "truncated": 0, + "samples": 6269 + }, + "6": { + "episodes": 48, + "truncated": 0, + "samples": 8107 + } + }, + "truncated": 0, + "samples": 39946, + "rollout_seconds": 499.7080845949995, + "engine_seconds": 392.34590494800796, + "engine_timing": "blocking_call_wall_time", + "async_rollout": true, + "policy_seconds": 106.25150237700927, + "seconds": 562.0267693669994, + "loss": 0.0672934655186559, + "training_opponents": { + "rush": { + "games": 28, + "wins": 4, + "truncated": 0 + }, + "economic": { + "games": 30, + "wins": 5, + "truncated": 0 + }, + "heuristic": { + "games": 30, + "wins": 12, + "truncated": 0 + }, + "snapshot2": { + "games": 29, + "wins": 5, + "truncated": 0 + }, + "snapshot1": { + "games": 30, + "wins": 1, + "truncated": 0 + }, + "snapshot0": { + "games": 35, + "wins": 1, + "truncated": 0 + }, + "search_geo": { + "games": 29, + "wins": 1, + "truncated": 0 + } + }, + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 4437, + "evaluations": 359920, + "truncated": 0 + } + } + }, + "first_update_note": "Full environment coverage guard passed before optimization; 48 games per count. Training outcomes are sampled-policy league games, not independent strength evidence." }, "multiplayer_search_strong_probe": { "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", From d39c420201cf8b25cf707b7b980129f6710377a2 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:52:57 +0200 Subject: [PATCH 063/184] Record first independent two-player geographic-search screening shard --- ai/strong/experiments.json | 98 +++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a0d126c..db8a903 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3852,7 +3852,103 @@ "opponent": "a260", "job_id": "6abd63cdfbc85ba68235c8df" } - ] + ], + "completed_shards": { + "multiplayer-hard-e10-search48-search_geo-2p-probe-0": { + "result_revision": "69e9c8c87c76a76e5221195ad89840bf4d6b329c", + "report": { + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "seed": "multiplayer-search-strong-probe-v1-2p", + "games": 32, + "win_rate": 0.53125, + "truncated": 0, + "seconds": 1147.2093434509989, + "inference_p95_ms": 0.5101578999528996, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 8, + "win_rate": 0.75, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 1.0 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 8, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 8, + "win_rate": 0.75, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 1.0 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 8, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.5 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.75 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 1790, + "evaluations": 428544, + "truncated": 0 + }, + "search_geo": { + "decisions": 1764, + "evaluations": 140128, + "truncated": 0 + } + } + }, + "interpretation": "Only four independent deals; wide interval includes chance. Await paired second shard, no strength claim." + } + } }, "multiplayer_search_proposal_ablation": { "job_id": "6abd64b7404719ba376142d8", From bc04fe0d313ceb36f40b8dba9e945d37bd2a634d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:54:37 +0200 Subject: [PATCH 064/184] Combine two-player strong-opponent probe without claiming superiority --- ai/strong/experiments.json | 273 ++++++++++++++++++++++++++++++++++++- 1 file changed, 272 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index db8a903..9286e48 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -3947,8 +3947,279 @@ } }, "interpretation": "Only four independent deals; wide interval includes chance. Await paired second shard, no strength claim." + }, + "multiplayer-hard-e10-search48-search_geo-2p-probe-4": { + "result_revision": "c9e1d00bc6f9b2e64d4212cc573b3827212ca87c", + "report": { + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 4, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "seed": "multiplayer-search-strong-probe-v1-2p", + "games": 32, + "win_rate": 0.53125, + "truncated": 0, + "seconds": 1138.239720783, + "inference_p95_ms": 0.4657115000213706, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 8, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.5 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 8, + "win_rate": 0.75, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 1.0 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 8, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 8, + "win_rate": 0.75, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 1.0 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.625 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 1786, + "evaluations": 430368, + "truncated": 0 + }, + "search_geo": { + "decisions": 1706, + "evaluations": 136656, + "truncated": 0 + } + } + } + }, + "multiplayer-hard-e10-search48-a260-3p-probe-4": { + "result_revision": "c9e1d00bc6f9b2e64d4212cc573b3827212ca87c", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 4, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 48, + "win_rate": 0.4791666666666667, + "truncated": 0, + "seconds": 1098.456312678, + "inference_p95_ms": 0.47355469997683025, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 12, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.3333333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 12, + "win_rate": 0.5833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.9166666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 12, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 12, + "win_rate": 0.6666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.9166666666666666 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.25, + 0.6875 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 1926, + "evaluations": 476064, + "truncated": 0 + } + } + } } - } + }, + "combined_2p_search_geo": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 2, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-2p-probe-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-2p-probe-4/evaluation.json" + ], + "games": 64, + "independent_seeds": 8, + "win_rate": 0.53125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.40625, + 0.65625 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 3576, + "evaluations": 858912, + "truncated": 0 + }, + "search_geo": { + "decisions": 3470, + "evaluations": 276784, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 16, + "independent_seeds": 8, + "win_rate": 0.5625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.75 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 16, + "independent_seeds": 8, + "win_rate": 0.5, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 16, + "independent_seeds": 8, + "win_rate": 0.5, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 16, + "independent_seeds": 8, + "win_rate": 0.5625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.75 + ] + } + ] + }, + "two_player_decision": "53.125% on 64 games / 8 independent deals; seed-cluster 95% interval 40.625\u201365.625%. Does not establish superiority or meet final strength gate. Continue refinement and other-count diagnosis; do not promote solely on 92.5% economic result." }, "multiplayer_search_proposal_ablation": { "job_id": "6abd64b7404719ba376142d8", From 9fb82dfeb62649702bc489203da02ae53084bfbd Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 21:55:44 +0200 Subject: [PATCH 065/184] Record combined three-player frozen-opponent screening with uncertainty --- ai/strong/experiments.json | 175 ++++++++++++++++++++++++++++++++++++- 1 file changed, 174 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 9286e48..f27a2b6 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -4128,6 +4128,94 @@ } } } + }, + "multiplayer-hard-e10-search48-a260-3p-probe-0": { + "result_revision": "c9e1d00bc6f9b2e64d4212cc573b3827212ca87c", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 48, + "win_rate": 0.4375, + "truncated": 0, + "seconds": 1142.435139335, + "inference_p95_ms": 0.5210491499923363, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 12, + "win_rate": 0.5, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 1.0 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 12, + "win_rate": 0.6666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 1.0 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 12, + "win_rate": 0.4166666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.8333333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 12, + "win_rate": 0.16666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.5 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.6666666666666666 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 2001, + "evaluations": 495408, + "truncated": 0 + } + } + } } }, "combined_2p_search_geo": { @@ -4219,7 +4307,92 @@ } ] }, - "two_player_decision": "53.125% on 64 games / 8 independent deals; seed-cluster 95% interval 40.625\u201365.625%. Does not establish superiority or meet final strength gate. Continue refinement and other-count diagnosis; do not promote solely on 92.5% economic result." + "two_player_decision": "53.125% on 64 games / 8 independent deals; seed-cluster 95% interval 40.625\u201365.625%. Does not establish superiority or meet final strength gate. Continue refinement and other-count diagnosis; do not promote solely on 92.5% economic result.", + "combined_3p_a260": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 3, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-4/evaluation.json" + ], + "games": 96, + "independent_seeds": 8, + "win_rate": 0.4583333333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.6145833333333334 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 3927, + "evaluations": 971472, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.4166666666666667, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.6666666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.8333333333333334 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.4166666666666667, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.6666666666666666 + ] + } + ] + }, + "three_player_a260_decision": "45.833% on 96 games / 8 independent deals; seed-cluster95% interval29.167\u201361.458%, includes33.333% chance. Promising point estimate but not verified superiority. Continue refinement and search-bot screens before expensive final qualification." }, "multiplayer_search_proposal_ablation": { "job_id": "6abd64b7404719ba376142d8", From 823437e55aa6c77fc169af2277800b1faeae3fab Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:00:11 +0200 Subject: [PATCH 066/184] Expand promising three-player search-assisted screening to forty deals --- ai/strong/experiments.json | 344 ++++++++++++++++++++++++++++++++++++- 1 file changed, 343 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index f27a2b6..787c202 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -4518,7 +4518,286 @@ "opponent": "search_geo", "job_id": "6abd652afbc85ba68235c940" } - ] + ], + "completed_shards": { + "multiplayer-hard-e10-search48-search_geo-3p-probe-0": { + "result_revision": "4dd3d03d73fa148d50423fcc50847058f728f978", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 48, + "win_rate": 0.5208333333333334, + "truncated": 0, + "seconds": 1150.4483527606353, + "inference_p95_ms": 0.45237452723085875, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 12, + "win_rate": 0.4166666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.5833333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 12, + "win_rate": 0.5, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 12, + "win_rate": 0.5833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.9166666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 12, + "win_rate": 0.5833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.6666666666666666 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.3958333333333333, + 0.5833333333333334 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 4979, + "evaluations": 406592, + "truncated": 0 + }, + "learner": { + "decisions": 2636, + "evaluations": 649248, + "truncated": 0 + } + } + } + }, + "multiplayer-hard-e10-search48-search_geo-3p-probe-4": { + "result_revision": "4dd3d03d73fa148d50423fcc50847058f728f978", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 4, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 48, + "win_rate": 0.4791666666666667, + "truncated": 0, + "seconds": 1126.296114658, + "inference_p95_ms": 0.4423473499628016, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 12, + "win_rate": 0.6666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.9166666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 12, + "win_rate": 0.5, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 12, + "win_rate": 0.5, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.8333333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 12, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.3333333333333333 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.5416666666666666 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 4657, + "evaluations": 381040, + "truncated": 0 + }, + "learner": { + "decisions": 2478, + "evaluations": 605808, + "truncated": 0 + } + } + } + } + }, + "combined_3p_search_geo": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 3, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-4/evaluation.json" + ], + "games": 96, + "independent_seeds": 8, + "win_rate": 0.5, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.5625 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 9636, + "evaluations": 787632, + "truncated": 0 + }, + "learner": { + "decisions": 5114, + "evaluations": 1255056, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.5416666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.7083333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.5, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.5416666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "independent_seeds": 8, + "win_rate": 0.4166666666666667, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5833333333333334 + ] + } + ] + } }, "synchronous_240_worker_completed": { "job_id": "6abd5f0afbc85ba68235c7b1", @@ -4610,5 +4889,68 @@ } }, "comparison": "Async pilot rollout447.53s versus this synchronous pilot. Same 240 workers, but readiness-dependent policy sampling differs; not exact trajectory match." + }, + "multiplayer_search_strong_expansion_3p": { + "purpose": "Expand promising 8-deal search-bot screen and uncertain frozen-opponent comparison to 40 independent development deals each. Reserved final seeds untouched.", + "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "source_revision": "fe12e7a6b1fec2e04b749765af73477d39ded699", + "jobs": [ + { + "run": "multiplayer-hard-e10-search48-search_geo-3p-probe-8", + "offset": 8, + "players": 3, + "opponent": "search_geo", + "job_id": "6abd6a3efbc85ba68235ca64" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-3p-probe-16", + "offset": 16, + "players": 3, + "opponent": "search_geo", + "job_id": "6abd6a3efbc85ba68235ca66" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-3p-probe-24", + "offset": 24, + "players": 3, + "opponent": "search_geo", + "job_id": "6abd6a3ffbc85ba68235ca68" + }, + { + "run": "multiplayer-hard-e10-search48-search_geo-3p-probe-32", + "offset": 32, + "players": 3, + "opponent": "search_geo", + "job_id": "6abd6a40fbc85ba68235ca6a" + }, + { + "run": "multiplayer-hard-e10-search48-a260-3p-probe-8", + "offset": 8, + "players": 3, + "opponent": "a260", + "job_id": "6abd6a40404719ba376143ad" + }, + { + "run": "multiplayer-hard-e10-search48-a260-3p-probe-16", + "offset": 16, + "players": 3, + "opponent": "a260", + "job_id": "6abd6a41fbc85ba68235ca6c" + }, + { + "run": "multiplayer-hard-e10-search48-a260-3p-probe-24", + "offset": 24, + "players": 3, + "opponent": "a260", + "job_id": "6abd6a42fbc85ba68235ca6e" + }, + { + "run": "multiplayer-hard-e10-search48-a260-3p-probe-32", + "offset": 32, + "players": 3, + "opponent": "a260", + "job_id": "6abd6a43fbc85ba68235ca70" + } + ] } } From bed83210cb75947bc5da0482d76a652bfdcd9c51 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:03:55 +0200 Subject: [PATCH 067/184] Pilot asynchronous independent arenas with exact outcome equivalence checks --- ai/strong/arena-job.py | 2 ++ ai/strong/evaluate.py | 14 +++++++++++--- ai/strong/experiments.json | 28 +++++++++++++++++++++++++++ ai/strong/launch-multiplayer-arena.sh | 3 ++- 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/ai/strong/arena-job.py b/ai/strong/arena-job.py index 3352aae..6797bb0 100644 --- a/ai/strong/arena-job.py +++ b/ai/strong/arena-job.py @@ -33,6 +33,8 @@ command = [ "--output", "evaluation.json", ] +if os.getenv("ASYNC_ARENA") == "1": + command.append("--async-rollout") if os.getenv("DISABLE_SEARCH_PROPOSAL") == "1": command.append("--disable-search-proposal") if os.getenv("GEOGRAPHY") == "1": diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index 904be07..77befed 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -7,6 +7,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1])) import numpy as np from infer import Model from pool import EnginePool +from async_pool import AsyncEnginePool from arena_statistics import win_summary, search_summary, validate_pairs from search_scope import SCOPES, search_enabled from feature_contract import FEATURE_REVISION, check_revision, model_revision @@ -23,6 +24,11 @@ p.add_argument( ) p.add_argument("--opponent-model", help="Frozen ONNX policy in every opponent seat") p.add_argument("--workers", type=int, default=4) +p.add_argument( + "--async-rollout", + action="store_true", + help="Advance ready games independently using one engine process per game", +) p.add_argument("--geographic-search", action="store_true") p.add_argument( "--disable-search-proposal", @@ -64,9 +70,9 @@ for actor in [model, opponent_model]: p.error("Non-three-player evaluation requires schema 4 for every model") if args.allow_feature_transfer and model_revision(model) == "4.0-multiplayer": p.error("Schema 4 cannot be transferred to a schema 3 encoder") -pool = EnginePool( - min(args.workers, args.games), seed=args.seed, script="ai/strong/bridge.cjs" -) +pool_class = AsyncEnginePool if args.async_rollout else EnginePool +engine_workers = args.games if args.async_rollout else min(args.workers, args.games) +pool = pool_class(engine_workers, seed=args.seed, script="ai/strong/bridge.cjs") feature_revision = ( FEATURE_REVISION if args.allow_feature_transfer else model_revision(model) ) @@ -152,6 +158,8 @@ finally: pool.close() validate_pairs(rows, args.players) report = { + "async_rollout": args.async_rollout, + "engine_workers": engine_workers, "player_count": args.players, "chance_win_rate": 1 / args.players, "deal_offset": args.deal_offset, diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 787c202..5fd7298 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -4952,5 +4952,33 @@ "job_id": "6abd6a43fbc85ba68235ca70" } ] + }, + "async_arena_pilot": { + "job_id": "6abd6b1c404719ba376143cb", + "run": "multiplayer-hard-e10-search48-search_geo-2p-async-pilot", + "source_bundle": { + "archive": "strong-source-v28.tgz", + "revision": "1632ae68aabb62fb924a6e119b7704f10dd3da4a", + "base_revision": "fe12e7a6b1fec2e04b749765af73477d39ded699", + "changed_files": [ + "ai/strong/evaluate.py", + "ai/strong/arena-job.py", + "ai/strong/verify-final.py" + ], + "archive_sha256": "e553912b0329cabc1b385ed70d49a7826a35f125ebc389aa81d81bb7ca4be848" + }, + "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "seed": "multiplayer-search-strong-probe-v1-2p", + "deal_offset": 0, + "games": 32, + "players": 2, + "opponent": "search_geo", + "samples": 48, + "geographic": true, + "async_rollout": true, + "workers": 32, + "purpose": "Timing/protocol pilot reusing already evaluated deals. Must not be counted as new independent strength evidence. Compare full terminal records with synchronous 24-worker completed shard.", + "local_validation": "Eight real paired 2p games, all four rule/auction combinations, sync8 vs async8: every terminal record exactly equal including final state, outcome, move counts and search counts. One search sample used for local protocol check; no local training.", + "local_timing_caveat": "Both local runs executed concurrently; their18.43s and9.93s are not isolated benchmarks. Await HF full-budget timing." } } diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index 0cb4118..6d06b81 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -11,6 +11,7 @@ if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then fi hf jobs run --detach --flavor cpu-performance --timeout 3h \ --secrets HF_TOKEN "${extra_env[@]}" \ + --env ASYNC_ARENA="${ASYNC_ARENA:-0}" \ --env DISABLE_SEARCH_PROPOSAL="${DISABLE_SEARCH_PROPOSAL:-0}" \ --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 --env SEARCH_SCOPE="${SEARCH_SCOPE:-all}" \ --env RUN_NAME="${1:?name}" --env MODEL_PATH="${2:?model path}" --env MODEL_REVISION="${3:?revision}" \ @@ -24,7 +25,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v27.tgz\",repo_type=\"dataset\", revision=\"fe12e7a6b1fec2e04b749765af73477d39ded699\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v28.tgz\",repo_type=\"dataset\", revision=\"1632ae68aabb62fb924a6e119b7704f10dd3da4a\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' From 5c43f8d728c14807894e0f38dc4fbef43a763dd2 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:12:28 +0200 Subject: [PATCH 068/184] Verify exact HF asynchronous arena equivalence and measured speedup --- ai/strong/experiments.json | 106 ++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 5fd7298..ffe5a85 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -4979,6 +4979,110 @@ "workers": 32, "purpose": "Timing/protocol pilot reusing already evaluated deals. Must not be counted as new independent strength evidence. Compare full terminal records with synchronous 24-worker completed shard.", "local_validation": "Eight real paired 2p games, all four rule/auction combinations, sync8 vs async8: every terminal record exactly equal including final state, outcome, move counts and search counts. One search sample used for local protocol check; no local training.", - "local_timing_caveat": "Both local runs executed concurrently; their18.43s and9.93s are not isolated benchmarks. Await HF full-budget timing." + "local_timing_caveat": "Both local runs executed concurrently; their18.43s and9.93s are not isolated benchmarks. Await HF full-budget timing.", + "status": "COMPLETED", + "result_revision": "d86b5a7e4d5bfd3daeb723bf7b7deceb8e0763cc", + "result": { + "async_rollout": true, + "engine_workers": 32, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-2p", + "games": 32, + "win_rate": 0.53125, + "truncated": 0, + "seconds": 484.2783763970001, + "inference_p95_ms": 1.0274208999817347, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 8, + "win_rate": 0.75, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 1.0 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 8, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 8, + "win_rate": 0.75, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 1.0 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 8, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.5 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.75 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 1764, + "evaluations": 140128, + "truncated": 0 + }, + "learner": { + "decisions": 1790, + "evaluations": 428544, + "truncated": 0 + } + } + }, + "comparison": { + "all_terminal_records_match": true, + "synchronous_seconds": 1147.2093434509989, + "asynchronous_seconds": 484.2783763970001, + "observed_speedup": 2.368904744387231, + "synchronous_workers": 24, + "asynchronous_workers": 32, + "limitation": "One exact-game batch on separate HF jobs; both scheduling and process count changed. No broad hardware-independent speed claim." + } } } From 46d294f8edfed3628c6ae62d36ac0581f3975444 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:13:39 +0200 Subject: [PATCH 069/184] Use verified asynchronous multiplayer arenas and isolate final settings --- ai/strong/launch-final.py | 3 +++ ai/strong/launch-multiplayer-arena.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ai/strong/launch-final.py b/ai/strong/launch-final.py index 7aa40c5..884b1e5 100644 --- a/ai/strong/launch-final.py +++ b/ai/strong/launch-final.py @@ -108,6 +108,9 @@ for item in plan: env.pop("OPPONENT_MODEL_PATH", None) env.pop("OPPONENT_MODEL_REVISION", None) env["SEARCH_SCOPE"] = candidate.get("search_scope", "all") + env["DISABLE_SEARCH_PROPOSAL"] = "0" + if multiplayer: + env["ASYNC_ARENA"] = "1" env["PLAYER_COUNT"] = str(item["player_count"]) env["DEAL_OFFSET"] = str(item["deal_offset"]) if "model_path" in opponent: diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index 6d06b81..3653e9f 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -11,7 +11,7 @@ if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then fi hf jobs run --detach --flavor cpu-performance --timeout 3h \ --secrets HF_TOKEN "${extra_env[@]}" \ - --env ASYNC_ARENA="${ASYNC_ARENA:-0}" \ + --env ASYNC_ARENA="${ASYNC_ARENA:-1}" \ --env DISABLE_SEARCH_PROPOSAL="${DISABLE_SEARCH_PROPOSAL:-0}" \ --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 --env SEARCH_SCOPE="${SEARCH_SCOPE:-all}" \ --env RUN_NAME="${1:?name}" --env MODEL_PATH="${2:?model path}" --env MODEL_REVISION="${3:?revision}" \ From 1f94fdc78b4373d5f3d29e274a7d9f45e4554cca Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:21:23 +0200 Subject: [PATCH 070/184] Measure small neural search-proposal contribution in paired ablation --- ai/strong/experiments.json | 104 ++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ffe5a85..6bc7c09 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -4418,13 +4418,113 @@ "geographic": true, "model_proposal": false, "opponent": "economic", - "interpretation": "Only omit model action from strategic search candidate set. Non-search moves still use model, so this is not a pure heuristic-search baseline. Compare paired completed model-proposal arm (92.5%).", + "interpretation": "The neural proposal adds only1.25 percentage points on this economic-opponent experiment; paired interval includes zero. Non-search actions remain neural in both arms, so this does not quantify the full neural policy contribution. Search assistance, not proposal quality alone, explains the large improvement over raw model. Continue stronger-league training.", "validation": [ "8 complete real games covering both seats and four rules, zero game or rollout truncation", "Combiner rejects mixing enabled/disabled proposal reports", "Final verifier rejects ablation reports as deployment evidence" ], - "status": "SUBMITTED" + "status": "COMPLETED", + "result_revision": "b9ca91525aabda5d4ac0a7c85e2573d6da890bb6", + "result": { + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": false, + "seed": "multiplayer-search-recovery-v1-2p", + "games": 160, + "win_rate": 0.9125, + "truncated": 0, + "seconds": 2529.305797967, + "inference_p95_ms": 0.36078840016671165, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 40, + "win_rate": 1.0, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 1.0, + 1.0 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 40, + "win_rate": 0.8, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7, + 0.9 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 40, + "win_rate": 0.95, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.875, + 1.0 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 40, + "win_rate": 0.9, + "independent_seeds": 20, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.775, + 1.0 + ] + } + ], + "independent_seeds": 20, + "seed_bootstrap_95_interval": [ + 0.86875, + 0.95625 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 8871, + "evaluations": 2134704, + "truncated": 0 + } + } + }, + "paired_comparison": { + "model_proposal_win_rate": 0.925, + "no_proposal_win_rate": 0.9125, + "paired_improvement": 0.0125, + "paired_seed_bootstrap_95_interval": [ + 0.0, + 0.03125 + ], + "changed_outcomes": 2, + "same_final_states": 153, + "games": 160, + "independent_deals": 20 + } }, "synchronous_geoleague_superseded": { "job_id": "6abd5cb4fbc85ba68235c728", From a1cd6b41752ec023da421d32bee61c1e2d336d61 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:23:15 +0200 Subject: [PATCH 071/184] Record first four-player geographic-search screening shard --- ai/strong/experiments.json | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 6bc7c09..5b0ef75 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -4807,6 +4807,100 @@ } } } + }, + "multiplayer-hard-e10-search48-search_geo-4p-probe-0": { + "result_revision": "d79a2cdafda691bf40fd3187e53de0ebf3eb1d5f", + "report": { + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-4p", + "games": 64, + "win_rate": 0.296875, + "truncated": 0, + "seconds": 2632.4126521050002, + "inference_p95_ms": 0.4395009998916062, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 16, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.4375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 16, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.5625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 16, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 16, + "win_rate": 0.3125, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.5 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.421875 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 10286, + "evaluations": 842912, + "truncated": 0 + }, + "learner": { + "decisions": 3461, + "evaluations": 855168, + "truncated": 0 + } + } + } } }, "combined_3p_search_geo": { From 59c2cf16473abdda8d0a14af9c02813010fed0d2 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:26:21 +0200 Subject: [PATCH 072/184] Verify ten-update neural checkpoint and launch paired standalone screening --- ai/strong/experiments.json | 1033 ++++++++++++++++++++++++++++++++++++ 1 file changed, 1033 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 5b0ef75..cf07458 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -5278,5 +5278,1038 @@ "asynchronous_workers": 32, "limitation": "One exact-game batch on separate HF jobs; both scheduling and process count changed. No broad hardware-independent speed claim." } + }, + "multiplayer_h200_update9_screening": { + "candidate_revision": "18832c5bd846d94b1b3376f75d1e1006bfdc8c4a", + "model_path": "runs/multiplayer-refine-hard-v1/best.onnx", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "training_games": 2400, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "max_logit_error": 3.814697265625e-05, + "max_value_error": 1.7285346984863281e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "selection_evaluations": [ + { + "stage": "evaluation", + "update": -1, + "2p/economic": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 0.5 + }, + "original/True": { + "games": 4, + "win": 0.0 + }, + "recharged/False": { + "games": 4, + "win": 0.5 + }, + "recharged/True": { + "games": 4, + "win": 0.5 + } + }, + "win": 0.375, + "truncated": 0, + "games": 16 + }, + "2p/heuristic": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 0.0 + }, + "original/True": { + "games": 4, + "win": 0.25 + }, + "recharged/False": { + "games": 4, + "win": 0.5 + }, + "recharged/True": { + "games": 4, + "win": 0.5 + } + }, + "win": 0.3125, + "truncated": 0, + "games": 16 + }, + "2p/rush": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 0.75 + }, + "original/True": { + "games": 4, + "win": 0.0 + }, + "recharged/False": { + "games": 4, + "win": 0.25 + }, + "recharged/True": { + "games": 4, + "win": 0.375 + } + }, + "win": 0.34375, + "truncated": 0, + "games": 16 + }, + "2p/legacy": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 1.0 + }, + "original/True": { + "games": 4, + "win": 1.0 + }, + "recharged/False": { + "games": 4, + "win": 1.0 + }, + "recharged/True": { + "games": 4, + "win": 1.0 + } + }, + "win": 1.0, + "truncated": 0, + "games": 16 + }, + "3p/economic": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.3333333333333333 + }, + "original/True": { + "games": 6, + "win": 0.3333333333333333 + }, + "recharged/False": { + "games": 6, + "win": 0.16666666666666666 + }, + "recharged/True": { + "games": 6, + "win": 1.0 + } + }, + "win": 0.4583333333333333, + "truncated": 0, + "games": 24 + }, + "3p/heuristic": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.6666666666666666 + }, + "original/True": { + "games": 6, + "win": 0.8333333333333334 + }, + "recharged/False": { + "games": 6, + "win": 0.6666666666666666 + }, + "recharged/True": { + "games": 6, + "win": 0.5 + } + }, + "win": 0.6666666666666666, + "truncated": 0, + "games": 24 + }, + "3p/rush": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.16666666666666666 + }, + "original/True": { + "games": 6, + "win": 0.5 + }, + "recharged/False": { + "games": 6, + "win": 0.5 + }, + "recharged/True": { + "games": 6, + "win": 0.6666666666666666 + } + }, + "win": 0.4583333333333333, + "truncated": 0, + "games": 24 + }, + "3p/legacy": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.8333333333333334 + }, + "original/True": { + "games": 6, + "win": 1.0 + }, + "recharged/False": { + "games": 6, + "win": 0.8333333333333334 + }, + "recharged/True": { + "games": 6, + "win": 1.0 + } + }, + "win": 0.9166666666666666, + "truncated": 0, + "games": 24 + }, + "4p/economic": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 0.375 + }, + "original/True": { + "games": 8, + "win": 0.75 + }, + "recharged/False": { + "games": 8, + "win": 0.625 + }, + "recharged/True": { + "games": 8, + "win": 0.75 + } + }, + "win": 0.625, + "truncated": 0, + "games": 32 + }, + "4p/heuristic": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 1.0 + }, + "original/True": { + "games": 8, + "win": 1.0 + }, + "recharged/False": { + "games": 8, + "win": 1.0 + }, + "recharged/True": { + "games": 8, + "win": 1.0 + } + }, + "win": 1.0, + "truncated": 0, + "games": 32 + }, + "4p/rush": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 0.25 + }, + "original/True": { + "games": 8, + "win": 0.5 + }, + "recharged/False": { + "games": 8, + "win": 0.875 + }, + "recharged/True": { + "games": 8, + "win": 0.75 + } + }, + "win": 0.59375, + "truncated": 0, + "games": 32 + }, + "4p/legacy": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 0.875 + }, + "original/True": { + "games": 8, + "win": 0.75 + }, + "recharged/False": { + "games": 8, + "win": 1.0 + }, + "recharged/True": { + "games": 8, + "win": 0.75 + } + }, + "win": 0.84375, + "truncated": 0, + "games": 32 + }, + "5p/economic": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 0.6 + }, + "original/True": { + "games": 10, + "win": 0.2 + }, + "recharged/False": { + "games": 10, + "win": 0.5 + }, + "recharged/True": { + "games": 10, + "win": 0.4 + } + }, + "win": 0.425, + "truncated": 0, + "games": 40 + }, + "5p/heuristic": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 0.9 + }, + "original/True": { + "games": 10, + "win": 1.0 + }, + "recharged/False": { + "games": 10, + "win": 0.9 + }, + "recharged/True": { + "games": 10, + "win": 0.9 + } + }, + "win": 0.925, + "truncated": 0, + "games": 40 + }, + "5p/rush": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 0.4 + }, + "original/True": { + "games": 10, + "win": 0.3 + }, + "recharged/False": { + "games": 10, + "win": 0.6 + }, + "recharged/True": { + "games": 10, + "win": 0.5 + } + }, + "win": 0.45, + "truncated": 0, + "games": 40 + }, + "5p/legacy": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 1.0 + }, + "original/True": { + "games": 10, + "win": 1.0 + }, + "recharged/False": { + "games": 10, + "win": 1.0 + }, + "recharged/True": { + "games": 10, + "win": 0.9 + } + }, + "win": 0.975, + "truncated": 0, + "games": 40 + }, + "6p/economic": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 0.08333333333333333 + }, + "original/True": { + "games": 12, + "win": 0.4166666666666667 + }, + "recharged/False": { + "games": 12, + "win": 0.16666666666666666 + }, + "recharged/True": { + "games": 12, + "win": 0.5 + } + }, + "win": 0.2916666666666667, + "truncated": 0, + "games": 48 + }, + "6p/heuristic": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 0.9166666666666666 + }, + "original/True": { + "games": 12, + "win": 0.5833333333333334 + }, + "recharged/False": { + "games": 12, + "win": 1.0 + }, + "recharged/True": { + "games": 12, + "win": 1.0 + } + }, + "win": 0.875, + "truncated": 0, + "games": 48 + }, + "6p/rush": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 0.3333333333333333 + }, + "original/True": { + "games": 12, + "win": 0.25 + }, + "recharged/False": { + "games": 12, + "win": 0.5 + }, + "recharged/True": { + "games": 12, + "win": 0.4166666666666667 + } + }, + "win": 0.375, + "truncated": 0, + "games": 48 + }, + "6p/legacy": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 1.0 + }, + "original/True": { + "games": 12, + "win": 1.0 + }, + "recharged/False": { + "games": 12, + "win": 0.9166666666666666 + }, + "recharged/True": { + "games": 12, + "win": 1.0 + } + }, + "win": 0.9791666666666666, + "truncated": 0, + "games": 48 + } + }, + { + "stage": "evaluation", + "update": 9, + "2p/economic": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 0.5 + }, + "original/True": { + "games": 4, + "win": 0.5 + }, + "recharged/False": { + "games": 4, + "win": 0.5 + }, + "recharged/True": { + "games": 4, + "win": 0.75 + } + }, + "win": 0.5625, + "truncated": 0, + "games": 16 + }, + "2p/heuristic": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 0.0 + }, + "original/True": { + "games": 4, + "win": 0.5 + }, + "recharged/False": { + "games": 4, + "win": 0.5 + }, + "recharged/True": { + "games": 4, + "win": 0.5 + } + }, + "win": 0.375, + "truncated": 0, + "games": 16 + }, + "2p/rush": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 0.0 + }, + "original/True": { + "games": 4, + "win": 0.25 + }, + "recharged/False": { + "games": 4, + "win": 0.5 + }, + "recharged/True": { + "games": 4, + "win": 0.75 + } + }, + "win": 0.375, + "truncated": 0, + "games": 16 + }, + "2p/legacy": { + "player_count": 2, + "by_rule": { + "original/False": { + "games": 4, + "win": 1.0 + }, + "original/True": { + "games": 4, + "win": 1.0 + }, + "recharged/False": { + "games": 4, + "win": 0.5 + }, + "recharged/True": { + "games": 4, + "win": 1.0 + } + }, + "win": 0.875, + "truncated": 0, + "games": 16 + }, + "3p/economic": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.3333333333333333 + }, + "original/True": { + "games": 6, + "win": 0.6666666666666666 + }, + "recharged/False": { + "games": 6, + "win": 0.3333333333333333 + }, + "recharged/True": { + "games": 6, + "win": 0.6666666666666666 + } + }, + "win": 0.5, + "truncated": 0, + "games": 24 + }, + "3p/heuristic": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.6666666666666666 + }, + "original/True": { + "games": 6, + "win": 0.5 + }, + "recharged/False": { + "games": 6, + "win": 1.0 + }, + "recharged/True": { + "games": 6, + "win": 0.6666666666666666 + } + }, + "win": 0.7083333333333334, + "truncated": 0, + "games": 24 + }, + "3p/rush": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.0 + }, + "original/True": { + "games": 6, + "win": 0.16666666666666666 + }, + "recharged/False": { + "games": 6, + "win": 0.5 + }, + "recharged/True": { + "games": 6, + "win": 0.6666666666666666 + } + }, + "win": 0.3333333333333333, + "truncated": 0, + "games": 24 + }, + "3p/legacy": { + "player_count": 3, + "by_rule": { + "original/False": { + "games": 6, + "win": 0.3333333333333333 + }, + "original/True": { + "games": 6, + "win": 0.6666666666666666 + }, + "recharged/False": { + "games": 6, + "win": 1.0 + }, + "recharged/True": { + "games": 6, + "win": 1.0 + } + }, + "win": 0.75, + "truncated": 0, + "games": 24 + }, + "4p/economic": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 0.25 + }, + "original/True": { + "games": 8, + "win": 0.375 + }, + "recharged/False": { + "games": 8, + "win": 0.625 + }, + "recharged/True": { + "games": 8, + "win": 0.375 + } + }, + "win": 0.40625, + "truncated": 0, + "games": 32 + }, + "4p/heuristic": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 1.0 + }, + "original/True": { + "games": 8, + "win": 1.0 + }, + "recharged/False": { + "games": 8, + "win": 1.0 + }, + "recharged/True": { + "games": 8, + "win": 1.0 + } + }, + "win": 1.0, + "truncated": 0, + "games": 32 + }, + "4p/rush": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 0.5 + }, + "original/True": { + "games": 8, + "win": 0.375 + }, + "recharged/False": { + "games": 8, + "win": 0.75 + }, + "recharged/True": { + "games": 8, + "win": 0.625 + } + }, + "win": 0.5625, + "truncated": 0, + "games": 32 + }, + "4p/legacy": { + "player_count": 4, + "by_rule": { + "original/False": { + "games": 8, + "win": 1.0 + }, + "original/True": { + "games": 8, + "win": 0.625 + }, + "recharged/False": { + "games": 8, + "win": 0.625 + }, + "recharged/True": { + "games": 8, + "win": 0.875 + } + }, + "win": 0.78125, + "truncated": 0, + "games": 32 + }, + "5p/economic": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 0.5 + }, + "original/True": { + "games": 10, + "win": 0.3 + }, + "recharged/False": { + "games": 10, + "win": 0.8 + }, + "recharged/True": { + "games": 10, + "win": 0.6 + } + }, + "win": 0.55, + "truncated": 0, + "games": 40 + }, + "5p/heuristic": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 1.0 + }, + "original/True": { + "games": 10, + "win": 1.0 + }, + "recharged/False": { + "games": 10, + "win": 1.0 + }, + "recharged/True": { + "games": 10, + "win": 1.0 + } + }, + "win": 1.0, + "truncated": 0, + "games": 40 + }, + "5p/rush": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 0.6 + }, + "original/True": { + "games": 10, + "win": 0.5 + }, + "recharged/False": { + "games": 10, + "win": 0.8 + }, + "recharged/True": { + "games": 10, + "win": 0.6 + } + }, + "win": 0.625, + "truncated": 0, + "games": 40 + }, + "5p/legacy": { + "player_count": 5, + "by_rule": { + "original/False": { + "games": 10, + "win": 0.8 + }, + "original/True": { + "games": 10, + "win": 0.7 + }, + "recharged/False": { + "games": 10, + "win": 0.9 + }, + "recharged/True": { + "games": 10, + "win": 1.0 + } + }, + "win": 0.85, + "truncated": 0, + "games": 40 + }, + "6p/economic": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 0.4166666666666667 + }, + "original/True": { + "games": 12, + "win": 0.25 + }, + "recharged/False": { + "games": 12, + "win": 0.5833333333333334 + }, + "recharged/True": { + "games": 12, + "win": 0.5 + } + }, + "win": 0.4375, + "truncated": 0, + "games": 48 + }, + "6p/heuristic": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 1.0 + }, + "original/True": { + "games": 12, + "win": 0.9166666666666666 + }, + "recharged/False": { + "games": 12, + "win": 0.8333333333333334 + }, + "recharged/True": { + "games": 12, + "win": 1.0 + } + }, + "win": 0.9375, + "truncated": 0, + "games": 48 + }, + "6p/rush": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 0.3333333333333333 + }, + "original/True": { + "games": 12, + "win": 0.75 + }, + "recharged/False": { + "games": 12, + "win": 0.5 + }, + "recharged/True": { + "games": 12, + "win": 0.5 + } + }, + "win": 0.5208333333333334, + "truncated": 0, + "games": 48 + }, + "6p/legacy": { + "player_count": 6, + "by_rule": { + "original/False": { + "games": 12, + "win": 0.9166666666666666 + }, + "original/True": { + "games": 12, + "win": 1.0 + }, + "recharged/False": { + "games": 12, + "win": 0.8333333333333334 + }, + "recharged/True": { + "games": 12, + "win": 1.0 + } + }, + "win": 0.9375, + "truncated": 0, + "games": 48 + } + } + ], + "purpose": "Same paired independent development seeds as hard/soft teacher screens. Raw neural policy, no search. Full40deal batches use24 synchronous workers to avoid up to960 simultaneous engine processes.", + "jobs": [ + { + "run": "multiplayer-h200-u9-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abd7064404719ba37614498" + }, + { + "run": "multiplayer-h200-u9-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abd7065404719ba3761449a" + }, + { + "run": "multiplayer-h200-u9-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abd7066404719ba3761449c" + }, + { + "run": "multiplayer-h200-u9-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abd7066fbc85ba68235cc1a" + }, + { + "run": "multiplayer-h200-u9-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abd7067fbc85ba68235cc1c" + }, + { + "run": "multiplayer-h200-u9-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abd7068404719ba3761449e" + } + ] } } From 297add08d2eda9ccc7f4d1122e98d69e5e365701 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:28:04 +0200 Subject: [PATCH 073/184] Record completed expanded frozen-opponent evaluation shard --- ai/strong/experiments.json | 93 +++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index cf07458..0541bb6 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -5145,7 +5145,98 @@ "opponent": "a260", "job_id": "6abd6a43fbc85ba68235ca70" } - ] + ], + "completed_shards": { + "multiplayer-hard-e10-search48-a260-3p-probe-8": { + "result_revision": "705c6e5cedf7ff7128b4d101453f12734c0ffaff", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 8, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.3854166666666667, + "truncated": 0, + "seconds": 1546.0823140599998, + "inference_p95_ms": 0.4417891498974314, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.4583333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.5833333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.6666666666666666 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.28125, + 0.4895833333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 3946, + "evaluations": 971808, + "truncated": 0 + } + } + } + } + } }, "async_arena_pilot": { "job_id": "6abd6b1c404719ba376143cb", From 67ef3bdf38dcc39308ca9e87204835bd4d02385d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:30:14 +0200 Subject: [PATCH 074/184] Confirm standalone neural gains at two and six players with paired tests --- ai/strong/experiments.json | 572 ++++++++++++++++++++++++++++++++++++- 1 file changed, 571 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 0541bb6..2666c80 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -6401,6 +6401,576 @@ "opponent": "a260", "job_id": "6abd7068404719ba3761449e" } - ] + ], + "completed_shards": { + "multiplayer-h200-u9-economic-2p": { + "result_revision": "61acfad18b52a2a6c43284f1c0ce8b9c97de0caa", + "report": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/18832c5bd846d94b1b3376f75d1e1006bfdc8c4a/runs/multiplayer-refine-hard-v1/best.onnx", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.590625, + "truncated": 0, + "seconds": 24.457294168000317, + "inference_p95_ms": 0.36400059989318795, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.575, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.675 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.5625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.7375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65, + 0.825 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.6875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.528125, + 0.65 + ], + "search_rollouts_reported": true, + "search_stats": {} + } + }, + "multiplayer-h200-u9-economic-3p": { + "result_revision": "61acfad18b52a2a6c43284f1c0ce8b9c97de0caa", + "report": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/18832c5bd846d94b1b3376f75d1e1006bfdc8c4a/runs/multiplayer-refine-hard-v1/best.onnx", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.4979166666666667, + "truncated": 0, + "seconds": 29.29300389400032, + "inference_p95_ms": 0.4005200001756748, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.5083333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.4125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.5125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5166666666666667, + 0.7 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.5541666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4666666666666667, + 0.6416666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.44375, + 0.5520833333333334 + ], + "search_rollouts_reported": true, + "search_stats": {} + } + }, + "multiplayer-h200-u9-economic-4p": { + "result_revision": "61acfad18b52a2a6c43284f1c0ce8b9c97de0caa", + "report": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/18832c5bd846d94b1b3376f75d1e1006bfdc8c4a/runs/multiplayer-refine-hard-v1/best.onnx", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.45625, + "truncated": 0, + "seconds": 40.856228199999805, + "inference_p95_ms": 0.40757700026006205, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.36875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.44375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.3, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.23125, + 0.36875 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.63125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55, + 0.7125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44375, + 0.6125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.4125, + 0.4984375 + ], + "search_rollouts_reported": true, + "search_stats": {} + } + }, + "multiplayer-h200-u9-economic-5p": { + "result_revision": "61acfad18b52a2a6c43284f1c0ce8b9c97de0caa", + "report": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/18832c5bd846d94b1b3376f75d1e1006bfdc8c4a/runs/multiplayer-refine-hard-v1/best.onnx", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.5775, + "truncated": 0, + "seconds": 45.34961280100015, + "inference_p95_ms": 0.41561599982742325, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.395, + 0.555 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.485, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.415, + 0.555 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.68, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.605, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.67, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.605, + 0.735 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.61875 + ], + "search_rollouts_reported": true, + "search_stats": {} + } + }, + "multiplayer-h200-u9-economic-6p": { + "result_revision": "9aa34bc2b86c1d488921b4c9423e50b3a01c33aa", + "report": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/18832c5bd846d94b1b3376f75d1e1006bfdc8c4a/runs/multiplayer-refine-hard-v1/best.onnx", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.5364583333333334, + "truncated": 0, + "seconds": 52.024567191, + "inference_p95_ms": 0.42027610000587845, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.39166666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3416666666666667, + 0.44583333333333336 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.43333333333333335, + 0.5625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.6291666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5458333333333333, + 0.7041666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5708333333333333, + 0.6791666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5010416666666667, + 0.571875 + ], + "search_rollouts_reported": true, + "search_stats": {} + } + }, + "multiplayer-h200-u9-a260-3p": { + "result_revision": "9aa34bc2b86c1d488921b4c9423e50b3a01c33aa", + "report": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/18832c5bd846d94b1b3376f75d1e1006bfdc8c4a/runs/multiplayer-refine-hard-v1/best.onnx", + "model_sha256": "03fa2596b2069cb1936c7bea99a914485dfbb11e77d685f18ee4da60a5791c81", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.24583333333333332, + "truncated": 0, + "seconds": 69.63945321199999, + "inference_p95_ms": 0.39903800000473644, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.20833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.13333333333333333, + 0.2916666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.20833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.14166666666666666, + 0.2833333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.30833333333333335, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.4083333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.25833333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.31666666666666665 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.20416666666666666, + 0.2875 + ], + "search_rollouts_reported": true, + "search_stats": {} + } + } + }, + "paired_against_initial_teacher": { + "multiplayer-h200-u9-economic-2p": { + "new_win": 0.590625, + "teacher_win": 0.5046875, + "paired_improvement": 0.0859375, + "paired_seed_bootstrap_95_interval": [ + 0.0125, + 0.159375 + ] + }, + "multiplayer-h200-u9-economic-3p": { + "new_win": 0.4979166666666667, + "teacher_win": 0.5020833333333333, + "paired_improvement": -0.004166666666666663, + "paired_seed_bootstrap_95_interval": [ + -0.06145833333333335, + 0.05208333333333333 + ] + }, + "multiplayer-h200-u9-economic-4p": { + "new_win": 0.45625, + "teacher_win": 0.50390625, + "paired_improvement": -0.04765625, + "paired_seed_bootstrap_95_interval": [ + -0.11484375, + 0.021875 + ] + }, + "multiplayer-h200-u9-economic-5p": { + "new_win": 0.5775, + "teacher_win": 0.539375, + "paired_improvement": 0.038125000000000006, + "paired_seed_bootstrap_95_interval": [ + -0.002500000000000003, + 0.079375 + ] + }, + "multiplayer-h200-u9-economic-6p": { + "new_win": 0.5364583333333334, + "teacher_win": 0.45416666666666666, + "paired_improvement": 0.08229166666666665, + "paired_seed_bootstrap_95_interval": [ + 0.03958333333333333, + 0.1255208333333333 + ] + }, + "multiplayer-h200-u9-a260-3p": { + "new_win": 0.24583333333333332, + "teacher_win": 0.19583333333333333, + "paired_improvement": 0.05, + "paired_seed_bootstrap_95_interval": [ + -0.00416666666666667, + 0.10416666666666666 + ] + } + }, + "decision": "Continue refinement: significant paired gains against economic at2p (+8.59pp, CI1.25..15.94) and6p (+8.23pp, CI3.96..12.55). Other paired intervals include zero; 3p against frozenA260 remains24.58%, below33.33% chance. No promotion or final qualification yet. Compare stronger geographic-league checkpoint when ready.", + "status": "COMPLETED" } } From 16ef52e8a1fef4e3474439fb5ed2aa105b499778 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:31:31 +0200 Subject: [PATCH 075/184] Complete larger frozen-opponent and four-player search screening analyses --- ai/strong/experiments.json | 541 +++++++++++++++++++++++++++++++++++++ 1 file changed, 541 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 2666c80..8579c52 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -4901,6 +4901,100 @@ } } } + }, + "multiplayer-hard-e10-search48-search_geo-4p-probe-4": { + "result_revision": "9aa34bc2b86c1d488921b4c9423e50b3a01c33aa", + "report": { + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 4, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-4p", + "games": 64, + "win_rate": 0.296875, + "truncated": 0, + "seconds": 2885.59967769, + "inference_p95_ms": 0.441980400137254, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 16, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 16, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 16, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.4375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 16, + "win_rate": 0.1875, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.25 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.21875, + 0.359375 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 10641, + "evaluations": 873328, + "truncated": 0 + }, + "learner": { + "decisions": 3476, + "evaluations": 854064, + "truncated": 0 + } + } + } } }, "combined_3p_search_geo": { @@ -5235,6 +5329,273 @@ } } } + }, + "multiplayer-hard-e10-search48-a260-3p-probe-16": { + "result_revision": "9aa34bc2b86c1d488921b4c9423e50b3a01c33aa", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 16, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.4166666666666667, + "truncated": 0, + "seconds": 1637.468523095, + "inference_p95_ms": 0.462881999919773, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.5416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.4583333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.8333333333333334 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.2708333333333333, + 0.5729166666666666 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 3918, + "evaluations": 970032, + "truncated": 0 + } + } + } + }, + "multiplayer-hard-e10-search48-a260-3p-probe-24": { + "result_revision": "9aa34bc2b86c1d488921b4c9423e50b3a01c33aa", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 24, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.3958333333333333, + "truncated": 0, + "seconds": 1532.178332502, + "inference_p95_ms": 0.4450749999818981, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.5416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.5833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.75 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.28125, + 0.5104166666666666 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 4049, + "evaluations": 991776, + "truncated": 0 + } + } + } + }, + "multiplayer-hard-e10-search48-a260-3p-probe-32": { + "result_revision": "9aa34bc2b86c1d488921b4c9423e50b3a01c33aa", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 32, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.4479166666666667, + "truncated": 0, + "seconds": 1550.897306517, + "inference_p95_ms": 0.4322910000382762, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.5833333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.4583333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.7083333333333334 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.7083333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 0.9166666666666666 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.6041666666666666 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 4078, + "evaluations": 1009296, + "truncated": 0 + } + } + } } } }, @@ -6972,5 +7333,185 @@ }, "decision": "Continue refinement: significant paired gains against economic at2p (+8.59pp, CI1.25..15.94) and6p (+8.23pp, CI3.96..12.55). Other paired intervals include zero; 3p against frozenA260 remains24.58%, below33.33% chance. No promotion or final qualification yet. Compare stronger geographic-league checkpoint when ready.", "status": "COMPLETED" + }, + "multiplayer_search_completed_screens": { + "4p/search_geo": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 4, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-4p-probe-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-4p-probe-4/evaluation.json" + ], + "games": 128, + "independent_seeds": 8, + "win_rate": 0.296875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.234375, + 0.3671875 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 20927, + "evaluations": 1716240, + "truncated": 0 + }, + "learner": { + "decisions": 6937, + "evaluations": 1709232, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 32, + "independent_seeds": 8, + "win_rate": 0.3125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15625, + 0.46875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 32, + "independent_seeds": 8, + "win_rate": 0.3125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15625, + 0.46875 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 32, + "independent_seeds": 8, + "win_rate": 0.3125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.4375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 32, + "independent_seeds": 8, + "win_rate": 0.25, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.375 + ] + } + ] + }, + "3p/a260": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 3, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-4/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-8/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-16/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-24/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-a260-3p-probe-32/evaluation.json" + ], + "games": 480, + "independent_seeds": 40, + "win_rate": 0.42083333333333334, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35833333333333334, + 0.48333333333333334 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 19918, + "evaluations": 4914384, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.3333333333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.24166666666666667, + 0.43333333333333335 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.425, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.525 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2833333333333333, + 0.4666666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.55, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44166666666666665, + 0.65 + ] + } + ] + }, + "decision": "3p against frozenA26042.083% across480games40deals, overallCI35.833..48.333 abovechance33.333 but original/open, original/sealed, Recharged/open rule intervals includechance.4p search_geo29.688% across128games8deals, CI23.438..36.719 includeschance25 and point below32.5% finalfloor. No final qualification/promotion. Continue stronger-league training." } } From 51131ef9cf6440a4cc2eb32365d009ffb8eb3fd1 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:32:31 +0200 Subject: [PATCH 076/184] Complete forty-deal three-player geographic-search evaluation --- ai/strong/experiments.json | 472 ++++++++++++++++++++++++++++++++++++- 1 file changed, 471 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 8579c52..6a97d88 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -5596,6 +5596,382 @@ } } } + }, + "multiplayer-hard-e10-search48-search_geo-3p-probe-8": { + "result_revision": "52046dc1684f562fe6dea3b4d3ac74ee01a853ac", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 8, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.4010416666666667, + "truncated": 0, + "seconds": 1881.071981207, + "inference_p95_ms": 0.41884099982780754, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.5833333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.3958333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.5833333333333334 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.4739583333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 5206, + "evaluations": 1266672, + "truncated": 0 + }, + "search_geo": { + "decisions": 10299, + "evaluations": 834736, + "truncated": 0 + } + } + } + }, + "multiplayer-hard-e10-search48-search_geo-3p-probe-16": { + "result_revision": "52046dc1684f562fe6dea3b4d3ac74ee01a853ac", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 16, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.46875, + "truncated": 0, + "seconds": 1863.8440611040005, + "inference_p95_ms": 0.4151220000494503, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.5833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.7916666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.5416666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.7083333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.4583333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.7083333333333334 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3854166666666667, + 0.5520833333333334 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 5118, + "evaluations": 1247424, + "truncated": 0 + }, + "search_geo": { + "decisions": 9896, + "evaluations": 803152, + "truncated": 0 + } + } + } + }, + "multiplayer-hard-e10-search48-search_geo-3p-probe-24": { + "result_revision": "52046dc1684f562fe6dea3b4d3ac74ee01a853ac", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 24, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.40625, + "truncated": 0, + "seconds": 1835.0430929837748, + "inference_p95_ms": 0.41772658005356744, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.5416666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.5416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.4583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.5416666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.75 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3541666666666667, + 0.4583333333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 9800, + "evaluations": 794288, + "truncated": 0 + }, + "learner": { + "decisions": 5065, + "evaluations": 1237872, + "truncated": 0 + } + } + } + }, + "multiplayer-hard-e10-search48-search_geo-3p-probe-32": { + "result_revision": "52046dc1684f562fe6dea3b4d3ac74ee01a853ac", + "report": { + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 32, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-3p", + "games": 96, + "win_rate": 0.4427083333333333, + "truncated": 0, + "seconds": 1885.7822237470002, + "inference_p95_ms": 0.41615150018969843, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.3125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.5 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.5416666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.5, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.7083333333333334 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.359375, + 0.5260416666666666 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 10202, + "evaluations": 834192, + "truncated": 0 + }, + "learner": { + "decisions": 5143, + "evaluations": 1257456, + "truncated": 0 + } + } + } } } }, @@ -7512,6 +7888,100 @@ } ] }, - "decision": "3p against frozenA26042.083% across480games40deals, overallCI35.833..48.333 abovechance33.333 but original/open, original/sealed, Recharged/open rule intervals includechance.4p search_geo29.688% across128games8deals, CI23.438..36.719 includeschance25 and point below32.5% finalfloor. No final qualification/promotion. Continue stronger-league training." + "decision": "3p against frozenA26042.083% across480games40deals, overallCI35.833..48.333 abovechance33.333 but original/open, original/sealed, Recharged/open rule intervals includechance.4p search_geo29.688% across128games8deals, CI23.438..36.719 includeschance25 and point below32.5% finalfloor. No final qualification/promotion. Continue stronger-league training.", + "3p/search_geo": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 3, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-4/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-8/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-16/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-24/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-3p-probe-32/evaluation.json" + ], + "games": 480, + "independent_seeds": 40, + "win_rate": 0.44375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.409375, + 0.4791666666666667 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 49833, + "evaluations": 4054000, + "truncated": 0 + }, + "learner": { + "decisions": 25646, + "evaluations": 6264480, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.4375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3458333333333333, + 0.5291666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.3958333333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.31666666666666665, + 0.4791666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.475, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "independent_seeds": 40, + "win_rate": 0.4666666666666667, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.5583333333333333 + ] + } + ] + }, + "three_player_search_decision": "40-deal expansion:44.375% over480games, overallCI40.938..47.917 abovechance33.333 and point above40% floor. Original/sealedCI31.667..47.917 stillincludeschance. This is development screening, not reserved final qualification. Does not resolve2p/4p weaknesses; continue stronger-league training." } } From d399128f5a17503c6f5caf0ef6308305848a8740 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:41:10 +0200 Subject: [PATCH 077/184] Pilot stronger teacher data from games against geographic-search opponents --- ai/strong/audit-teacher-dataset.py | 4 +++- ai/strong/experiments.json | 26 ++++++++++++++++++++++++++ ai/strong/generate-search-data.py | 8 ++++++++ ai/strong/launch-strong-teacher.sh | 28 ++++++++++++++++++++++++++++ ai/strong/search-teacher.cjs | 26 ++++++++++++++++++++++++-- 5 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 ai/strong/launch-strong-teacher.sh diff --git a/ai/strong/audit-teacher-dataset.py b/ai/strong/audit-teacher-dataset.py index 82df322..3fdb3b4 100644 --- a/ai/strong/audit-teacher-dataset.py +++ b/ai/strong/audit-teacher-dataset.py @@ -53,7 +53,9 @@ for shard, n in enumerate(range(2, 7)): seat = game["rows"][0]["seat"] win = game["value"][seat] stats["teacher_win_credit"] += win - opponent = ["economic", "heuristic", "rush"][game["id"] // (4 * n) % 3] + opponent = game.get( + "opponent", ["economic", "heuristic", "rush"][game["id"] // (4 * n) % 3] + ) opp = opponents.setdefault(opponent, dict(games=0, win_credit=0.0)) opp["games"] += 1 opp["win_credit"] += win diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 6a97d88..740dbdb 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -7983,5 +7983,31 @@ ] }, "three_player_search_decision": "40-deal expansion:44.375% over480games, overallCI40.938..47.917 abovechance33.333 and point above40% floor. Original/sealedCI31.667..47.917 stillincludeschance. This is development screening, not reserved final qualification. Does not resolve2p/4p weaknesses; continue stronger-league training." + }, + "strong_opponent_teacher_pilot": { + "job_id": "6abd73cbfbc85ba68235ccca", + "version": "multiplayer-teacher-v2-strong-pilot", + "shard": 1, + "players": 3, + "games": 24, + "teacher_samples": 48, + "opponent": "search_geo", + "opponent_samples": 16, + "workers": 24, + "source_bundle": { + "archive": "strong-source-v29.tgz", + "revision": "a30fdb26474d2d78a4803f396c8888f9d974a371", + "base_revision": "1632ae68aabb62fb924a6e119b7704f10dd3da4a", + "changed_files": [ + "ai/strong/search-teacher.cjs", + "ai/strong/generate-search-data.py", + "ai/strong/audit-teacher-dataset.py" + ], + "archive_sha256": "be0a6acaf6d7432c90bf1a447e60f1517486a34c582e84a1a99801d091f82714" + }, + "purpose": "Generate fresh supervised examples under strong opponent resource/city pressure; existing teacher data uses only economic/heuristic/rush opponents. Pilot before scaling across2\u20136players. Existing PPO jobs unchanged.", + "local_validation": "One complete3p game with one sample per search:118 valid schema4 positions,450 opponent rollouts, no game/teacher/opponent truncation; value rotations and candidate targets validated. No local optimization.", + "acceptance": "Require all24 complete games, every seat/rule cell exactly twice, zero teacher/opponent rollout truncation, valid targets and outcomes, and measurable teacher performance before dataset scaling. Do not treat training-data win rate as held-out strength evidence.", + "status": "SUBMITTED" } } diff --git a/ai/strong/generate-search-data.py b/ai/strong/generate-search-data.py index 6ae8bf3..584d150 100644 --- a/ai/strong/generate-search-data.py +++ b/ai/strong/generate-search-data.py @@ -19,6 +19,8 @@ counts = { "truncated": 0, "search_rollouts": 0, "search_rollouts_truncated": 0, + "opponent_search_rollouts": 0, + "opponent_search_rollouts_truncated": 0, } @@ -43,6 +45,12 @@ with concurrent.futures.ThreadPoolExecutor( counts["truncated"] += game["truncated"] counts["search_rollouts"] += game["searchStats"]["evaluations"] counts["search_rollouts_truncated"] += game["searchStats"]["truncated"] + counts["opponent_search_rollouts"] += game.get( + "opponentSearchStats", {} + ).get("evaluations", 0) + counts["opponent_search_rollouts_truncated"] += game.get( + "opponentSearchStats", {} + ).get("truncated", 0) # Keep truncated metadata, but never turn incomplete outcomes into targets. if game["truncated"]: game["rows"] = [] diff --git a/ai/strong/launch-strong-teacher.sh b/ai/strong/launch-strong-teacher.sh new file mode 100644 index 0000000..7a89506 --- /dev/null +++ b/ai/strong/launch-strong-teacher.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -euo pipefail +players=${1:?Specify player count 2–6} +[[ "$players" =~ ^[2-6]$ ]] +shard=$((players - 2)) +version=${DATA_VERSION:-multiplayer-teacher-v2-strong-pilot} +games=${GAMES:-24} +[[ "$version" =~ ^[a-zA-Z0-9_-]+$ ]] +[[ "$games" =~ ^[0-9]+$ ]] +(( games >= 8 * players && games % (4 * players) == 0 )) +[[ "$shard" =~ ^[0-9]+$ ]] +hf jobs run --detach --flavor cpu-performance --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env TEACHER_OPPONENTS=search_geo --env OPPONENT_SEARCH_SAMPLES=16 \ + --env SHARD="$shard" --env GAMES="$games" --env DATA_WORKERS=24 --env SEARCH_SAMPLES=48 --env GEOGRAPHY=1 --env FEATURE_REVISION=4.0-multiplayer --env PLAYER_COUNT="$players" --env DATA_VERSION="$version" --env INCLUDE_ALL_PHASES=1 \ + --label project=powergrid-ai --label stage="$version-$shard" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v29.tgz\",repo_type=\"dataset\",revision=\"a30fdb26474d2d78a4803f396c8888f9d974a371\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/generate-search-data.py +' diff --git a/ai/strong/search-teacher.cjs b/ai/strong/search-teacher.cjs index f5db85d..90f3d82 100644 --- a/ai/strong/search-teacher.cjs +++ b/ai/strong/search-teacher.cjs @@ -21,6 +21,14 @@ const id = Number(process.argv[2] || 0), rng = c.seedrandom(seed + '-choices'), samples = Number(process.env.SEARCH_SAMPLES || 4), rows = []; +const opponentModes = (process.env.TEACHER_OPPONENTS || 'economic,heuristic,rush').split(','); +if (!opponentModes.length || opponentModes.some((x) => !['economic', 'heuristic', 'rush', 'search_geo'].includes(x))) + throw Error('Invalid teacher opponent mixture'); +const opponent = opponentModes[Math.floor(id / (4 * playerCount)) % opponentModes.length]; +const opponentSamples = Number(process.env.OPPONENT_SEARCH_SAMPLES || 16); +if (![samples, opponentSamples].every((x) => Number.isInteger(x) && x >= 1 && x <= 64)) + throw Error('Invalid search sample count'); +const opponentSearchStats = { decisions: 0, evaluations: 0, truncated: 0 }; let steps = 0; const searchStats = { decisions: 0, evaluations: 0, truncated: 0 }; while (!c.E.ended(g) && steps < 1600) { @@ -52,12 +60,22 @@ while (!c.E.ended(g) && steps < 1600) { seat, }); } + } else if (p !== seat && strategic && opponent === 'search_geo') { + const result = search.choose(g, p, { + samples: opponentSamples, + candidates: 6, + geography: true, + seed: seed + '-opponent-' + steps, + }); + action = result.action; + opponentSearchStats.decisions++; + opponentSearchStats.evaluations += result.evaluations || 0; + opponentSearchStats.truncated += result.truncated || 0; } else { - const opponent = ['economic', 'heuristic', 'rush'][Math.floor(id / (4 * playerCount)) % 3]; action = p !== seat && opponent === 'heuristic' ? c.heuristic(g, p, rng).action - : eco.choose(g, p, rng, p === seat ? 'economic' : opponent).action; + : eco.choose(g, p, rng, p === seat || opponent === 'search_geo' ? 'economic' : opponent).action; if (p === seat && legal.length > 1 && process.env.INCLUDE_ALL_PHASES === '1') { const x = features.encode(g, p), target = x.moves.findIndex((a) => JSON.stringify(a) === JSON.stringify(action)); @@ -91,6 +109,10 @@ console.log( variant: g.options.variant, sealed: !!g.options.fastBid, searchStats, + opponent, + opponentSearchStats, + teacherSearchSamples: samples, + opponentSearchSamples: opponent === 'search_geo' ? opponentSamples : 0, steps, truncated, value, From e9fa0e00e4157abe7e278fa3ff35fb0406ce7d7f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:48:01 +0200 Subject: [PATCH 078/184] Audit strong-opponent teacher pilot and scale balanced data generation --- ai/strong/audit-teacher-dataset.py | 13 +++++ ai/strong/experiments.json | 88 +++++++++++++++++++++++++++++- ai/strong/launch-strong-teacher.sh | 2 +- 3 files changed, 101 insertions(+), 2 deletions(-) diff --git a/ai/strong/audit-teacher-dataset.py b/ai/strong/audit-teacher-dataset.py index 3fdb3b4..66a6ac9 100644 --- a/ai/strong/audit-teacher-dataset.py +++ b/ai/strong/audit-teacher-dataset.py @@ -29,6 +29,8 @@ for shard, n in enumerate(range(2, 7)): truncated=0, search_rollouts=0, search_rollouts_truncated=0, + opponent_search_rollouts=0, + opponent_search_rollouts_truncated=0, teacher_win_credit=0.0, disagreements=0, ) @@ -47,6 +49,11 @@ for shard, n in enumerate(range(2, 7)): stats["positions"] += len(game["rows"]) stats["search_rollouts"] += game["searchStats"]["evaluations"] stats["search_rollouts_truncated"] += game["searchStats"]["truncated"] + opponent_search = game.get("opponentSearchStats", {}) + stats["opponent_search_rollouts"] += opponent_search.get("evaluations", 0) + stats["opponent_search_rollouts_truncated"] += opponent_search.get( + "truncated", 0 + ) if game["truncated"]: continue assert game["rows"] @@ -72,6 +79,12 @@ for shard, n in enumerate(range(2, 7)): } ) assert stats["games"] == 240 and len(cells) == n * 4 + assert ( + stats["truncated"] + == stats["search_rollouts_truncated"] + == stats["opponent_search_rollouts_truncated"] + == 0 + ) summary[str(n)] = { **stats, "seat_rule_cells": len(cells), diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 740dbdb..ddd96fa 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8008,6 +8008,92 @@ "purpose": "Generate fresh supervised examples under strong opponent resource/city pressure; existing teacher data uses only economic/heuristic/rush opponents. Pilot before scaling across2\u20136players. Existing PPO jobs unchanged.", "local_validation": "One complete3p game with one sample per search:118 valid schema4 positions,450 opponent rollouts, no game/teacher/opponent truncation; value rotations and candidate targets validated. No local optimization.", "acceptance": "Require all24 complete games, every seat/rule cell exactly twice, zero teacher/opponent rollout truncation, valid targets and outcomes, and measurable teacher performance before dataset scaling. Do not treat training-data win rate as held-out strength evidence.", - "status": "SUBMITTED" + "status": "COMPLETED", + "audit": { + "revision": "6fb178f28fb4911c2b7d28559b9d2bf7ea2ad4fd", + "games": 24, + "positions": 3095, + "teacher_win_credit": 9, + "teacher_win_rate": 0.375, + "seat_rule_cells": 12, + "games_per_cell": 2, + "validation_games": 12, + "training_games": 12, + "teacher_rollouts": 300624, + "opponent_rollouts": 202800, + "game_and_search_truncations": 0, + "unique_seeds": 24, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 6, + "wins": 2 + }, + { + "variant": "original", + "sealed": true, + "games": 6, + "wins": 1 + }, + { + "variant": "recharged", + "sealed": false, + "games": 6, + "wins": 2 + }, + { + "variant": "recharged", + "sealed": true, + "games": 6, + "wins": 4 + } + ] + }, + "decision": "Schema, coverage and truncation checks pass.9/24teacherwins are not proof of superiority. Scale to expose training to strong-opponent states; judge learned checkpoint via independent arenas." + }, + "strong_opponent_teacher_dataset": { + "version": "multiplayer-teacher-v2-strong", + "games_per_count": 240, + "counts": [ + 2, + 3, + 4, + 5, + 6 + ], + "teacher_samples": 48, + "opponent": "search_geo", + "opponent_samples": 16, + "source_revision": "a30fdb26474d2d78a4803f396c8888f9d974a371", + "timeout": "6h", + "purpose": "Broader hard-state supervision, complementary to original weak-opponent dataset. Outcomes not held-out strength evidence. Audit every full shard before optimization.", + "jobs": [ + { + "players": 2, + "shard": 0, + "job_id": "6abd7568fbc85ba68235cd24" + }, + { + "players": 3, + "shard": 1, + "job_id": "6abd7568fbc85ba68235cd26" + }, + { + "players": 4, + "shard": 2, + "job_id": "6abd7569fbc85ba68235cd28" + }, + { + "players": 5, + "shard": 3, + "job_id": "6abd756a404719ba3761453b" + }, + { + "players": 6, + "shard": 4, + "job_id": "6abd756a404719ba3761453d" + } + ] } } diff --git a/ai/strong/launch-strong-teacher.sh b/ai/strong/launch-strong-teacher.sh index 7a89506..b58cdce 100644 --- a/ai/strong/launch-strong-teacher.sh +++ b/ai/strong/launch-strong-teacher.sh @@ -9,7 +9,7 @@ games=${GAMES:-24} [[ "$games" =~ ^[0-9]+$ ]] (( games >= 8 * players && games % (4 * players) == 0 )) [[ "$shard" =~ ^[0-9]+$ ]] -hf jobs run --detach --flavor cpu-performance --timeout 3h \ +hf jobs run --detach --flavor cpu-performance --timeout "${JOB_TIMEOUT:-6h}" \ --secrets HF_TOKEN \ --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ --env TEACHER_OPPONENTS=search_geo --env OPPONENT_SEARCH_SAMPLES=16 \ From ec556f375c6540738122454a263fe442b21a00d2 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:51:09 +0200 Subject: [PATCH 079/184] Prepare verified warm-start distillation with balanced teacher replay --- ai/strong/distill.py | 138 +++++++++++++++++++++++---------- ai/strong/distill_data.py | 27 +++++++ ai/strong/experiments.json | 17 ++++ ai/strong/test_distill_data.py | 54 +++++++++++++ 4 files changed, 194 insertions(+), 42 deletions(-) create mode 100644 ai/strong/distill_data.py create mode 100644 ai/strong/test_distill_data.py diff --git a/ai/strong/distill.py b/ai/strong/distill.py index afca799..95ad741 100644 --- a/ai/strong/distill.py +++ b/ai/strong/distill.py @@ -18,6 +18,7 @@ from model import Policy, tensors from model_v4 import MultiplayerPolicy from teacher_contract import validate_game, validation_seeds from distillation_targets import policy_targets +from distill_data import source_count_weights, validate_initial_checkpoint from feature_contract import FEATURE_REVISION, embed_revision architecture = os.getenv("ARCHITECTURE", "policy") @@ -43,6 +44,26 @@ device = "cuda" net = ( MultiplayerPolicy(ordered_players=ordered_players) if multiplayer else Policy() ).to(device) +initial_checkpoint = os.getenv("INIT_CHECKPOINT") +initial_revision = os.getenv("INIT_REVISION") +if bool(initial_checkpoint) != bool(initial_revision): + raise ValueError("Pin both INIT_CHECKPOINT and INIT_REVISION") +if initial_checkpoint: + if len(initial_revision) != 40 or any( + c not in "0123456789abcdef" for c in initial_revision + ): + raise ValueError("INIT_REVISION must be an immutable commit") + checkpoint = torch.load( + hf_hub_download( + os.environ["HF_MODEL_REPO"], initial_checkpoint, revision=initial_revision + ), + map_location="cpu", + weights_only=True, + ) + validate_initial_checkpoint( + checkpoint, architecture, FEATURE_REVISION, state_dim, action_dim + ) + net.load_state_dict(checkpoint["state_dict"]) train, validation = [], [] dataset_revisions = [] seen_games = set() @@ -50,37 +71,64 @@ complete_games = [] version = os.getenv("DATA_VERSION", "search-teacher-v1") target_mode = os.getenv("TARGET_MODE", "hard") assert target_mode in ["hard", "soft"] -for shard in range(int(os.getenv("SHARDS", "4"))): - path = hf_hub_download( - os.environ["HF_DATA_REPO"], - f"{version}/{version}-{shard}.jsonl.gz", - repo_type="dataset", - revision=os.getenv("DATA_REVISION"), - ) - dataset_revisions.append({"shard": shard, "revision": Path(path).parents[1].name}) - with gzip.open(path, "rt") as source: - for line in source: - game = json.loads(line) - if game.get("featureRevision", "3.0") != FEATURE_REVISION: - raise ValueError( - "Dataset uses a different feature revision; use its archived encoder or regenerate" - ) - if multiplayer: - validate_game(game) - if game["seed"] in seen_games: - raise ValueError("Duplicate teacher game") - seen_games.add(game["seed"]) - if game["truncated"]: - continue - for row in game["rows"]: - row["player_count"] = game.get("playerCount", 3) - row["variant"] = game.get("variant") - row["sealed"] = game.get("sealed") - row["state"] = np.asarray(row["state"], np.float32) - row["actions"] = np.asarray(row["actions"], np.float32) - complete_games.append(game) +sources = [(version, os.getenv("DATA_REVISION"))] +replay_version, replay_revision = ( + os.getenv("REPLAY_DATA_VERSION"), + os.getenv("REPLAY_DATA_REVISION"), +) +if bool(replay_version) != bool(replay_revision): + raise ValueError("Pin both replay dataset version and revision") +if replay_version: + if len(replay_revision) != 40 or any( + c not in "0123456789abcdef" for c in replay_revision + ): + raise ValueError("Replay revision must be an immutable commit") + sources.append((replay_version, replay_revision)) +for source_index, (source_version, source_revision) in enumerate(sources): + for shard in range(int(os.getenv("SHARDS", "4"))): + path = hf_hub_download( + os.environ["HF_DATA_REPO"], + f"{source_version}/{source_version}-{shard}.jsonl.gz", + repo_type="dataset", + revision=source_revision, + ) + dataset_revisions.append( + { + "version": source_version, + "shard": shard, + "revision": Path(path).parents[1].name, + } + ) + with gzip.open(path, "rt") as source: + for line in source: + game = json.loads(line) + if game.get("featureRevision", "3.0") != FEATURE_REVISION: + raise ValueError( + "Dataset uses a different feature revision; use its archived encoder or regenerate" + ) + if multiplayer: + validate_game(game) + if game["seed"] in seen_games: + raise ValueError("Duplicate teacher game") + seen_games.add(game["seed"]) + if game["truncated"]: + continue + game["dataset_source"] = source_index + for row in game["rows"]: + row["dataset_source"] = source_index + row["player_count"] = game.get("playerCount", 3) + row["variant"] = game.get("variant") + row["sealed"] = game.get("sealed") + row["state"] = np.asarray(row["state"], np.float32) + row["actions"] = np.asarray(row["actions"], np.float32) + complete_games.append(game) held_out = ( - validation_seeds(complete_games) + set().union( + *( + validation_seeds([g for g in complete_games if g["dataset_source"] == i]) + for i in range(len(sources)) + ) + ) if multiplayer else {g["seed"] for g in complete_games if g["id"] % 5 == 0} ) @@ -94,12 +142,25 @@ if multiplayer and ( or set(validation_sizes) != set(player_counts) ): raise ValueError("Every player count must appear in training and validation") +balance_weights = source_count_weights(train, player_counts) +source_count_weights(validation, player_counts) +for row in train: + row["balance_weight"] = balance_weights[ + (row["dataset_source"], row["player_count"]) + ] print( json.dumps( { "stage": "dataset_loaded", "train_counts": dict(count_sizes), "validation_counts": dict(validation_sizes), + "teacher_sources": dataset_revisions, + "train_source_counts": { + f"{source}/{n}": count + for (source, n), count in Counter( + (r["dataset_source"], r["player_count"]) for r in train + ).items() + }, } ), flush=True, @@ -118,6 +179,9 @@ def export(name): "schema": 4 if multiplayer else 3, "architecture": architecture if multiplayer else "policy", "feature_revision": FEATURE_REVISION, + "initial_checkpoint": initial_checkpoint, + "initial_revision": initial_revision, + "teacher_sources": dataset_revisions, "state_dim": state_dim, "action_dim": action_dim, "state_dict": {k: v.detach().cpu() for k, v in net.state_dict().items()}, @@ -197,12 +261,7 @@ for epoch in range(int(os.getenv("EPOCHS", "30")) + 1): if r["teacherAgrees"] else float(os.getenv("DISAGREEMENT_WEIGHT", "3")) ) - * ( - len(train) - / (len(player_counts) * count_sizes[r["player_count"]]) - if multiplayer - else 1.0 - ) + * (r["balance_weight"]) for r in rows ], device=device, @@ -213,12 +272,7 @@ for epoch in range(int(os.getenv("EPOCHS", "30")) + 1): [r["player_count"] for r in rows], device=device ) balance = torch.tensor( - [ - len(train) / (len(player_counts) * count_sizes[r["player_count"]]) - if multiplayer - else 1.0 - for r in rows - ], + [r["balance_weight"] for r in rows], device=device, ) loss = (ce * weights).sum() / weights.sum() + 0.2 * ( diff --git a/ai/strong/distill_data.py b/ai/strong/distill_data.py new file mode 100644 index 0000000..8825a82 --- /dev/null +++ b/ai/strong/distill_data.py @@ -0,0 +1,27 @@ +"""Balance replay sources without changing their per-player-count coverage.""" + +from collections import Counter + + +def source_count_weights(rows, player_counts): + sizes = Counter((r.get("dataset_source", 0), r["player_count"]) for r in rows) + sources = {source for source, _ in sizes} + expected = {(source, n) for source in sources for n in player_counts} + if not rows or set(sizes) != expected: + raise ValueError("Every teacher source must cover every player count") + return {key: len(rows) / (len(sizes) * size) for key, size in sizes.items()} + + +def validate_initial_checkpoint( + checkpoint, architecture, revision, state_dim, action_dim +): + expected = dict( + architecture=architecture, + feature_revision=revision, + state_dim=state_dim, + action_dim=action_dim, + ) + if any(checkpoint.get(key) != value for key, value in expected.items()): + raise ValueError( + "Distillation warm start requires the exact architecture and feature contract" + ) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ddd96fa..9cdee47 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8095,5 +8095,22 @@ "job_id": "6abd756a404719ba3761453d" } ] + }, + "strong_teacher_replay_preparation": { + "status": "IMPLEMENTED_NOT_TRAINED", + "purpose": "Warm-start same architecture/feature contract; retain original teacher examples while learning new hard-state data. Equal base weight for each source/player-count cell; disagreement weights remain additional policy supervision weights.", + "data_controls": [ + "Immutable replay revision required", + "Duplicate game seeds rejected across sources", + "Whole-game validation split separately within each source, count, seat and rule", + "Each source must cover every player count in train and validation" + ], + "validation": [ + "Four pure unit tests for source/count balance, legacy balance equivalence, incomplete-source rejection and warm-start contract rejection", + "Three existing teacher-contract tests passed", + "Actual H200update9checkpoint strict-loaded onCPU without optimization", + "Python compile and Ruff checks passed" + ], + "next_gate": "Package and run HF preflight after all stronger teacher shards pass the audit; no local gradients and no new distillation job yet." } } diff --git a/ai/strong/test_distill_data.py b/ai/strong/test_distill_data.py new file mode 100644 index 0000000..3ddc3b9 --- /dev/null +++ b/ai/strong/test_distill_data.py @@ -0,0 +1,54 @@ +import unittest +from collections import defaultdict +from distill_data import source_count_weights, validate_initial_checkpoint + + +class ReplayTests(unittest.TestCase): + def test_each_source_and_count_has_equal_total_mass(self): + rows = [ + dict(dataset_source=s, player_count=n) + for s in range(2) + for n in range(2, 7) + for _ in range((s + 1) * n) + ] + weights = source_count_weights(rows, range(2, 7)) + mass = defaultdict(float) + for row in rows: + key = row["dataset_source"], row["player_count"] + mass[key] += weights[key] + for value in mass.values(): + self.assertAlmostEqual(value, len(rows) / 10) + + def test_single_source_retains_original_count_balance(self): + rows = [dict(player_count=n) for n in range(2, 7) for _ in range(n)] + weights = source_count_weights(rows, range(2, 7)) + for n in range(2, 7): + self.assertEqual(weights[0, n], len(rows) / (5 * n)) + + def test_missing_count_cannot_hide_in_other_source(self): + rows = [dict(dataset_source=0, player_count=n) for n in range(2, 7)] + rows.append(dict(dataset_source=1, player_count=3)) + with self.assertRaises(ValueError): + source_count_weights(rows, range(2, 7)) + + def test_warm_start_rejects_feature_or_architecture_transfer(self): + good = dict( + architecture="multiplayer_ordered", + feature_revision="4.0-multiplayer", + state_dim=1149, + action_dim=98, + ) + args = ("multiplayer_ordered", "4.0-multiplayer", 1149, 98) + validate_initial_checkpoint(good, *args) + for key, wrong in [ + ("architecture", "multiplayer"), + ("feature_revision", "3.0"), + ("state_dim", 738), + ("action_dim", 96), + ]: + with self.assertRaises(ValueError): + validate_initial_checkpoint({**good, key: wrong}, *args) + + +if __name__ == "__main__": + unittest.main() From f0870163adc5c1d130bdaef99802c70c24ba0aef Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 22:58:30 +0200 Subject: [PATCH 080/184] Record five-player search screen and prepare audited replay job --- ai/strong/experiments.json | 108 +++++++++++++++++++++- ai/strong/launch-strong-replay-distill.sh | 29 ++++++ 2 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 ai/strong/launch-strong-replay-distill.sh diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 9cdee47..fa95108 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -7982,7 +7982,97 @@ } ] }, - "three_player_search_decision": "40-deal expansion:44.375% over480games, overallCI40.938..47.917 abovechance33.333 and point above40% floor. Original/sealedCI31.667..47.917 stillincludeschance. This is development screening, not reserved final qualification. Does not resolve2p/4p weaknesses; continue stronger-league training." + "three_player_search_decision": "40-deal expansion:44.375% over480games, overallCI40.938..47.917 abovechance33.333 and point above40% floor. Original/sealedCI31.667..47.917 stillincludeschance. This is development screening, not reserved final qualification. Does not resolve2p/4p weaknesses; continue stronger-league training.", + "5p/search_geo": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 5, + "candidate_search_model_proposal": true, + "sources": [ + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-0/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-4/evaluation.json" + ], + "games": 160, + "independent_seeds": 8, + "win_rate": 0.334375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2375, + 0.428125 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 8070, + "evaluations": 1989840, + "truncated": 0 + }, + "search_geo": { + "decisions": 30914, + "evaluations": 2533792, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 40, + "independent_seeds": 8, + "win_rate": 0.3625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2375, + 0.475 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 40, + "independent_seeds": 8, + "win_rate": 0.375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.225, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 40, + "independent_seeds": 8, + "win_rate": 0.325, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.475 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 40, + "independent_seeds": 8, + "win_rate": 0.275, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15, + 0.4 + ] + } + ], + "artifact_revision": "360cd5bef989000c5846018b0cf79c3854e4ef0d" + } }, "strong_opponent_teacher_pilot": { "job_id": "6abd73cbfbc85ba68235ccca", @@ -8111,6 +8201,20 @@ "Actual H200update9checkpoint strict-loaded onCPU without optimization", "Python compile and Ruff checks passed" ], - "next_gate": "Package and run HF preflight after all stronger teacher shards pass the audit; no local gradients and no new distillation job yet." + "next_gate": "Package and run HF preflight after all stronger teacher shards pass the audit; no local gradients and no new distillation job yet.", + "source_bundle": { + "archive": "strong-source-v30.tgz", + "revision": "508bc42027cae5bfeea01228b48069c8287b332a", + "base_revision": "a30fdb26474d2d78a4803f396c8888f9d974a371", + "changed_files": [ + "ai/strong/distill.py", + "ai/strong/distill_data.py", + "ai/strong/test_distill_data.py", + "ai/strong/audit-teacher-dataset.py" + ], + "archive_sha256": "8eff02f0921545a25d9dd059e0f6ae572778e8397dbf722b6c678c2578f414be" + }, + "launcher": "ai/strong/launch-strong-replay-distill.sh", + "launch_status": "Prepared, not launched; awaiting all five audited stronger-opponent data shards. Start with a one-epoch HF pilot." } } diff --git a/ai/strong/launch-strong-replay-distill.sh b/ai/strong/launch-strong-replay-distill.sh new file mode 100644 index 0000000..7558fef --- /dev/null +++ b/ai/strong/launch-strong-replay-distill.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euo pipefail +revision=${1:?Pin audited stronger-opponent dataset revision} +mode=${2:-hard} +[[ "$revision" =~ ^[0-9a-f]{40}$ ]] +[[ "$mode" == hard || "$mode" == soft ]] +hf jobs run --detach --flavor "${HF_FLAVOR:-a10g-large}" --timeout "${JOB_TIMEOUT:-4h}" \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env RUN_NAME="${RUN_NAME:-multiplayer-distillation-strong-replay-v1-$mode}" --env TARGET_MODE="$mode" --env TRAIN_SEED=622 --env ARCHITECTURE=multiplayer_ordered --env DATA_REVISION="$revision" --env EPOCHS="${EPOCHS:-15}" --env LR="${LR:-0.00005}" --env DATA_VERSION=multiplayer-teacher-v2-strong --env SHARDS=5 --env DISAGREEMENT_WEIGHT=2 \ + --env INIT_CHECKPOINT=runs/multiplayer-distillation-v2-hard/best.pt --env INIT_REVISION=ab34dd266010ded1c9a6c818c721e5505dd1ddeb \ + --env REPLAY_DATA_VERSION=multiplayer-teacher-v1 --env REPLAY_DATA_REVISION=082ca1456736940ee32c96db3ad1bc4e4d0b206b \ + --label project=powergrid-ai --label stage="multiplayer-distillation-strong-replay-$mode" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnx==1.20.1 onnxruntime==1.30.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v30.tgz\",repo_type=\"dataset\",revision=\"508bc42027cae5bfeea01228b48069c8287b332a\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python ai/strong/test_teacher_contract.py +python ai/strong/test_model_v4.py +python ai/strong/test_distill_data.py +python ai/strong/audit-teacher-dataset.py --revision "$DATA_REVISION" --version "$DATA_VERSION" --output /tmp/strong-teacher-audit.json +python -u ai/strong/distill.py +' From 188e91fdf5c9f7ce7e1cc831418c0c9f4b5e1c26 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:00:09 +0200 Subject: [PATCH 081/184] Expand five-player strong search screening to forty deals --- ai/strong/experiments.json | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index fa95108..81eabc5 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8216,5 +8216,60 @@ }, "launcher": "ai/strong/launch-strong-replay-distill.sh", "launch_status": "Prepared, not launched; awaiting all five audited stronger-opponent data shards. Start with a one-epoch HF pilot." + }, + "multiplayer_5p_search_expansion": { + "purpose": "Expand eight-deal five-player search screen to forty independent deals without changing candidate or opponent configuration", + "jobs": [ + { + "job": "6abd7845fbc85ba68235cdac", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-8", + "deal_offset": 8, + "games": 80 + }, + { + "job": "6abd7846fbc85ba68235cdae", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-12", + "deal_offset": 12, + "games": 80 + }, + { + "job": "6abd7847fbc85ba68235cdb0", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-16", + "deal_offset": 16, + "games": 80 + }, + { + "job": "6abd7848fbc85ba68235cdb2", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-20", + "deal_offset": 20, + "games": 80 + }, + { + "job": "6abd7849fbc85ba68235cdb4", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-24", + "deal_offset": 24, + "games": 80 + }, + { + "job": "6abd784a404719ba37614590", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-28", + "deal_offset": 28, + "games": 80 + }, + { + "job": "6abd784afbc85ba68235cdb6", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-32", + "deal_offset": 32, + "games": 80 + }, + { + "job": "6abd784b404719ba37614592", + "run": "multiplayer-hard-e10-search48-search_geo-5p-probe-36", + "deal_offset": 36, + "games": 80 + } + ], + "source_revision": "1632ae68aabb62fb924a6e119b7704f10dd3da4a", + "async_arena": true } } From 93152e567623b998580a49c88e79ab96776034fc Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:06:59 +0200 Subject: [PATCH 082/184] Verify first stronger-league checkpoint and launch paired screening --- ai/strong/experiments.json | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 81eabc5..0049ce5 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8271,5 +8271,69 @@ ], "source_revision": "1632ae68aabb62fb924a6e119b7704f10dd3da4a", "async_arena": true + }, + "multiplayer_geoleague_update9_screening": { + "candidate_revision": "aeca4188cbb8a0513c36f201350e7f68b87cb30e", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "training_games": 2400, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 1.6093254089355469e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-geoleague-u9-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abd79de404719ba376145d3" + }, + { + "run": "multiplayer-geoleague-u9-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abd79dffbc85ba68235ce35" + }, + { + "run": "multiplayer-geoleague-u9-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abd79e0fbc85ba68235ce37" + }, + { + "run": "multiplayer-geoleague-u9-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abd79e0404719ba376145d5" + }, + { + "run": "multiplayer-geoleague-u9-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abd79e1404719ba376145d7" + }, + { + "run": "multiplayer-geoleague-u9-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abd79e2fbc85ba68235ce39" + } + ], + "status": "RUNNING", + "scope": "Development screening on paired held-out seeds; not final qualification" } } From 12042f9a385dcc8e58086120bad4903789358233 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:11:01 +0200 Subject: [PATCH 083/184] Record paired stronger-league checkpoint screening across player counts --- ai/strong/experiments.json | 641 ++++++++++++++++++++++++++++++++++++- 1 file changed, 639 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 0049ce5..692fe74 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8333,7 +8333,644 @@ "job_id": "6abd79e2fbc85ba68235ce39" } ], - "status": "RUNNING", - "scope": "Development screening on paired held-out seeds; not final qualification" + "status": "COMPLETED", + "scope": "Development screening on paired held-out seeds; not final qualification", + "reports": { + "2p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/aeca4188cbb8a0513c36f201350e7f68b87cb30e/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.6046875, + "truncated": 0, + "seconds": 24.28081841299999, + "inference_p95_ms": 0.3666270500019662, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.65 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.7125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.575, + 0.7875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.59375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.48125, + 0.70625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.553125, + 0.65625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "ccb3665720dc05da5a8f8f418b5b02fa02a8837a" + }, + "3p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/aeca4188cbb8a0513c36f201350e7f68b87cb30e/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5395833333333333, + "truncated": 0, + "seconds": 30.12463556099999, + "inference_p95_ms": 0.4151650000096651, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5416666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4583333333333333, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.4083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3416666666666667, + 0.475 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.7333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.5416666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.45, + 0.6333333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.4979166666666667, + 0.58125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "ccb3665720dc05da5a8f8f418b5b02fa02a8837a" + }, + "4p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/aeca4188cbb8a0513c36f201350e7f68b87cb30e/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.52734375, + "truncated": 0, + "seconds": 40.669591490000016, + "inference_p95_ms": 0.4088040000056025, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.478125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.396875, + 0.559375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.45625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.38125, + 0.53125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.65625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.56875, + 0.7375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.51875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.43125, + 0.60625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.48748046875, + 0.5671875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "ccb3665720dc05da5a8f8f418b5b02fa02a8837a" + }, + "5p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/aeca4188cbb8a0513c36f201350e7f68b87cb30e/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.62, + "truncated": 0, + "seconds": 46.748347302, + "inference_p95_ms": 0.4146239999954556, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.515, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.445, + 0.58 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.545, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.615 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.725, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.655, + 0.79 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.695, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.63, + 0.76 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.58375, + 0.655 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "ccb3665720dc05da5a8f8f418b5b02fa02a8837a" + }, + "6p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/aeca4188cbb8a0513c36f201350e7f68b87cb30e/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.5552083333333333, + "truncated": 0, + "seconds": 53.98310626199999, + "inference_p95_ms": 0.42081800000488534, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.49583333333333335, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.5708333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.45416666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.5208333333333334 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.6416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.575, + 0.7083333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6291666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5583333333333333, + 0.7 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5104166666666666, + 0.5989583333333334 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "ccb3665720dc05da5a8f8f418b5b02fa02a8837a" + }, + "3p/a260": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/aeca4188cbb8a0513c36f201350e7f68b87cb30e/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "a70a0957bd5c4d9e32b4ee5aecaa9285451c406e3830a904a3f218f13cfced09", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.24375, + "truncated": 0, + "seconds": 71.046653501, + "inference_p95_ms": 0.40804859999070686, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.2, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.11666666666666667, + 0.2916666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.20833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.13333333333333333, + 0.2833333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.3333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.24166666666666667, + 0.43333333333333335 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.23333333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15, + 0.31666666666666665 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.19583333333333333, + 0.29375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "ccb3665720dc05da5a8f8f418b5b02fa02a8837a" + } + }, + "paired_against_initial_teacher": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.6046875, + "baseline_win_rate": 0.5046875, + "paired_delta": 0.1, + "paired_seed_bootstrap_95_interval": [ + 0.034375, + 0.165625 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.5395833333333333, + "baseline_win_rate": 0.5020833333333333, + "paired_delta": 0.03749999999999999, + "paired_seed_bootstrap_95_interval": [ + -0.01875, + 0.09375 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.52734375, + "baseline_win_rate": 0.50390625, + "paired_delta": 0.0234375, + "paired_seed_bootstrap_95_interval": [ + -0.0265625, + 0.07578125 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.62, + "baseline_win_rate": 0.539375, + "paired_delta": 0.080625, + "paired_seed_bootstrap_95_interval": [ + 0.032499999999999994, + 0.12875 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.5552083333333333, + "baseline_win_rate": 0.45416666666666666, + "paired_delta": 0.10104166666666665, + "paired_seed_bootstrap_95_interval": [ + 0.06458333333333333, + 0.13854166666666665 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.24375, + "baseline_win_rate": 0.19583333333333333, + "paired_delta": 0.04791666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.008333333333333331, + 0.10208333333333333 + ] + } + }, + "paired_against_h200_u9": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.6046875, + "baseline_win_rate": 0.590625, + "paired_delta": 0.0140625, + "paired_seed_bootstrap_95_interval": [ + -0.05, + 0.0812890624999966 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.5395833333333333, + "baseline_win_rate": 0.4979166666666667, + "paired_delta": 0.041666666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.017708333333333333, + 0.10208333333333333 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.52734375, + "baseline_win_rate": 0.45625, + "paired_delta": 0.07109375, + "paired_seed_bootstrap_95_interval": [ + 0.0125, + 0.1296875 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.62, + "baseline_win_rate": 0.5775, + "paired_delta": 0.042499999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.0037500000000000007, + 0.08875 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.5552083333333333, + "baseline_win_rate": 0.5364583333333334, + "paired_delta": 0.01875, + "paired_seed_bootstrap_95_interval": [ + -0.026041666666666668, + 0.06145833333333334 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.24375, + "baseline_win_rate": 0.24583333333333332, + "paired_delta": -0.0020833333333333316, + "paired_seed_bootstrap_95_interval": [ + -0.05624999999999999, + 0.05 + ] + } + }, + "decision": "Continue training and stronger-opponent teacher collection. Economic-bot results improved in point estimate at every count, but three-player frozen neural opponent remains below equal-share reference; no qualification or promotion." } } From 5a35c87ca5d9e5278959f3ef1211c0d152c51879 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:12:08 +0200 Subject: [PATCH 084/184] Diagnose terminal capacity and expansion gaps against frozen neural bot --- ai/strong/experiments.json | 128 ++++++++++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 692fe74..47073fd 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8971,6 +8971,132 @@ ] } }, - "decision": "Continue training and stronger-opponent teacher collection. Economic-bot results improved in point estimate at every count, but three-player frozen neural opponent remains below equal-share reference; no qualification or promotion." + "decision": "Continue training and stronger-opponent teacher collection. Economic-bot results improved in point estimate at every count, but three-player frozen neural opponent remains below equal-share reference; no qualification or promotion.", + "a260_terminal_diagnostics": { + "scope": "Descriptive terminal-state analysis of zero-credit losses only; opponent maxima are separate per metric, not one designated winner; does not establish causal mistakes or affordable alternatives.", + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.2, + "zero_credit_losses": 96, + "terminal_loss_summary": { + "cities": { + "learner_mean": 15.604166666666666, + "opponent_max_mean": 18.197916666666668, + "mean_gap": -2.59375 + }, + "powered": { + "learner_mean": 14.739583333333334, + "opponent_max_mean": 17.125, + "mean_gap": -2.3854166666666665 + }, + "money": { + "learner_mean": 67.86458333333333, + "opponent_max_mean": 34.84375, + "mean_gap": 33.020833333333336 + }, + "capacity": { + "learner_mean": 15.645833333333334, + "opponent_max_mean": 17.78125, + "mean_gap": -2.1354166666666665 + } + }, + "below_city_capacity_powered": 0 + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.20833333333333334, + "zero_credit_losses": 95, + "terminal_loss_summary": { + "cities": { + "learner_mean": 15.557894736842105, + "opponent_max_mean": 17.94736842105263, + "mean_gap": -2.389473684210526 + }, + "powered": { + "learner_mean": 14.821052631578947, + "opponent_max_mean": 16.936842105263157, + "mean_gap": -2.1157894736842104 + }, + "money": { + "learner_mean": 48.66315789473684, + "opponent_max_mean": 43.71578947368421, + "mean_gap": 4.947368421052632 + }, + "capacity": { + "learner_mean": 15.8, + "opponent_max_mean": 17.694736842105264, + "mean_gap": -1.894736842105263 + } + }, + "below_city_capacity_powered": 0 + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.3333333333333333, + "zero_credit_losses": 80, + "terminal_loss_summary": { + "cities": { + "learner_mean": 15.175, + "opponent_max_mean": 18.3375, + "mean_gap": -3.1625 + }, + "powered": { + "learner_mean": 14.6875, + "opponent_max_mean": 17.5625, + "mean_gap": -2.875 + }, + "money": { + "learner_mean": 57.625, + "opponent_max_mean": 26.9125, + "mean_gap": 30.7125 + }, + "capacity": { + "learner_mean": 16.45, + "opponent_max_mean": 18.475, + "mean_gap": -2.025 + } + }, + "below_city_capacity_powered": 1 + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.23333333333333334, + "zero_credit_losses": 92, + "terminal_loss_summary": { + "cities": { + "learner_mean": 14.51086956521739, + "opponent_max_mean": 18.043478260869566, + "mean_gap": -3.532608695652174 + }, + "powered": { + "learner_mean": 13.98913043478261, + "opponent_max_mean": 17.456521739130434, + "mean_gap": -3.467391304347826 + }, + "money": { + "learner_mean": 46.358695652173914, + "opponent_max_mean": 33.46739130434783, + "mean_gap": 12.891304347826088 + }, + "capacity": { + "learner_mean": 16.184782608695652, + "opponent_max_mean": 18.358695652173914, + "mean_gap": -2.1739130434782608 + } + }, + "below_city_capacity_powered": 2 + } + ], + "interpretation": "Capacity and city-count deficits with substantial residual cash suggest investigating earlier auction/build timing. Only 3 of 363 zero-credit losses ended below min(cities, capacity) in powered count. Stronger-opponent teacher data and continuing PPO remain the next learning steps; do not alter rewards on terminal evidence alone." + } } } From fdba04dcb3c74e8f36d69580e59d4837fd2541df Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:28:12 +0200 Subject: [PATCH 085/184] Record first completed six-player strong search shard --- ai/strong/experiments.json | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 47073fd..e2eaebc 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -9098,5 +9098,99 @@ ], "interpretation": "Capacity and city-count deficits with substantial residual cash suggest investigating earlier auction/build timing. Only 3 of 363 zero-credit losses ended below min(cities, capacity) in powered count. Stronger-opponent teacher data and continuing PPO remain the next learning steps; do not alter rewards on terminal evidence alone." } + }, + "multiplayer_6p_search_completed_shards": { + "0": { + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.3125, + "truncated": 0, + "seconds": 6330.387157024, + "inference_p95_ms": 0.4449174499981723, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4583333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.5833333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.25, + 0.375 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23021, + "evaluations": 1875072, + "truncated": 0 + }, + "learner": { + "decisions": 4693, + "evaluations": 1158720, + "truncated": 0 + } + }, + "artifact_revision": "9f59c1d00a76d0e9c83fccdf433f6136deee0126" + } } } From e3178fca2f257971551d635b29914b406ff53205 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:31:24 +0200 Subject: [PATCH 086/184] Record full six-player screen and flag one truncated search rollout --- ai/strong/experiments.json | 105 +++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e2eaebc..1ed6772 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8072,6 +8072,98 @@ } ], "artifact_revision": "360cd5bef989000c5846018b0cf79c3854e4ef0d" + }, + "6p/search_geo": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 6, + "candidate_search_model_proposal": true, + "sources": [ + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-6p-probe-0/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-6p-probe-4/evaluation.json" + ], + "games": 192, + "independent_seeds": 8, + "win_rate": 0.2864583333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.21354166666666666, + 0.3489583333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 46199, + "evaluations": 3755648, + "truncated": 0 + }, + "learner": { + "decisions": 9443, + "evaluations": 2327280, + "truncated": 1 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "independent_seeds": 8, + "win_rate": 0.3125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.41718749999999244 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "independent_seeds": 8, + "win_rate": 0.20833333333333334, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "independent_seeds": 8, + "win_rate": 0.3333333333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.4791666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "independent_seeds": 8, + "win_rate": 0.2916666666666667, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.4166666666666667 + ] + } + ], + "artifact_revision": "6f9442ff21521c460e5c6abc14ba06efb3a4dd25", + "qualification_eligible": false, + "limitation": "One learner search rollout exhausted the 1200-move simulation cap; all 192 actual games completed. Eight independent deals only." } }, "strong_opponent_teacher_pilot": { @@ -9192,5 +9284,18 @@ }, "artifact_revision": "9f59c1d00a76d0e9c83fccdf433f6136deee0126" } + }, + "six_player_search_horizon_investigation": { + "status": "OPEN", + "current_default_max_steps": 1200, + "affected_match": { + "seed": "multiplayer-search-strong-probe-v1-6p-5", + "variant": "recharged", + "sealed": false, + "seat": 1 + }, + "truncated_learner_rollouts": 1, + "total_learner_rollouts": 2327280, + "next_action": "Reproduce affected match with diagnostic capture of the capped simulation. Check whether extending that same simulation terminates, then verify outcome parity for unaffected cases before changing defaults. Retain the original report and do not erase truncated counts." } } From b7fb490f8f1502f75a0e8590ea43749d71d87c45 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:34:03 +0200 Subject: [PATCH 087/184] Replay capped six-player search with isolated longer-horizon diagnostic --- ai/strong/diagnose-search-horizon.cjs | 23 +++++ ai/strong/diagnose-search-horizon.py | 118 ++++++++++++++++++++++++++ ai/strong/experiments.json | 17 +++- 3 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 ai/strong/diagnose-search-horizon.cjs create mode 100644 ai/strong/diagnose-search-horizon.py diff --git a/ai/strong/diagnose-search-horizon.cjs b/ai/strong/diagnose-search-horizon.cjs new file mode 100644 index 0000000..ab2af4f --- /dev/null +++ b/ai/strong/diagnose-search-horizon.cjs @@ -0,0 +1,23 @@ +// Diagnostic preload only: return the original decision, and retry capped searches separately. +const fs = require('node:fs'); +const search = require('./search.cjs'); +const choose = search.choose; +search.choose = function (g, seat, options) { + const original = choose(g, seat, options); + if (original.truncated) { + const extended = choose(g, seat, { ...options, maxSteps: 2400 }); + const record = { seat, options, original, extended, state: g }; + fs.appendFileSync(process.env.SEARCH_DIAGNOSTIC_PATH, JSON.stringify(record) + '\n'); + console.error( + JSON.stringify({ + diagnostic: 'search_horizon', + seed: options.seed, + original_truncated: original.truncated, + extended_truncated: extended.truncated, + original_index: original.index, + extended_index: extended.index, + }) + ); + } + return original; +}; diff --git a/ai/strong/diagnose-search-horizon.py b/ai/strong/diagnose-search-horizon.py new file mode 100644 index 0000000..a1cfc49 --- /dev/null +++ b/ai/strong/diagnose-search-horizon.py @@ -0,0 +1,118 @@ +"""Replay the one capped arena match without changing its actual policy decisions.""" + +import json +import os +from pathlib import Path +import sys +import time + +from huggingface_hub import HfApi, hf_hub_download + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +from infer import Model +from pool import EnginePool + +repo = "coyotte508/powergrid-ai-germany-v1" +model = Model( + hf_hub_download( + repo, + "runs/multiplayer-distillation-v2-hard/best.onnx", + revision="ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + ) +) +expected_file = hf_hub_download( + repo, + "runs/multiplayer-hard-e10-search48-search_geo-6p-probe-4/evaluation.json", + revision=os.environ["REPORT_REVISION"], +) +expected = next( + r + for r in json.loads(Path(expected_file).read_text())["results"] + if r["gameSeed"] == "multiplayer-search-strong-probe-v1-6p-5" + and r["variant"] == "recharged" + and not r["sealed"] + and r["seat"] == 1 +) +out = Path("ai/runs/search-horizon-diagnostic-v1") +out.mkdir(parents=True, exist_ok=True) +os.environ["NODE_OPTIONS"] = "--require " + str( + Path("ai/strong/diagnose-search-horizon.cjs").resolve() +) +os.environ["SEARCH_DIAGNOSTIC_PATH"] = str((out / "capped-searches.jsonl").resolve()) +pool = EnginePool( + 1, seed="multiplayer-search-strong-probe-v1-6p", script="ai/strong/bridge.cjs" +) +start = last = time.monotonic() +try: + current = pool.call( + dict( + op="reset", + n=1, + playerCount=6, + offset=127, + mode="search_geo", + arenaSeed="multiplayer-search-strong-probe-v1-6p", + featureRevisions={"learner": "4.0-multiplayer"}, + ) + )["observations"] + ends = [] + while current[0] is not None: + x = current[0] + action, _ = model.predict(x["state"], x["actions"]) + reply = pool.call( + dict( + op="step", + actions=[dict(proposal=action, searchSamples=48, geography=True)], + ) + ) + current = reply["observations"] + ends.extend(reply["ended"]) + if time.monotonic() - last >= 30: + print( + json.dumps( + dict( + stage="diagnostic_replay", + seconds=time.monotonic() - start, + round=x["round"], + ) + ), + flush=True, + ) + last = time.monotonic() +finally: + pool.close() +assert len(ends) == 1 +actual = ends[0] +keys = [ + "episode", + "gameSeed", + "truncated", + "value", + "playerCount", + "variant", + "sealed", + "steps", + "roles", + "policyMoves", + "searchStats", + "final", +] +assert all(actual[k] == expected[k] for k in keys), ( + "Diagnostic replay diverged from original match" +) +captured = [ + json.loads(line) + for line in (out / "capped-searches.jsonl").read_text().splitlines() +] +assert sum(r["original"]["truncated"] for r in captured) == 1 +report = dict( + exact_terminal_replay=True, + original=actual, + captures=[{k: v for k, v in r.items() if k != "state"} for r in captured], + seconds=time.monotonic() - start, +) +(out / "report.json").write_text(json.dumps(report, indent=2) + "\n") +HfApi().upload_folder( + repo_id=repo, folder_path=str(out), path_in_repo="runs/search-horizon-diagnostic-v1" +) +print(json.dumps({k: v for k, v in report.items() if k != "original"}), flush=True) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 1ed6772..ff28673 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -9286,7 +9286,7 @@ } }, "six_player_search_horizon_investigation": { - "status": "OPEN", + "status": "DIAGNOSTIC_SUBMITTED", "current_default_max_steps": 1200, "affected_match": { "seed": "multiplayer-search-strong-probe-v1-6p-5", @@ -9296,6 +9296,19 @@ }, "truncated_learner_rollouts": 1, "total_learner_rollouts": 2327280, - "next_action": "Reproduce affected match with diagnostic capture of the capped simulation. Check whether extending that same simulation terminates, then verify outcome parity for unaffected cases before changing defaults. Retain the original report and do not erase truncated counts." + "next_action": "Reproduce affected match with diagnostic capture of the capped simulation. Check whether extending that same simulation terminates, then verify outcome parity for unaffected cases before changing defaults. Retain the original report and do not erase truncated counts.", + "job": "6abd8041404719ba37614703", + "source": { + "archive": "strong-source-v31.tgz", + "revision": "9752cbc31db834b8c07b62504997fc0134a8e0ee", + "base_revision": "508bc42027cae5bfeea01228b48069c8287b332a", + "changed_files": [ + "ai/strong/diagnose-search-horizon.py", + "ai/strong/diagnose-search-horizon.cjs" + ], + "archive_sha256": "7aec51dcc2f2af636965c0496705850ed2d2d6b3dee89021d494e26dc6820cb7", + "report_revision": "6f9442ff21521c460e5c6abc14ba06efb3a4dd25" + }, + "actual_policy": "Original 1200-move cap; diagnostic retry does not change decisions" } } From bd4a7179aded5775cf01de08f982ac9e87b656ab Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:35:19 +0200 Subject: [PATCH 088/184] Audit completed three-player stronger-opponent teacher shard --- ai/strong/experiments.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ff28673..84de6c1 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8276,7 +8276,29 @@ "shard": 4, "job_id": "6abd756a404719ba3761453d" } - ] + ], + "completed_shard_audits": { + "3": { + "revision": "0775c06c1d5a8afbba505e61be51ab969bfddadf", + "version": "multiplayer-teacher-v2-strong", + "shard": 1, + "player_count": 3, + "validated": true, + "counts": { + "games": 240, + "positions": 30652, + "truncated": 0, + "teacher_rollouts": 3052992, + "teacher_truncated": 0, + "opponent_rollouts": 2018512, + "opponent_truncated": 0 + }, + "seat_rule_cells": 12, + "games_per_cell": 20, + "validation_games": 48, + "training_games": 192 + } + } }, "strong_teacher_replay_preparation": { "status": "IMPLEMENTED_NOT_TRAINED", From dc5948c0ddb47563a38eaf7ed2c2a1db49fc9a58 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:37:24 +0200 Subject: [PATCH 089/184] Collect first completed expanded five-player search shard --- ai/strong/experiments.json | 98 +++++++++++++++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 84de6c1..dbcba07 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8384,7 +8384,103 @@ } ], "source_revision": "1632ae68aabb62fb924a6e119b7704f10dd3da4a", - "async_arena": true + "async_arena": true, + "completed_shards": { + "16": { + "async_rollout": true, + "engine_workers": 80, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 16, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-5p", + "games": 80, + "win_rate": 0.3125, + "truncated": 0, + "seconds": 2168.904011486, + "inference_p95_ms": 1.2182940005004639, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 20, + "win_rate": 0.3, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1, + 0.5 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 20, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.35 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 20, + "win_rate": 0.55, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 20, + "win_rate": 0.15, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.2, + 0.425 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 15386, + "evaluations": 1259104, + "truncated": 0 + }, + "learner": { + "decisions": 4061, + "evaluations": 1000944, + "truncated": 0 + } + }, + "artifact_revision": "59bc4f633a2e9b2267da87fd51ee2736ed4c28e2" + } + } }, "multiplayer_geoleague_update9_screening": { "candidate_revision": "aeca4188cbb8a0513c36f201350e7f68b87cb30e", From 13eccc74bdbbddfe6646212b0b75c6912c7538b1 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:38:01 +0200 Subject: [PATCH 090/184] Collect two more expanded five-player search shards --- ai/strong/experiments.json | 188 +++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index dbcba07..8816af7 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8479,6 +8479,194 @@ } }, "artifact_revision": "59bc4f633a2e9b2267da87fd51ee2736ed4c28e2" + }, + "8": { + "async_rollout": true, + "engine_workers": 80, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 8, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-5p", + "games": 80, + "win_rate": 0.325, + "truncated": 0, + "seconds": 2255.8548747949994, + "inference_p95_ms": 1.2233521997586647, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 20, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.05, + 0.5 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 20, + "win_rate": 0.35, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 20, + "win_rate": 0.3, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 20, + "win_rate": 0.4, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.55 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.2125, + 0.425 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 4052, + "evaluations": 1005888, + "truncated": 0 + }, + "search_geo": { + "decisions": 16070, + "evaluations": 1320176, + "truncated": 0 + } + }, + "artifact_revision": "85f251e39d51efcc744df5a03155d9d8a3d074a1" + }, + "28": { + "async_rollout": true, + "engine_workers": 80, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 28, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-5p", + "games": 80, + "win_rate": 0.2375, + "truncated": 0, + "seconds": 2118.16932335, + "inference_p95_ms": 1.1448099999995522, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 20, + "win_rate": 0.2, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.05, + 0.35 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 20, + "win_rate": 0.1, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.2 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 20, + "win_rate": 0.3, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.4 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 20, + "win_rate": 0.35, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.4 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.15, + 0.325 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 15646, + "evaluations": 1283424, + "truncated": 0 + }, + "learner": { + "decisions": 3932, + "evaluations": 969696, + "truncated": 0 + } + }, + "artifact_revision": "85f251e39d51efcc744df5a03155d9d8a3d074a1" } } }, From 9d1ebc5305a9083bfb9d98212e4ff1442fe304dc Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:39:35 +0200 Subject: [PATCH 091/184] Collect three further five-player search evaluation shards --- ai/strong/experiments.json | 282 +++++++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 8816af7..494990e 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8667,6 +8667,288 @@ } }, "artifact_revision": "85f251e39d51efcc744df5a03155d9d8a3d074a1" + }, + "12": { + "async_rollout": true, + "engine_workers": 80, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 12, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-5p", + "games": 80, + "win_rate": 0.2375, + "truncated": 0, + "seconds": 2294.2530761286616, + "inference_p95_ms": 1.216764748096466, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 20, + "win_rate": 0.15, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.05, + 0.2 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 20, + "win_rate": 0.15, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 20, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.35 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 20, + "win_rate": 0.4, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.65 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.15, + 0.3375 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 16347, + "evaluations": 1339968, + "truncated": 0 + }, + "learner": { + "decisions": 3987, + "evaluations": 991104, + "truncated": 0 + } + }, + "artifact_revision": "552f4251d6d966c872f379835310ff9f06bf6a6b" + }, + "20": { + "async_rollout": true, + "engine_workers": 80, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 20, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-5p", + "games": 80, + "win_rate": 0.2625, + "truncated": 0, + "seconds": 2334.1655454170004, + "inference_p95_ms": 1.2611809997906678, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 20, + "win_rate": 0.4, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.55 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 20, + "win_rate": 0.15, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 20, + "win_rate": 0.35, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 20, + "win_rate": 0.15, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.15, + 0.375 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 4126, + "evaluations": 1017936, + "truncated": 0 + }, + "search_geo": { + "decisions": 15815, + "evaluations": 1298224, + "truncated": 0 + } + }, + "artifact_revision": "552f4251d6d966c872f379835310ff9f06bf6a6b" + }, + "36": { + "async_rollout": true, + "engine_workers": 80, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 36, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-5p", + "games": 80, + "win_rate": 0.30625, + "truncated": 0, + "seconds": 2182.494056324, + "inference_p95_ms": 1.1781416499673014, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 20, + "win_rate": 0.425, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.675 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 20, + "win_rate": 0.3, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.4 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 20, + "win_rate": 0.15, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 20, + "win_rate": 0.35, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.5 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.2375, + 0.4 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 15730, + "evaluations": 1285120, + "truncated": 0 + }, + "learner": { + "decisions": 3946, + "evaluations": 974400, + "truncated": 0 + } + }, + "artifact_revision": "552f4251d6d966c872f379835310ff9f06bf6a6b" } } }, From f3b60714b6f4c8b5bde11b1fc3e8f540679d9909 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:41:28 +0200 Subject: [PATCH 092/184] Complete forty-deal five-player search screening with rule-level intervals --- ai/strong/experiments.json | 103 ++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 494990e..6c1e82b 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8164,6 +8164,104 @@ "artifact_revision": "6f9442ff21521c460e5c6abc14ba06efb3a4dd25", "qualification_eligible": false, "limitation": "One learner search rollout exhausted the 1200-move simulation cap; all 192 actual games completed. Eight independent deals only." + }, + "5p/search_geo_40deals": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "candidate_search_scope": "all", + "player_count": 5, + "candidate_search_model_proposal": true, + "sources": [ + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-0/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-4/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-8/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-12/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-16/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-20/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-24/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-28/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-32/evaluation.json", + "/home/eliheros/Documents/Codex/2026-09-26/je-x20-2/work/powergrid-ai/ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-search_geo-5p-probe-36/evaluation.json" + ], + "games": 800, + "independent_seeds": 40, + "win_rate": 0.3025, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.265625, + 0.340625 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 40230, + "evaluations": 9934992, + "truncated": 0 + }, + "search_geo": { + "decisions": 156998, + "evaluations": 12861488, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "independent_seeds": 40, + "win_rate": 0.315, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2525, + 0.3775 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "independent_seeds": 40, + "win_rate": 0.29, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.22, + 0.36 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "independent_seeds": 40, + "win_rate": 0.325, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.26, + 0.39 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "independent_seeds": 40, + "win_rate": 0.28, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.215, + 0.35 + ] + } + ], + "artifact_revision": "483011cc02a9b6679fd9dcf905cccef19f39495e" } }, "strong_opponent_teacher_pilot": { @@ -8950,7 +9048,10 @@ }, "artifact_revision": "552f4251d6d966c872f379835310ff9f06bf6a6b" } - } + }, + "status": "COMPLETED", + "combined_report": "ai/runs/strong-probes/combined-5p-search_geo-40deals.json", + "decision": "Five-player development screen supports an advantage versus search_geo: 30.25% over 40 independent deals, all four rule intervals above 20%, no truncation. Meets the five-player development point floor of 28%; final reserved-seed qualification still required, other player counts unresolved. Search uses 48 samples versus opponent 16; do not attribute the entire advantage to the neural model." }, "multiplayer_geoleague_update9_screening": { "candidate_revision": "aeca4188cbb8a0513c36f201350e7f68b87cb30e", From c067f25204928e0de35d4a50faa79982434641e4 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:43:35 +0200 Subject: [PATCH 093/184] Audit completed two-player stronger-opponent teacher shard --- ai/strong/experiments.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 6c1e82b..f42151a 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8395,6 +8395,26 @@ "games_per_cell": 20, "validation_games": 48, "training_games": 192 + }, + "2": { + "revision": "81302c1de28a3b03583cec19c50cf06beea3384e", + "version": "multiplayer-teacher-v2-strong", + "shard": 0, + "player_count": 2, + "validated": true, + "counts": { + "games": 240, + "positions": 38427, + "truncated": 0, + "teacher_rollouts": 3225936, + "teacher_truncated": 0, + "opponent_rollouts": 1039136, + "opponent_truncated": 0 + }, + "seat_rule_cells": 8, + "games_per_cell": 30, + "validation_games": 48, + "training_games": 192 } } }, From bd895ef00617f722b9a5ceaa7308e260c711eca7 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:50:59 +0200 Subject: [PATCH 094/184] Extend search horizon with captured regression and launch six-player screen --- ai/strong/combine-arenas.py | 2 + ai/strong/diagnose-search-horizon.cjs | 2 +- ai/strong/evaluate.py | 12 + ai/strong/experiments.json | 278 +++++++++++++++++- .../fixtures/search-horizon-six-player.json | 1 + ai/strong/launch-multiplayer-arena.sh | 2 +- ai/strong/search.cjs | 5 +- ai/strong/test-search-horizon.cjs | 12 + ai/strong/verify-final.py | 4 + 9 files changed, 304 insertions(+), 14 deletions(-) create mode 100644 ai/strong/fixtures/search-horizon-six-player.json create mode 100644 ai/strong/test-search-horizon.cjs diff --git a/ai/strong/combine-arenas.py b/ai/strong/combine-arenas.py index 7e8cfb7..ef70f0f 100644 --- a/ai/strong/combine-arenas.py +++ b/ai/strong/combine-arenas.py @@ -20,9 +20,11 @@ keys = [ "paired_seats", "candidate_search_samples", "candidate_geographic_search", + "search_max_steps", ] for report in reports: report.setdefault("candidate_search_scope", "all") + report.setdefault("search_max_steps", 1200) report.setdefault("player_count", 3) report.setdefault("candidate_search_model_proposal", True) keys.extend( diff --git a/ai/strong/diagnose-search-horizon.cjs b/ai/strong/diagnose-search-horizon.cjs index ab2af4f..66e8eab 100644 --- a/ai/strong/diagnose-search-horizon.cjs +++ b/ai/strong/diagnose-search-horizon.cjs @@ -3,7 +3,7 @@ const fs = require('node:fs'); const search = require('./search.cjs'); const choose = search.choose; search.choose = function (g, seat, options) { - const original = choose(g, seat, options); + const original = choose(g, seat, { ...options, maxSteps: 1200 }); if (original.truncated) { const extended = choose(g, seat, { ...options, maxSteps: 2400 }); const record = { seat, options, original, extended, state: g }; diff --git a/ai/strong/evaluate.py b/ai/strong/evaluate.py index 77befed..a2be2ad 100644 --- a/ai/strong/evaluate.py +++ b/ai/strong/evaluate.py @@ -1,6 +1,7 @@ """Independent CPU arena, with reserved seeds and per-rule results.""" import sys, argparse, json, time +import subprocess from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parents[1])) @@ -56,6 +57,16 @@ if args.disable_search_proposal and not args.search_samples: p.error("--disable-search-proposal requires positive --search-samples") if args.geographic_search and not args.search_samples: p.error("--geographic-search requires positive --search-samples") +search_max_steps = int( + subprocess.check_output( + [ + "node", + "-e", + "console.log(require('./ai/strong/search.cjs').DEFAULT_MAX_STEPS)", + ], + text=True, + ) +) model = Model(args.model) paired_size = 4 * args.players if args.games < paired_size or args.games % paired_size: @@ -174,6 +185,7 @@ report = { else None, "paired_seats": True, "candidate_search_samples": args.search_samples, + "search_max_steps": search_max_steps, "candidate_search_scope": args.search_scope, "candidate_geographic_search": args.geographic_search, "candidate_search_model_proposal": not args.disable_search_proposal, diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index f42151a..99d31bd 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -9995,7 +9995,7 @@ } }, "six_player_search_horizon_investigation": { - "status": "DIAGNOSTIC_SUBMITTED", + "status": "FIXED_LOCAL_REGRESSION_VERIFIED", "current_default_max_steps": 1200, "affected_match": { "seed": "multiplayer-search-strong-probe-v1-6p-5", @@ -10005,19 +10005,277 @@ }, "truncated_learner_rollouts": 1, "total_learner_rollouts": 2327280, - "next_action": "Reproduce affected match with diagnostic capture of the capped simulation. Check whether extending that same simulation terminates, then verify outcome parity for unaffected cases before changing defaults. Retain the original report and do not erase truncated counts.", + "next_action": "Run new held-out six-player searches with source32, retaining old 1200-step results separately. Final candidate must explicitly specify search_max_steps=2400 when selecting this runtime.", "job": "6abd8041404719ba37614703", "source": { - "archive": "strong-source-v31.tgz", - "revision": "9752cbc31db834b8c07b62504997fc0134a8e0ee", - "base_revision": "508bc42027cae5bfeea01228b48069c8287b332a", + "archive": "strong-source-v32.tgz", + "revision": "37465b08df007221665d796448aea57e6828257e", + "base_revision": "9752cbc31db834b8c07b62504997fc0134a8e0ee", "changed_files": [ - "ai/strong/diagnose-search-horizon.py", - "ai/strong/diagnose-search-horizon.cjs" + "ai/strong/search.cjs", + "ai/strong/evaluate.py", + "ai/strong/combine-arenas.py", + "ai/strong/verify-final.py", + "ai/strong/diagnose-search-horizon.cjs", + "ai/strong/test-search-horizon.cjs", + "ai/strong/fixtures/search-horizon-six-player.json" ], - "archive_sha256": "7aec51dcc2f2af636965c0496705850ed2d2d6b3dee89021d494e26dc6820cb7", - "report_revision": "6f9442ff21521c460e5c6abc14ba06efb3a4dd25" + "archive_sha256": "b95ab1d8bc8f2bae42e7428d8f7d80e727083c3e48f8c0075d64e6ae16144bfc" }, - "actual_policy": "Original 1200-move cap; diagnostic retry does not change decisions" + "actual_policy": "Original 1200-move cap; diagnostic retry does not change decisions", + "artifact_revision": "849cea0ecdd648946529d7c4b2769011317d280d", + "report": { + "exact_terminal_replay": true, + "original": { + "env": 0, + "episode": 127, + "gameSeed": "multiplayer-search-strong-probe-v1-6p-5", + "truncated": false, + "value": [ + 1, + 0, + 0, + 0, + 0, + 0 + ], + "playerCount": 6, + "variant": "recharged", + "sealed": false, + "steps": 721, + "roles": [ + "search_geo", + "learner", + "search_geo", + "search_geo", + "search_geo", + "search_geo" + ], + "policyMoves": { + "Bid": 40, + "Pass": 43, + "BuyResource": 24, + "Build": 10, + "UsePowerPlant": 9, + "ChoosePowerPlant": 8, + "DiscardPowerPlant": 2 + }, + "searchStats": { + "search_geo": { + "decisions": 276, + "evaluations": 22400, + "truncated": 0 + }, + "learner": { + "decisions": 76, + "evaluations": 18768, + "truncated": 1 + } + }, + "final": { + "round": 9, + "players": [ + { + "cities": 14, + "powered": 14, + "money": 28, + "capacity": 16, + "plants": [ + 26, + 33, + 46 + ] + }, + { + "cities": 10, + "powered": 10, + "money": 19, + "capacity": 18, + "plants": [ + 31, + 34, + 36 + ] + }, + { + "cities": 6, + "powered": 6, + "money": 18, + "capacity": 16, + "plants": [ + 20, + 21, + 38 + ] + }, + { + "cities": 11, + "powered": 11, + "money": 18, + "capacity": 13, + "plants": [ + 24, + 35, + 28 + ] + }, + { + "cities": 13, + "powered": 13, + "money": 6, + "capacity": 15, + "plants": [ + 27, + 32, + 42 + ] + }, + { + "cities": 14, + "powered": 14, + "money": 7, + "capacity": 15, + "plants": [ + 25, + 29, + 40 + ] + } + ] + } + }, + "captures": [ + { + "seat": 1, + "options": { + "samples": 48, + "candidates": 6, + "extraCandidates": [ + 39 + ], + "geography": true, + "seed": "arena-guided-127-8" + }, + "original": { + "index": 0, + "action": { + "name": "Bid", + "data": 12 + }, + "evaluations": 240, + "truncated": 1, + "winEstimate": 0.16666666666666666, + "values": { + "0": 8, + "1": 6, + "2": 7, + "19": 0, + "39": 6 + } + }, + "extended": { + "index": 0, + "action": { + "name": "Bid", + "data": 12 + }, + "evaluations": 240, + "truncated": 0, + "winEstimate": 0.16666666666666666, + "values": { + "0": 8, + "1": 6, + "2": 8, + "19": 0, + "39": 6 + } + } + } + ], + "seconds": 774.4660142880166 + }, + "new_default_max_steps": 2400, + "validation": { + "exact_full_game_replay": true, + "captured_search_2400_truncated": 0, + "chosen_action_unchanged": true, + "unaffected_search_parity_player_counts": [ + 2, + 3, + 4, + 5, + 6 + ], + "mixed_horizon_combination_rejected": true + } + }, + "multiplayer_6p_horizon2400_screen": { + "source_revision": "37465b08df007221665d796448aea57e6828257e", + "search_max_steps": 2400, + "independent_deals": 40, + "seed": "multiplayer-search-strong-probe-v1-6p", + "jobs": [ + { + "job": "6abd8431fbc85ba68235d111", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-0", + "deal_offset": 0, + "games": 96 + }, + { + "job": "6abd8432404719ba376147b8", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-4", + "deal_offset": 4, + "games": 96 + }, + { + "job": "6abd8433fbc85ba68235d113", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-8", + "deal_offset": 8, + "games": 96 + }, + { + "job": "6abd8434404719ba376147ba", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-12", + "deal_offset": 12, + "games": 96 + }, + { + "job": "6abd8435fbc85ba68235d115", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-16", + "deal_offset": 16, + "games": 96 + }, + { + "job": "6abd8436404719ba376147bc", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-20", + "deal_offset": 20, + "games": 96 + }, + { + "job": "6abd8437fbc85ba68235d117", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-24", + "deal_offset": 24, + "games": 96 + }, + { + "job": "6abd8438fbc85ba68235d119", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-28", + "deal_offset": 28, + "games": 96 + }, + { + "job": "6abd843afbc85ba68235d11b", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-32", + "deal_offset": 32, + "games": 96 + }, + { + "job": "6abd843b404719ba376147be", + "run": "multiplayer-hard-e10-search48-h2400-search_geo-6p-36", + "deal_offset": 36, + "games": 96 + } + ], + "scope": "Development screen; old 1200-step reports must not be combined with these" } } diff --git a/ai/strong/fixtures/search-horizon-six-player.json b/ai/strong/fixtures/search-horizon-six-player.json new file mode 100644 index 0000000..8ee19be --- /dev/null +++ b/ai/strong/fixtures/search-horizon-six-player.json @@ -0,0 +1 @@ +{"seat":1,"options":{"samples":48,"candidates":6,"extraCandidates":[39],"geography":true,"seed":"arena-guided-127-8"},"original":{"index":0,"action":{"name":"Bid","data":12},"evaluations":240,"truncated":1,"winEstimate":0.16666666666666666,"values":{"0":8,"1":6,"2":7,"19":0,"39":6}},"extended":{"index":0,"action":{"name":"Bid","data":12},"evaluations":240,"truncated":0,"winEstimate":0.16666666666666666,"values":{"0":8,"1":6,"2":8,"19":0,"39":6}},"state":{"map":{"name":"Germany","cities":[{"name":"Flensburg","region":"green","x":37,"y":427},{"name":"Kiel","region":"green","x":106,"y":392},{"name":"Hamburg","region":"green","x":212,"y":396},{"name":"Hannover","region":"green","x":378,"y":395},{"name":"Bremen","region":"green","x":276,"y":463},{"name":"Wilhelmshaven","region":"green","x":211,"y":521},{"name":"Cuxhaven","region":"green","x":168,"y":474},{"name":"Lubeck","region":"brown","x":153,"y":341},{"name":"Rostock","region":"brown","x":128,"y":256},{"name":"Schwerin","region":"brown","x":217,"y":297},{"name":"Stralsund","region":"brown","x":210,"y":126},{"name":"Magdeburg","region":"brown","x":389,"y":271},{"name":"Berlin","region":"brown","x":355,"y":170},{"name":"Frankfurt-O","region":"brown","x":381,"y":99},{"name":"Halle","region":"yellow","x":493,"y":259},{"name":"Leipzig","region":"yellow","x":526,"y":222},{"name":"Dresden","region":"yellow","x":572,"y":126},{"name":"Erfurt","region":"yellow","x":567,"y":309},{"name":"Fulda","region":"yellow","x":628,"y":398},{"name":"W\u00fcrzburg","region":"yellow","x":735,"y":386},{"name":"Nurnberg","region":"yellow","x":780,"y":309},{"name":"Aachen","region":"cyan","x":614,"y":654},{"name":"K\u00f6ln","region":"cyan","x":590,"y":589},{"name":"Trier","region":"cyan","x":739,"y":628},{"name":"Mainz","region":"cyan","x":697,"y":514},{"name":"Frankfurt-M","region":"cyan","x":672,"y":473},{"name":"Saarbr\u00fccken","region":"cyan","x":818,"y":568},{"name":"Mannheim","region":"cyan","x":796,"y":479},{"name":"Freiburg","region":"purple","x":966,"y":537},{"name":"Stuttgart","region":"purple","x":884,"y":458},{"name":"Konstanz","region":"purple","x":1011,"y":459},{"name":"Augsburg","region":"purple","x":911,"y":346},{"name":"Regensburg","region":"purple","x":846,"y":256},{"name":"M\u00fcnchen","region":"purple","x":967,"y":278},{"name":"Passau","region":"purple","x":904,"y":153}],"connections":[{"nodes":["Flensburg","Kiel"],"cost":4},{"nodes":["Kiel","Hamburg"],"cost":8},{"nodes":["Kiel","Lubeck"],"cost":4},{"nodes":["Hamburg","Hannover"],"cost":17},{"nodes":["Hamburg","Bremen"],"cost":11},{"nodes":["Hamburg","Cuxhaven"],"cost":11},{"nodes":["Hamburg","Lubeck"],"cost":6},{"nodes":["Hamburg","Schwerin"],"cost":8},{"nodes":["Bremen","Wilhelmshaven"],"cost":11},{"nodes":["Bremen","Hannover"],"cost":10},{"nodes":["Bremen","Cuxhaven"],"cost":8},{"nodes":["Hannover","Schwerin"],"cost":19},{"nodes":["Hannover","Magdeburg"],"cost":15},{"nodes":["Hannover","Erfurt"],"cost":19},{"nodes":["Lubeck","Schwerin"],"cost":6},{"nodes":["Schwerin","Rostock"],"cost":6},{"nodes":["Schwerin","Stralsund"],"cost":19},{"nodes":["Schwerin","Berlin"],"cost":18},{"nodes":["Schwerin","Magdeburg"],"cost":16},{"nodes":["Stralsund","Rostock"],"cost":19},{"nodes":["Stralsund","Berlin"],"cost":15},{"nodes":["Berlin","Magdeburg"],"cost":10},{"nodes":["Berlin","Frankfurt-O"],"cost":6},{"nodes":["Berlin","Halle"],"cost":17},{"nodes":["Magdeburg","Halle"],"cost":11},{"nodes":["Frankfurt-O","Leipzig"],"cost":21},{"nodes":["Frankfurt-O","Dresden"],"cost":16},{"nodes":["Halle","Leipzig"],"cost":0},{"nodes":["Leipzig","Dresden"],"cost":13},{"nodes":["Erfurt","Halle"],"cost":6},{"nodes":["Erfurt","Dresden"],"cost":19},{"nodes":["Erfurt","Nurnberg"],"cost":21},{"nodes":["Erfurt","Fulda"],"cost":13},{"nodes":["Fulda","W\u00fcrzburg"],"cost":11},{"nodes":["Fulda","Frankfurt-M"],"cost":8},{"nodes":["W\u00fcrzburg","Nurnberg"],"cost":8},{"nodes":["W\u00fcrzburg","Frankfurt-M"],"cost":13},{"nodes":["W\u00fcrzburg","Mannheim"],"cost":10},{"nodes":["W\u00fcrzburg","Stuttgart"],"cost":12},{"nodes":["W\u00fcrzburg","Augsburg"],"cost":19},{"nodes":["Nurnberg","Augsburg"],"cost":18},{"nodes":["Nurnberg","Regensburg"],"cost":12},{"nodes":["Aachen","K\u00f6ln"],"cost":7},{"nodes":["Aachen","Trier"],"cost":19},{"nodes":["Trier","K\u00f6ln"],"cost":20},{"nodes":["Trier","Mainz"],"cost":18},{"nodes":["Trier","Saarbr\u00fccken"],"cost":11},{"nodes":["Mainz","Frankfurt-M"],"cost":0},{"nodes":["Mainz","K\u00f6ln"],"cost":21},{"nodes":["Mainz","Saarbr\u00fccken"],"cost":10},{"nodes":["Mainz","Mannheim"],"cost":11},{"nodes":["Mannheim","Saarbr\u00fccken"],"cost":16},{"nodes":["Mannheim","Stuttgart"],"cost":6},{"nodes":["Stuttgart","Saarbr\u00fccken"],"cost":17},{"nodes":["Stuttgart","Freiburg"],"cost":16},{"nodes":["Stuttgart","Konstanz"],"cost":16},{"nodes":["Stuttgart","Augsburg"],"cost":15},{"nodes":["Konstanz","Freiburg"],"cost":14},{"nodes":["Konstanz","Augsburg"],"cost":17},{"nodes":["Regensburg","Augsburg"],"cost":13},{"nodes":["Regensburg","M\u00fcnchen"],"cost":10},{"nodes":["Regensburg","Passau"],"cost":12},{"nodes":["Augsburg","M\u00fcnchen"],"cost":6},{"nodes":["Passau","M\u00fcnchen"],"cost":14}],"layout":"Landscape","mapPosition":[20,20],"mapSpecificRules":"Stop resupplying uranium after power plant 39 has been bought.","viewBox":[1465,860],"adjustRatio":[1,1],"playerOrderPosition":[1160,140],"cityCountPosition":[0,0],"powerPlantMarketPosition":[745,0],"actualMarketWidth":430,"buttonsPosition":[1305,0],"playerBoardsPosition":[1105,200],"roundInfoPosition":[20,590],"supplyPosition":[0,720]},"players":[{"id":0,"powerPlants":[],"coalCapacity":0,"coalLeft":0,"oilCapacity":0,"oilLeft":0,"garbageCapacity":0,"garbageLeft":0,"uraniumCapacity":0,"uraniumLeft":0,"hybridCapacity":0,"hybridLeft":0,"money":50,"housesLeft":22,"cities":[],"powerPlantsNotUsed":[],"availableMoves":null,"lastMove":{"name":"Pass","data":true},"isDropped":false,"isAI":false,"bid":7,"passed":true,"skipAuction":false,"citiesPowered":0,"resourcesUsed":[],"totalIncome":0,"totalSpentCities":0,"totalSpentConnections":0,"totalSpentPlants":0,"totalSpentResources":0,"usedFreeJump":false,"totalTimeUsed":0},{"id":1,"powerPlants":[],"coalCapacity":0,"coalLeft":0,"oilCapacity":0,"oilLeft":0,"garbageCapacity":0,"garbageLeft":0,"uraniumCapacity":0,"uraniumLeft":0,"hybridCapacity":0,"hybridLeft":0,"money":50,"housesLeft":22,"cities":[],"powerPlantsNotUsed":[],"availableMoves":{"Bid":[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],"Pass":[true]},"lastMove":{"name":"Bid","data":8},"isDropped":false,"isAI":false,"bid":8,"passed":false,"skipAuction":false,"citiesPowered":0,"resourcesUsed":[],"totalIncome":0,"totalSpentCities":0,"totalSpentConnections":0,"totalSpentPlants":0,"totalSpentResources":0,"usedFreeJump":false,"totalTimeUsed":0},{"id":2,"powerPlants":[],"coalCapacity":0,"coalLeft":0,"oilCapacity":0,"oilLeft":0,"garbageCapacity":0,"garbageLeft":0,"uraniumCapacity":0,"uraniumLeft":0,"hybridCapacity":0,"hybridLeft":0,"money":50,"housesLeft":22,"cities":[],"powerPlantsNotUsed":[],"availableMoves":null,"lastMove":{"name":"Bid","data":11},"isDropped":false,"isAI":false,"bid":11,"passed":false,"skipAuction":false,"citiesPowered":0,"resourcesUsed":[],"totalIncome":0,"totalSpentCities":0,"totalSpentConnections":0,"totalSpentPlants":0,"totalSpentResources":0,"usedFreeJump":false,"totalTimeUsed":0},{"id":3,"powerPlants":[],"coalCapacity":0,"coalLeft":0,"oilCapacity":0,"oilLeft":0,"garbageCapacity":0,"garbageLeft":0,"uraniumCapacity":0,"uraniumLeft":0,"hybridCapacity":0,"hybridLeft":0,"money":50,"housesLeft":22,"cities":[],"powerPlantsNotUsed":[],"availableMoves":null,"lastMove":{"name":"Pass","data":true},"isDropped":false,"isAI":false,"bid":0,"passed":true,"skipAuction":false,"citiesPowered":0,"resourcesUsed":[],"totalIncome":0,"totalSpentCities":0,"totalSpentConnections":0,"totalSpentPlants":0,"totalSpentResources":0,"usedFreeJump":false,"totalTimeUsed":0},{"id":4,"powerPlants":[],"coalCapacity":0,"coalLeft":0,"oilCapacity":0,"oilLeft":0,"garbageCapacity":0,"garbageLeft":0,"uraniumCapacity":0,"uraniumLeft":0,"hybridCapacity":0,"hybridLeft":0,"money":50,"housesLeft":22,"cities":[],"powerPlantsNotUsed":[],"availableMoves":null,"lastMove":{"name":"Pass","data":true},"isDropped":false,"isAI":false,"bid":0,"passed":true,"skipAuction":false,"citiesPowered":0,"resourcesUsed":[],"totalIncome":0,"totalSpentCities":0,"totalSpentConnections":0,"totalSpentPlants":0,"totalSpentResources":0,"usedFreeJump":false,"totalTimeUsed":0},{"id":5,"powerPlants":[],"coalCapacity":0,"coalLeft":0,"oilCapacity":0,"oilLeft":0,"garbageCapacity":0,"garbageLeft":0,"uraniumCapacity":0,"uraniumLeft":0,"hybridCapacity":0,"hybridLeft":0,"money":50,"housesLeft":22,"cities":[],"powerPlantsNotUsed":[],"availableMoves":null,"lastMove":{"name":"Pass","data":true},"isDropped":false,"isAI":false,"bid":0,"passed":true,"skipAuction":false,"citiesPowered":0,"resourcesUsed":[],"totalIncome":0,"totalSpentCities":0,"totalSpentConnections":0,"totalSpentPlants":0,"totalSpentResources":0,"usedFreeJump":false,"totalTimeUsed":0}],"playerOrder":[0,1,2,3,4,5],"currentPlayers":[1],"powerPlantsDeck":[{"number":12,"type":4,"cost":2,"citiesPowered":2},{"number":26,"type":1,"cost":2,"citiesPowered":5},{"number":42,"type":0,"cost":2,"citiesPowered":6},{"number":37,"type":5,"cost":0,"citiesPowered":4},{"number":34,"type":3,"cost":1,"citiesPowered":5},{"number":46,"type":4,"cost":3,"citiesPowered":7},{"number":14,"type":2,"cost":2,"citiesPowered":2},{"number":27,"type":5,"cost":0,"citiesPowered":3},{"number":25,"type":0,"cost":2,"citiesPowered":5},{"number":29,"type":4,"cost":1,"citiesPowered":4},{"number":33,"type":5,"cost":0,"citiesPowered":4},{"number":19,"type":2,"cost":2,"citiesPowered":3},{"number":15,"type":0,"cost":2,"citiesPowered":3},{"number":24,"type":2,"cost":2,"citiesPowered":4},{"number":30,"type":2,"cost":3,"citiesPowered":6},{"number":16,"type":1,"cost":2,"citiesPowered":3},{"number":31,"type":0,"cost":3,"citiesPowered":6},{"number":23,"type":3,"cost":1,"citiesPowered":3},{"number":35,"type":1,"cost":1,"citiesPowered":5},{"number":17,"type":3,"cost":1,"citiesPowered":2},{"number":39,"type":3,"cost":1,"citiesPowered":6},{"number":50,"type":6,"cost":0,"citiesPowered":6},{"number":20,"type":0,"cost":3,"citiesPowered":5},{"number":44,"type":5,"cost":0,"citiesPowered":5},{"number":40,"type":1,"cost":2,"citiesPowered":6},{"number":36,"type":0,"cost":3,"citiesPowered":7},{"number":18,"type":5,"cost":0,"citiesPowered":2},{"number":3,"type":1,"cost":2,"citiesPowered":1},{"number":22,"type":5,"cost":0,"citiesPowered":2},{"number":38,"type":2,"cost":3,"citiesPowered":7},{"number":21,"type":4,"cost":2,"citiesPowered":4},{"number":32,"type":1,"cost":3,"citiesPowered":6},{"number":28,"type":3,"cost":1,"citiesPowered":4},{"number":7,"type":1,"cost":3,"citiesPowered":2},{"number":99,"type":7,"cost":0,"citiesPowered":6}],"coalSupply":0,"oilSupply":6,"garbageSupply":15,"uraniumSupply":10,"coalResupply":[[3,4,3],[4,5,3],[5,6,4],[5,7,5],[7,9,6]],"oilResupply":[[2,2,4],[2,3,4],[3,4,5],[4,5,6],[5,6,7]],"garbageResupply":[[1,2,3],[1,2,3],[2,3,4],[3,3,5],[3,5,6]],"uraniumResupply":[[1,1,1],[1,1,1],[1,2,2],[2,3,2],[2,3,3]],"coalMarket":24,"oilMarket":18,"garbageMarket":9,"uraniumMarket":2,"coalPrices":[1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8],"oilPrices":[1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8],"garbagePrices":[1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8],"uraniumPrices":[1,2,3,4,5,6,7,8,10,12,14,16],"actualMarket":[{"number":4,"type":0,"cost":2,"citiesPowered":1},{"number":5,"type":4,"cost":2,"citiesPowered":1},{"number":6,"type":2,"cost":1,"citiesPowered":1},{"number":8,"type":0,"cost":3,"citiesPowered":2}],"futureMarket":[{"number":9,"type":1,"cost":1,"citiesPowered":1},{"number":10,"type":0,"cost":2,"citiesPowered":2},{"number":11,"type":3,"cost":1,"citiesPowered":2},{"number":13,"type":5,"cost":0,"citiesPowered":1}],"chosenPowerPlant":{"number":6,"type":2,"cost":1,"citiesPowered":1},"currentBid":11,"highestBidders":[],"auctioningPlayer":0,"step":1,"phase":"Auction","options":{"fastBid":false,"map":"Germany","variant":"recharged","showMoney":true,"useNewRechargedSetup":true,"trackTotalSpent":true,"chooseRegions":false,"chooseColors":false},"log":[{"type":"event","event":"Game Start!"},{"type":"move","player":0,"move":{"name":"ChoosePowerPlant","data":6},"simple":"undefined chooses Power Plant 6 to initiate an auction.","pretty":"undefined chooses Power Plant 6 to initiate an auction."},{"type":"move","player":0,"move":{"name":"Bid","data":7},"simple":"undefined bids $7.","pretty":"undefined bids $7."},{"type":"move","player":1,"move":{"name":"Bid","data":8},"simple":"undefined bids $8.","pretty":"undefined bids $8."},{"type":"move","player":2,"move":{"name":"Bid","data":11},"simple":"undefined bids $11.","pretty":"undefined bids $11."},{"type":"move","player":3,"move":{"name":"Pass","data":true},"simple":"undefined passes.","pretty":"undefined passes."},{"type":"move","player":4,"move":{"name":"Pass","data":true},"simple":"undefined passes.","pretty":"undefined passes."},{"type":"move","player":5,"move":{"name":"Pass","data":true},"simple":"undefined passes.","pretty":"undefined passes."},{"type":"move","player":0,"move":{"name":"Pass","data":true},"simple":"undefined passes.","pretty":"undefined passes."}],"hiddenLog":[],"seed":"multiplayer-search-strong-probe-v1-6p-5","round":1,"newTurn":true,"auctionSkips":0,"citiesToStep2":6,"citiesToEndGame":14,"resourceResupply":["[7, 5, 3, 2]","[9, 6, 5, 3]","[6, 7, 6, 3]"],"paymentTable":[10,22,33,44,54,64,73,82,90,98,105,112,118,124,129,134,138,142,145,148,150,150],"variant":"recharged","minimunBid":6,"plantDiscountActive":true,"discardSmallestPlant":false,"cardsLeft":35,"nextCardWeak":true,"card39Bought":false,"knownPowerPlantDeck":[{"number":4,"type":0,"cost":2,"citiesPowered":1},{"number":5,"type":4,"cost":2,"citiesPowered":1},{"number":6,"type":2,"cost":1,"citiesPowered":1},{"number":8,"type":0,"cost":3,"citiesPowered":2},{"number":9,"type":1,"cost":1,"citiesPowered":1},{"number":10,"type":0,"cost":2,"citiesPowered":2},{"number":11,"type":3,"cost":1,"citiesPowered":2},{"number":13,"type":5,"cost":0,"citiesPowered":1}],"knownPowerPlantDeckStep3":[]},"provenance":"HF search-horizon-diagnostic-v1; exact replay of six-player arena deal 5, Recharged/open, seat 1, decision arena-guided-127-8."} diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index 3653e9f..3806802 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -25,7 +25,7 @@ python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 o mkdir -p /workspace python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH -python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v28.tgz\",repo_type=\"dataset\", revision=\"1632ae68aabb62fb924a6e119b7704f10dd3da4a\");tarfile.open(p).extractall(\"/workspace\")" +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v32.tgz\",repo_type=\"dataset\", revision=\"37465b08df007221665d796448aea57e6828257e\");tarfile.open(p).extractall(\"/workspace\")" cd /workspace python -u ai/strong/arena-job.py ' diff --git a/ai/strong/search.cjs b/ai/strong/search.cjs index 97ff255..44c8fcc 100644 --- a/ai/strong/search.cjs +++ b/ai/strong/search.cjs @@ -2,6 +2,7 @@ const c = require('../core.cjs'), eco = require('./economics.cjs'); const { createAnalysisScenario } = require('../../engine/dist/src/analysis.js'); +const DEFAULT_MAX_STEPS = 2400; function shortlist(g, seat, limit = 5, geography = false) { const a = c.candidates(g, seat), v = eco.scores(g, seat, a), @@ -43,7 +44,7 @@ function choose( samples = 6, candidates = 5, seed = 'public-search', - maxSteps = 1200, + maxSteps = DEFAULT_MAX_STEPS, extraCandidates = [], geography = false, } = {} @@ -84,4 +85,4 @@ function choose( values: totals, }; } -module.exports = { choose, shortlist }; +module.exports = { choose, shortlist, DEFAULT_MAX_STEPS }; diff --git a/ai/strong/test-search-horizon.cjs b/ai/strong/test-search-horizon.cjs new file mode 100644 index 0000000..1df8551 --- /dev/null +++ b/ai/strong/test-search-horizon.cjs @@ -0,0 +1,12 @@ +const test = require('node:test'), + assert = require('node:assert/strict'); +const search = require('./search.cjs'); +const fixture = require('./fixtures/search-horizon-six-player.json'); +test('six-player search completes the continuation that exceeded the old horizon', () => { + const old = search.choose(fixture.state, fixture.seat, { ...fixture.options, maxSteps: 1200 }); + assert.deepEqual(old, fixture.original); + assert.equal(old.truncated, 1); + const current = search.choose(fixture.state, fixture.seat, fixture.options); + assert.deepEqual(current, fixture.extended); + assert.equal(current.truncated, 0); +}); diff --git a/ai/strong/verify-final.py b/ai/strong/verify-final.py index f865be1..43a0c07 100644 --- a/ai/strong/verify-final.py +++ b/ai/strong/verify-final.py @@ -73,6 +73,10 @@ for path in a.reports: report["candidate_search_samples"] == candidate["search_samples"], f"{name}: wrong search budget", ) + require( + report.get("search_max_steps", 1200) == candidate.get("search_max_steps", 1200), + f"{name}: wrong search simulation horizon", + ) require( report["candidate_geographic_search"] == candidate["geographic_search"], f"{name}: wrong geographic search setting", From a9b47204ceb3b9a5b9663a13a22c832ee1d239ac Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:51:11 +0200 Subject: [PATCH 095/184] Separate diagnostic job provenance from corrected runtime provenance --- ai/strong/experiments.json | 41 ++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 99d31bd..be15912 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10007,21 +10007,6 @@ "total_learner_rollouts": 2327280, "next_action": "Run new held-out six-player searches with source32, retaining old 1200-step results separately. Final candidate must explicitly specify search_max_steps=2400 when selecting this runtime.", "job": "6abd8041404719ba37614703", - "source": { - "archive": "strong-source-v32.tgz", - "revision": "37465b08df007221665d796448aea57e6828257e", - "base_revision": "9752cbc31db834b8c07b62504997fc0134a8e0ee", - "changed_files": [ - "ai/strong/search.cjs", - "ai/strong/evaluate.py", - "ai/strong/combine-arenas.py", - "ai/strong/verify-final.py", - "ai/strong/diagnose-search-horizon.cjs", - "ai/strong/test-search-horizon.cjs", - "ai/strong/fixtures/search-horizon-six-player.json" - ], - "archive_sha256": "b95ab1d8bc8f2bae42e7428d8f7d80e727083c3e48f8c0075d64e6ae16144bfc" - }, "actual_policy": "Original 1200-move cap; diagnostic retry does not change decisions", "artifact_revision": "849cea0ecdd648946529d7c4b2769011317d280d", "report": { @@ -10207,6 +10192,32 @@ 6 ], "mixed_horizon_combination_rejected": true + }, + "corrected_runtime_source": { + "archive": "strong-source-v32.tgz", + "revision": "37465b08df007221665d796448aea57e6828257e", + "base_revision": "9752cbc31db834b8c07b62504997fc0134a8e0ee", + "changed_files": [ + "ai/strong/search.cjs", + "ai/strong/evaluate.py", + "ai/strong/combine-arenas.py", + "ai/strong/verify-final.py", + "ai/strong/diagnose-search-horizon.cjs", + "ai/strong/test-search-horizon.cjs", + "ai/strong/fixtures/search-horizon-six-player.json" + ], + "archive_sha256": "b95ab1d8bc8f2bae42e7428d8f7d80e727083c3e48f8c0075d64e6ae16144bfc" + }, + "diagnostic_source": { + "archive": "strong-source-v31.tgz", + "revision": "9752cbc31db834b8c07b62504997fc0134a8e0ee", + "base_revision": "508bc42027cae5bfeea01228b48069c8287b332a", + "changed_files": [ + "ai/strong/diagnose-search-horizon.py", + "ai/strong/diagnose-search-horizon.cjs" + ], + "archive_sha256": "7aec51dcc2f2af636965c0496705850ed2d2d6b3dee89021d494e26dc6820cb7", + "report_revision": "6f9442ff21521c460e5c6abc14ba06efb3a4dd25" } }, "multiplayer_6p_horizon2400_screen": { From ad35564cf07adddfcd63f9373ac59b6303231258 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:52:58 +0200 Subject: [PATCH 096/184] Verify twenty-batch H200 export and launch paired held-out comparisons --- ai/strong/experiments.json | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index be15912..5b6675d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10288,5 +10288,71 @@ } ], "scope": "Development screen; old 1200-step reports must not be combined with these" + }, + "multiplayer_h200_update19_screening": { + "candidate_revision": "849cea0ecdd648946529d7c4b2769011317d280d", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "training_games": 4800, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "max_logit_error": 3.4332275390625e-05, + "max_value_error": 2.592802047729492e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-h200-u19-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abd84b4fbc85ba68235d153" + }, + { + "run": "multiplayer-h200-u19-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abd84b5fbc85ba68235d155" + }, + { + "run": "multiplayer-h200-u19-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abd84b5404719ba37614802" + }, + { + "run": "multiplayer-h200-u19-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abd84b6404719ba37614804" + }, + { + "run": "multiplayer-h200-u19-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abd84b7fbc85ba68235d157" + }, + { + "run": "multiplayer-h200-u19-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abd84b7404719ba37614806" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0 } } From 4239d08f1700f58bc5ab7f72bd519f845db62454 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Wed, 30 Sep 2026 23:57:10 +0200 Subject: [PATCH 097/184] Record significant stronger-opponent gain and two-player regression at update19 --- ai/strong/experiments.json | 647 ++++++++++++++++++++++++++++++++++++- 1 file changed, 645 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 5b6675d..515424d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10350,9 +10350,652 @@ "job_id": "6abd84b7404719ba37614806" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", - "search_samples": 0 + "search_samples": 0, + "reports": { + "2p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/849cea0ecdd648946529d7c4b2769011317d280d/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.5359375, + "truncated": 0, + "seconds": 23.929844021999997, + "inference_p95_ms": 0.3705859999968197, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.58125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.69375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.525 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.65, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.6 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.58125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8fbdcbfcb851ab5a28460265494843f91dda611d" + }, + "3p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/849cea0ecdd648946529d7c4b2769011317d280d/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.6020833333333333, + "truncated": 0, + "seconds": 29.898962358000006, + "inference_p95_ms": 0.394765549994247, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.5916666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.5666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.49166666666666664, + 0.6416666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5916666666666667, + 0.7666666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5833333333333334, + 0.7333333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5666666666666667, + 0.6395833333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8fbdcbfcb851ab5a28460265494843f91dda611d" + }, + "4p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/849cea0ecdd648946529d7c4b2769011317d280d/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5359375, + "truncated": 0, + "seconds": 40.81274458799999, + "inference_p95_ms": 0.4202865499991047, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.5375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.44375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.53125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.61875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.7 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.61875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.54375, + 0.7 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.496875, + 0.5734375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8fbdcbfcb851ab5a28460265494843f91dda611d" + }, + "5p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/849cea0ecdd648946529d7c4b2769011317d280d/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.676875, + "truncated": 0, + "seconds": 45.73251201300002, + "inference_p95_ms": 0.419397999994686, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.555, + 0.69 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.545, + 0.65 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.785, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.72, + 0.85 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.6975, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.625, + 0.765 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.64375, + 0.709375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8fbdcbfcb851ab5a28460265494843f91dda611d" + }, + "6p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/849cea0ecdd648946529d7c4b2769011317d280d/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.6119791666666666, + "truncated": 0, + "seconds": 52.13009155400002, + "inference_p95_ms": 0.41978435000657993, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.5583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.48333333333333334, + 0.6333333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.575, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5125, + 0.6375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.6479166666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.58125, + 0.7125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6041666666666666, + 0.7208333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5755208333333334, + 0.6463541666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8fbdcbfcb851ab5a28460265494843f91dda611d" + }, + "3p/a260": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/849cea0ecdd648946529d7c4b2769011317d280d/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "25dcb31f673f0ad699392c23142ff644eca4bdb932d9c1f98b81b2837eda12da", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.32083333333333336, + "truncated": 0, + "seconds": 69.90255784899999, + "inference_p95_ms": 0.39517299999545147, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.2833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.36666666666666664 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.3, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.39166666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.4166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.5166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.2833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19166666666666668, + 0.375 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.27708333333333335, + 0.36666666666666664 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8fbdcbfcb851ab5a28460265494843f91dda611d" + } + }, + "paired_against_h200_u9": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.5359375, + "baseline_win_rate": 0.590625, + "paired_delta": -0.0546875, + "paired_seed_bootstrap_95_interval": [ + -0.1203125, + 0.0125 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.6020833333333333, + "baseline_win_rate": 0.4979166666666667, + "paired_delta": 0.10416666666666666, + "paired_seed_bootstrap_95_interval": [ + 0.052083333333333336, + 0.15729166666666666 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.5359375, + "baseline_win_rate": 0.45625, + "paired_delta": 0.0796875, + "paired_seed_bootstrap_95_interval": [ + 0.03125, + 0.128125 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.676875, + "baseline_win_rate": 0.5775, + "paired_delta": 0.09937500000000002, + "paired_seed_bootstrap_95_interval": [ + 0.05625, + 0.14187500000000003 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.6119791666666666, + "baseline_win_rate": 0.5364583333333334, + "paired_delta": 0.07552083333333334, + "paired_seed_bootstrap_95_interval": [ + 0.0390625, + 0.11041666666666665 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.32083333333333336, + "baseline_win_rate": 0.24583333333333332, + "paired_delta": 0.075, + "paired_seed_bootstrap_95_interval": [ + 0.024999999999999994, + 0.12708333333333335 + ] + } + }, + "paired_against_geoleague_u9": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.5359375, + "baseline_win_rate": 0.6046875, + "paired_delta": -0.06875, + "paired_seed_bootstrap_95_interval": [ + -0.1328125, + -0.0078125 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.6020833333333333, + "baseline_win_rate": 0.5395833333333333, + "paired_delta": 0.0625, + "paired_seed_bootstrap_95_interval": [ + 0.012499999999999997, + 0.11458333333333333 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.5359375, + "baseline_win_rate": 0.52734375, + "paired_delta": 0.00859375, + "paired_seed_bootstrap_95_interval": [ + -0.03046875, + 0.0484375 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.676875, + "baseline_win_rate": 0.62, + "paired_delta": 0.056874999999999995, + "paired_seed_bootstrap_95_interval": [ + 0.009374999999999998, + 0.105625 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.6119791666666666, + "baseline_win_rate": 0.5552083333333333, + "paired_delta": 0.056770833333333326, + "paired_seed_bootstrap_95_interval": [ + 0.015625, + 0.09791666666666668 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.32083333333333336, + "baseline_win_rate": 0.24375, + "paired_delta": 0.07708333333333332, + "paired_seed_bootstrap_95_interval": [ + 0.029166666666666664, + 0.125 + ] + } + }, + "decision": "Continue H200 training: update19 improves over update9 against economic opponents at 3-6 players and frozen A260 at 3 players with paired intervals above zero. A260 win credit 32.0833% remains below 33.3333% equal-share point reference and is not qualification. Two-player economic performance regresses versus geoleague update9 (paired -6.875pp, CI [-13.28125,-0.78125]); retain earlier candidates." } } From d0fa8f01818f68efb42a7e18938eec64f3044ae7 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:01:59 +0200 Subject: [PATCH 098/184] Prepare selective regeneration of teacher games with capped rollouts --- ai/strong/experiments.json | 16 +++ ai/strong/launch-strong-replay-distill.sh | 2 +- ai/strong/launch-teacher-repair.sh | 23 ++++ ai/strong/repair-teacher-dataset.py | 133 ++++++++++++++++++++++ 4 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 ai/strong/launch-teacher-repair.sh create mode 100644 ai/strong/repair-teacher-dataset.py diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 515424d..feec1ba 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10997,5 +10997,21 @@ } }, "decision": "Continue H200 training: update19 improves over update9 against economic opponents at 3-6 players and frozen A260 at 3 players with paired intervals above zero. A260 win credit 32.0833% remains below 33.3333% equal-share point reference and is not qualification. Two-player economic performance regresses versus geoleague update9 (paired -6.875pp, CI [-13.28125,-0.78125]); retain earlier candidates." + }, + "strong_teacher_selective_repair": { + "status": "PREPARED_NOT_LAUNCHED", + "reason": "Six-player original teacher job reports two capped teacher rollouts at 110 games. Original job remains running; repair must wait for all five complete shards and pin their immutable input revision.", + "source": { + "archive": "strong-source-v33.tgz", + "revision": "be9262485a29f38dd5c7f0f8442909d70bb98b94", + "base_revision": "37465b08df007221665d796448aea57e6828257e", + "changed_files": [ + "ai/strong/repair-teacher-dataset.py" + ], + "archive_sha256": "c1d380544a9db2f15dece6d6d45c5233a5eaa39fd3243f1aef4326a3ca5cf556" + }, + "launcher": "ai/strong/launch-teacher-repair.sh", + "output_version": "multiplayer-teacher-v2-strong-repaired", + "policy": "Preserve clean games; replay only affected full games at 2400-step search horizon using original IDs/seeds. Keep originals untouched and record original capped counts. Require full strict audit before GPU training." } } diff --git a/ai/strong/launch-strong-replay-distill.sh b/ai/strong/launch-strong-replay-distill.sh index 7558fef..4deaa58 100644 --- a/ai/strong/launch-strong-replay-distill.sh +++ b/ai/strong/launch-strong-replay-distill.sh @@ -8,7 +8,7 @@ hf jobs run --detach --flavor "${HF_FLAVOR:-a10g-large}" --timeout "${JOB_TIMEOU --secrets HF_TOKEN \ --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ - --env RUN_NAME="${RUN_NAME:-multiplayer-distillation-strong-replay-v1-$mode}" --env TARGET_MODE="$mode" --env TRAIN_SEED=622 --env ARCHITECTURE=multiplayer_ordered --env DATA_REVISION="$revision" --env EPOCHS="${EPOCHS:-15}" --env LR="${LR:-0.00005}" --env DATA_VERSION=multiplayer-teacher-v2-strong --env SHARDS=5 --env DISAGREEMENT_WEIGHT=2 \ + --env RUN_NAME="${RUN_NAME:-multiplayer-distillation-strong-replay-v1-$mode}" --env TARGET_MODE="$mode" --env TRAIN_SEED=622 --env ARCHITECTURE=multiplayer_ordered --env DATA_REVISION="$revision" --env EPOCHS="${EPOCHS:-15}" --env LR="${LR:-0.00005}" --env DATA_VERSION="${DATA_VERSION:-multiplayer-teacher-v2-strong-repaired}" --env SHARDS=5 --env DISAGREEMENT_WEIGHT=2 \ --env INIT_CHECKPOINT=runs/multiplayer-distillation-v2-hard/best.pt --env INIT_REVISION=ab34dd266010ded1c9a6c818c721e5505dd1ddeb \ --env REPLAY_DATA_VERSION=multiplayer-teacher-v1 --env REPLAY_DATA_REVISION=082ca1456736940ee32c96db3ad1bc4e4d0b206b \ --label project=powergrid-ai --label stage="multiplayer-distillation-strong-replay-$mode" \ diff --git a/ai/strong/launch-teacher-repair.sh b/ai/strong/launch-teacher-repair.sh new file mode 100644 index 0000000..e44c784 --- /dev/null +++ b/ai/strong/launch-teacher-repair.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -euo pipefail +revision=${1:?Pin completed original stronger-opponent dataset revision} +[[ "$revision" =~ ^[0-9a-f]{40}$ ]] +hf jobs run --detach --flavor cpu-performance --timeout 3h \ + --secrets HF_TOKEN \ + --env HF_DATA_REPO=coyotte508/powergrid-ai-training-v1 \ + --env REPAIR_INPUT_REVISION="$revision" \ + --env REPAIR_INPUT_VERSION=multiplayer-teacher-v2-strong \ + --env REPAIR_OUTPUT_VERSION=multiplayer-teacher-v2-strong-repaired \ + --env DATA_WORKERS=24 \ + --label project=powergrid-ai --label stage=strong-teacher-horizon-repair \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v33.tgz\",repo_type=\"dataset\",revision=\"be9262485a29f38dd5c7f0f8442909d70bb98b94\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python -u ai/strong/repair-teacher-dataset.py +' diff --git a/ai/strong/repair-teacher-dataset.py b/ai/strong/repair-teacher-dataset.py new file mode 100644 index 0000000..f69ed29 --- /dev/null +++ b/ai/strong/repair-teacher-dataset.py @@ -0,0 +1,133 @@ +"""HF CPU job: preserve clean teacher games and replay capped games at 2400 moves.""" + +from concurrent.futures import ThreadPoolExecutor +from collections import Counter +import gzip +import json +import os +from pathlib import Path +import subprocess + +from huggingface_hub import HfApi, hf_hub_download +from teacher_contract import validate_game + +repo = os.environ["HF_DATA_REPO"] +revision = os.environ["REPAIR_INPUT_REVISION"] +version = os.environ["REPAIR_INPUT_VERSION"] +target = os.environ["REPAIR_OUTPUT_VERSION"] +assert len(revision) == 40 and all(c in "0123456789abcdef" for c in revision) +assert version != target +assert all(c.isalnum() or c in "-_" for c in target) +limit = int( + subprocess.check_output( + [ + "node", + "-e", + "console.log(require('./ai/strong/search.cjs').DEFAULT_MAX_STEPS)", + ], + text=True, + ) +) +assert limit == 2400 +out = Path("ai/runs") / target +out.mkdir(parents=True, exist_ok=True) +manifest = dict( + input_revision=revision, + input_version=version, + output_version=target, + repaired_search_max_steps=limit, + shards=[], +) +seen = set() + + +def capped(g): + return bool( + g["truncated"] + or g["searchStats"]["truncated"] + or g.get("opponentSearchStats", {}).get("truncated", 0) + ) + + +def regenerate(old): + env = { + **os.environ, + "DATA_VERSION": version, + "PLAYER_COUNT": str(old["playerCount"]), + "FEATURE_REVISION": "4.0-multiplayer", + "TEACHER_OPPONENTS": "search_geo", + "OPPONENT_SEARCH_SAMPLES": "16", + "SEARCH_SAMPLES": "48", + "GEOGRAPHY": "1", + "INCLUDE_ALL_PHASES": "1", + } + result = subprocess.run( + ["node", "ai/strong/search-teacher.cjs", str(old["id"])], + env=env, + text=True, + capture_output=True, + check=True, + ) + new = json.loads(result.stdout) + validate_game(new) + assert not capped(new), "Corrected game still truncated; keep it out of training" + for key in ["seed", "id", "playerCount", "variant", "sealed", "opponent"]: + assert old[key] == new[key], f"Replay identity changed: {key}" + new["searchMaxSteps"] = limit + print( + json.dumps(dict(stage="repaired_teacher_game", id=new["id"], seed=new["seed"])), + flush=True, + ) + return new + + +for shard, n in enumerate(range(2, 7)): + path = hf_hub_download( + repo, + f"{version}/{version}-{shard}.jsonl.gz", + repo_type="dataset", + revision=revision, + ) + with gzip.open(path, "rt") as f: + games = [json.loads(line) for line in f] + assert len(games) == 240 and len({g["id"] for g in games}) == 240 + for g in games: + validate_game(g) + assert g["playerCount"] == n and g["opponent"] == "search_geo" + assert g["seed"] not in seen + seen.add(g["seed"]) + bad = [g for g in games if capped(g)] + with ThreadPoolExecutor(int(os.getenv("DATA_WORKERS", "24"))) as pool: + replacements = {g["id"]: g for g in pool.map(regenerate, bad)} + repaired = [replacements.get(g["id"], g) for g in games] + cells = Counter((g["rows"][0]["seat"], g["variant"], g["sealed"]) for g in repaired) + assert len(cells) == 4 * n and set(cells.values()) == {240 // (4 * n)} + assert all(not capped(g) for g in repaired) + with gzip.open(out / f"{target}-{shard}.jsonl.gz", "wt") as f: + for g in repaired: + f.write(json.dumps(g, separators=(",", ":")) + "\n") + info = dict( + shard=shard, + player_count=n, + games=240, + preserved_games=240 - len(bad), + regenerated_games=len(bad), + positions=sum(len(g["rows"]) for g in repaired), + original_capped_games=[ + dict( + id=g["id"], + seed=g["seed"], + truncated=g["truncated"], + searchStats=g["searchStats"], + opponentSearchStats=g.get("opponentSearchStats"), + ) + for g in bad + ], + ) + manifest["shards"].append(info) + print(json.dumps(dict(stage="repaired_shard", **info)), flush=True) +assert len(seen) == 1200 +(out / "repair-manifest.json").write_text(json.dumps(manifest, indent=2) + "\n") +HfApi().upload_folder( + repo_id=repo, repo_type="dataset", folder_path=str(out), path_in_repo=target +) From 9699df394496b94d8dc9877c953854257d9c22d7 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:17:26 +0200 Subject: [PATCH 099/184] Audit complete four-player stronger-opponent teacher data --- ai/strong/experiments.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index feec1ba..e3a4114 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8415,6 +8415,26 @@ "games_per_cell": 30, "validation_games": 48, "training_games": 192 + }, + "4": { + "revision": "73c2fcbf487aa41225862a75cdb67188dd602860", + "version": "multiplayer-teacher-v2-strong", + "shard": 2, + "player_count": 4, + "validated": true, + "counts": { + "games": 240, + "positions": 30612, + "truncated": 0, + "teacher_rollouts": 3306336, + "teacher_truncated": 0, + "opponent_rollouts": 3184272, + "opponent_truncated": 0 + }, + "seat_rule_cells": 16, + "games_per_cell": 15, + "validation_games": 48, + "training_games": 192 } } }, From 2ea1e8cb59a2a65633a537d28c6c9d10f16fbc42 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:41:17 +0200 Subject: [PATCH 100/184] Screen geoleague update19 after full export parity verification --- ai/strong/experiments.json | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e3a4114..a240e39 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -11033,5 +11033,71 @@ "launcher": "ai/strong/launch-teacher-repair.sh", "output_version": "multiplayer-teacher-v2-strong-repaired", "policy": "Preserve clean games; replay only affected full games at 2400-step search horizon using original IDs/seeds. Keep originals untouched and record original capped counts. Require full strict audit before GPU training." + }, + "multiplayer_geoleague_update19_screening": { + "candidate_revision": "dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "training_games": 4800, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "max_logit_error": 3.814697265625e-05, + "max_value_error": 2.294778823852539e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-geoleague-u19-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abd8fff404719ba376149aa" + }, + { + "run": "multiplayer-geoleague-u19-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abd9000404719ba376149ac" + }, + { + "run": "multiplayer-geoleague-u19-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abd9001404719ba376149ae" + }, + { + "run": "multiplayer-geoleague-u19-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abd9001404719ba376149b0" + }, + { + "run": "multiplayer-geoleague-u19-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abd9002fbc85ba68235d42b" + }, + { + "run": "multiplayer-geoleague-u19-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abd9002404719ba376149b3" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0 } } From 4de5289f1d21f78de43e16429ac6fb8562508a6e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:45:28 +0200 Subject: [PATCH 101/184] Record geoleague update19 paired strength results and first corrected six-player shard --- ai/strong/experiments.json | 746 ++++++++++++++++++++++++++++++++++++- 1 file changed, 743 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a240e39..e61e0c3 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10307,7 +10307,104 @@ "games": 96 } ], - "scope": "Development screen; old 1200-step reports must not be combined with these" + "scope": "Development screen; old 1200-step reports must not be combined with these", + "completed_shards": { + "8": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 8, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.25, + "truncated": 0, + "seconds": 3119.747045618482, + "inference_p95_ms": 1.2517869472503662, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.5416666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.16666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.2916666666666667 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3333333333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 22818, + "evaluations": 1851952, + "truncated": 0 + }, + "learner": { + "decisions": 4493, + "evaluations": 1098048, + "truncated": 0 + } + }, + "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + } + } }, "multiplayer_h200_update19_screening": { "candidate_revision": "849cea0ecdd648946529d7c4b2769011317d280d", @@ -11095,9 +11192,652 @@ "job_id": "6abd9002404719ba376149b3" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", - "search_samples": 0 + "search_samples": 0, + "reports": { + "2p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.51875, + "truncated": 0, + "seconds": 24.309563777999756, + "inference_p95_ms": 0.35878399992270715, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4125, + 0.65 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.44375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.5625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.6875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.50625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.41875, + 0.59375 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.465625, + 0.5734375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + }, + "3p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.540625, + "truncated": 0, + "seconds": 29.545320103999984, + "inference_p95_ms": 0.40351899951929227, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.5918749999999969 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.35, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.425 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6208333333333333, + 0.7958333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.5916666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 0.6833333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.496875, + 0.584375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + }, + "4p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5640625, + "truncated": 0, + "seconds": 40.612363489, + "inference_p95_ms": 0.410395000005792, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.55 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4125, + 0.5625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.75, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6875, + 0.8125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5296875, + 0.6015625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + }, + "5p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.68375, + "truncated": 0, + "seconds": 46.29655926299999, + "inference_p95_ms": 0.41738100000543454, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.655, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.595, + 0.71 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.59, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.655 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.78, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.715, + 0.84 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.71, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.645, + 0.775 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6562187500000001, + 0.71375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + }, + "6p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.6192708333333333, + "truncated": 0, + "seconds": 53.33895381900001, + "inference_p95_ms": 0.4277235000024858, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5083333333333333, + 0.6666666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.5270833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.46875, + 0.5895833333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.6708333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.7375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6916666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.625, + 0.7541666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5765625, + 0.659375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + }, + "3p/a260": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "fea5656ea15ed8f6c8f363b90aa1f3205a3ef18a9e413496644982c528cb936d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.325, + "truncated": 0, + "seconds": 71.060341452, + "inference_p95_ms": 0.4107710000084807, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.25833333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.35833333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.2833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19166666666666668, + 0.375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.4166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.31666666666666665, + 0.5166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.3416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.425 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.275, + 0.375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + } + }, + "paired_against_geoleague_u9": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.51875, + "baseline_win_rate": 0.6046875, + "paired_delta": -0.0859375, + "paired_seed_bootstrap_95_interval": [ + -0.1640625, + -0.009375 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.540625, + "baseline_win_rate": 0.5395833333333333, + "paired_delta": 0.0010416666666666658, + "paired_seed_bootstrap_95_interval": [ + -0.055208333333333325, + 0.05833333333333335 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.5640625, + "baseline_win_rate": 0.52734375, + "paired_delta": 0.03671875, + "paired_seed_bootstrap_95_interval": [ + -0.008613281249999983, + 0.0828125 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.68375, + "baseline_win_rate": 0.62, + "paired_delta": 0.06375, + "paired_seed_bootstrap_95_interval": [ + 0.0225, + 0.10375000000000001 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.6192708333333333, + "baseline_win_rate": 0.5552083333333333, + "paired_delta": 0.0640625, + "paired_seed_bootstrap_95_interval": [ + 0.026041666666666664, + 0.10416666666666666 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.325, + "baseline_win_rate": 0.24375, + "paired_delta": 0.08125, + "paired_seed_bootstrap_95_interval": [ + 0.03125, + 0.13333333333333333 + ] + } + }, + "paired_against_h200_u19": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.51875, + "baseline_win_rate": 0.5359375, + "paired_delta": -0.0171875, + "paired_seed_bootstrap_95_interval": [ + -0.0859375, + 0.053125 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.540625, + "baseline_win_rate": 0.6020833333333333, + "paired_delta": -0.06145833333333334, + "paired_seed_bootstrap_95_interval": [ + -0.11041666666666665, + -0.0125 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.5640625, + "baseline_win_rate": 0.5359375, + "paired_delta": 0.028125, + "paired_seed_bootstrap_95_interval": [ + -0.0078125, + 0.065625 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.68375, + "baseline_win_rate": 0.676875, + "paired_delta": 0.006875000000000001, + "paired_seed_bootstrap_95_interval": [ + -0.0375, + 0.049999999999999996 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.6192708333333333, + "baseline_win_rate": 0.6119791666666666, + "paired_delta": 0.007291666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.034895833333333334, + 0.04895833333333334 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.325, + "baseline_win_rate": 0.32083333333333336, + "paired_delta": 0.004166666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.03749999999999999, + 0.04583333333333333 + ] + } + }, + "decision": "Continue training without promotion. Update19 improves over geoleague update9 at 5-6 players and against A260 with positive paired 95% intervals, but 2-player economic performance regresses. A260 32.5% remains below equal-share reference; no supported A260 difference versus H200 update19. H200 update19 is stronger in the paired 3-player economic screen. Retain earlier candidates; await stronger-teacher replay training." } } From b7346c47c0177a923f47da154878a66752749b3b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:46:43 +0200 Subject: [PATCH 102/184] Audit complete five-player stronger-opponent teacher data --- ai/strong/experiments.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e61e0c3..53a7b77 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8435,6 +8435,26 @@ "games_per_cell": 15, "validation_games": 48, "training_games": 192 + }, + "5": { + "revision": "07541431146ccf6c4a8c5beabeb6f68e262d61ac", + "version": "multiplayer-teacher-v2-strong", + "shard": 3, + "player_count": 5, + "validated": true, + "counts": { + "games": 240, + "positions": 25986, + "truncated": 0, + "teacher_rollouts": 3030432, + "teacher_truncated": 0, + "opponent_rollouts": 3935536, + "opponent_truncated": 0 + }, + "seat_rule_cells": 20, + "games_per_cell": 12, + "validation_games": 40, + "training_games": 200 } } }, From 1f992aff86b8f6c44d3af046b1974d019080f9aa Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:47:44 +0200 Subject: [PATCH 103/184] Verify four corrected six-player shards and paired horizon outcomes --- ai/strong/experiments.json | 299 +++++++++++++++++++++++++++++++++++++ 1 file changed, 299 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 53a7b77..63777db 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10423,7 +10423,306 @@ } }, "artifact_revision": "623112c50b1ffbee048bfbc2c2bdc129466ff11b" + }, + "0": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.3125, + "truncated": 0, + "seconds": 3276.0083014929987, + "inference_p95_ms": 1.2128174492318065, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4583333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.5833333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.25, + 0.375 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23021, + "evaluations": 1875072, + "truncated": 0 + }, + "learner": { + "decisions": 4693, + "evaluations": 1158720, + "truncated": 0 + } + }, + "artifact_revision": "4482c603737480b2b7b924b602294d230eca5d11" + }, + "4": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 4, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.2604166666666667, + "truncated": 0, + "seconds": 3368.242662259, + "inference_p95_ms": 1.238425600240589, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.5 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.16666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.4583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.4166666666666667 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.3541666666666667 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23178, + "evaluations": 1880576, + "truncated": 0 + }, + "learner": { + "decisions": 4750, + "evaluations": 1168560, + "truncated": 0 + } + }, + "artifact_revision": "4482c603737480b2b7b924b602294d230eca5d11" + }, + "12": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 12, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.2708333333333333, + "truncated": 0, + "seconds": 3302.231581799, + "inference_p95_ms": 1.238493600271795, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.125, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.16666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5833333333333334 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.19791666666666666, + 0.34375 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23175, + "evaluations": 1883072, + "truncated": 0 + }, + "learner": { + "decisions": 4547, + "evaluations": 1117824, + "truncated": 0 + } + }, + "artifact_revision": "4482c603737480b2b7b924b602294d230eca5d11" } + }, + "old_horizon_paired_comparison": { + "paired_games": 192, + "compared_fields": [ + "value", + "win", + "final", + "steps", + "policyMoves", + "roles", + "truncated" + ], + "changed_games": [], + "scope": "First eight development deals only; search counts excluded because the extended horizon removes the known capped rollout" } }, "multiplayer_h200_update19_screening": { From b8eef051fdd5beeeb2bbb592c2695af361932a85 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:49:24 +0200 Subject: [PATCH 104/184] Record fifth clean corrected six-player evaluation shard --- ai/strong/experiments.json | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 63777db..33f3aa3 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10708,6 +10708,101 @@ } }, "artifact_revision": "4482c603737480b2b7b924b602294d230eca5d11" + }, + "16": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 16, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.21875, + "truncated": 0, + "seconds": 3270.226287285, + "inference_p95_ms": 1.1906413000815521, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.3333333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.16666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.3333333333333333 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.3229166666666667 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23167, + "evaluations": 1881136, + "truncated": 0 + }, + "learner": { + "decisions": 4619, + "evaluations": 1130160, + "truncated": 0 + } + }, + "artifact_revision": "4b33148d3d1c97651faea14887d4634f2d1fd9bf" } }, "old_horizon_paired_comparison": { From 534777795e717415eae44f9a01ce1bd83b3aba00 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:49:42 +0200 Subject: [PATCH 105/184] Record sixth clean corrected six-player evaluation shard --- ai/strong/experiments.json | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 33f3aa3..0346b44 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -10803,6 +10803,101 @@ } }, "artifact_revision": "4b33148d3d1c97651faea14887d4634f2d1fd9bf" + }, + "28": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 28, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.2604166666666667, + "truncated": 0, + "seconds": 3342.786648026, + "inference_p95_ms": 1.3454255501301304, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.16666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.2916666666666667 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3645833333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "learner": { + "decisions": 4646, + "evaluations": 1139328, + "truncated": 0 + }, + "search_geo": { + "decisions": 23157, + "evaluations": 1887152, + "truncated": 0 + } + }, + "artifact_revision": "0f2629f492c183dee3205330c0e675b80c5fab9c" } }, "old_horizon_paired_comparison": { From 5b7fc22e9c2699753ccf7a4f90e9e069d24ce6ee Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 00:51:05 +0200 Subject: [PATCH 106/184] Complete corrected six-player strong search screen with rule-specific limitations --- ai/strong/experiments.json | 582 ++++++++++++++++++++++++++++++++++++- 1 file changed, 581 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 0346b44..f6c725d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8262,6 +8262,106 @@ } ], "artifact_revision": "483011cc02a9b6679fd9dcf905cccef19f39495e" + }, + "6p/search_geo_h2400_40deals": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "player_count": 6, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-4/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-8/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-12/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-16/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-20/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-24/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-28/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-32/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-36/evaluation.json" + ], + "games": 960, + "independent_seeds": 40, + "win_rate": 0.26145833333333335, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.23539062500000002, + 0.2875 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 231639, + "evaluations": 18817520, + "truncated": 0 + }, + "learner": { + "decisions": 46645, + "evaluations": 11444880, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.26666666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.325 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.20416666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1625, + 0.25 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.30833333333333335, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.3625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.26666666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.21666666666666667, + 0.31666666666666665 + ] + } + ], + "decision": "Clean development evidence of overall advantage: 26.1458% win credit, seed-cluster 95% CI [23.5391%,28.75%], above 16.6667% equal-share reference. Not qualification: original/sealed 20.4167% is below the 25% six-player search floor and its CI [16.25%,25%] includes equal share. Candidate uses 48 rollouts per proposal versus opponent 16; strength cannot be attributed to the neural model alone. Retain as search baseline while stronger-teacher replay and continued training target weaknesses. Reserved final seeds remain untouched.", + "qualification_eligible": false } }, "strong_opponent_teacher_pilot": { @@ -10898,6 +10998,386 @@ } }, "artifact_revision": "0f2629f492c183dee3205330c0e675b80c5fab9c" + }, + "20": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 20, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.23958333333333334, + "truncated": 0, + "seconds": 3428.3679141330003, + "inference_p95_ms": 1.2901237002324704, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.125, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.25 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3333333333333333 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.2916666666666667 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23460, + "evaluations": 1904000, + "truncated": 0 + }, + "learner": { + "decisions": 4842, + "evaluations": 1183872, + "truncated": 0 + } + }, + "artifact_revision": "94059aac88cea216d4cbdb77620957e3188686f6" + }, + "24": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 24, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.25, + "truncated": 0, + "seconds": 3414.942271431, + "inference_p95_ms": 1.324112449950121, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.4166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.16666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.4166666666666667 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.3125 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23584, + "evaluations": 1913472, + "truncated": 0 + }, + "learner": { + "decisions": 4842, + "evaluations": 1189536, + "truncated": 0 + } + }, + "artifact_revision": "94059aac88cea216d4cbdb77620957e3188686f6" + }, + "36": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 36, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.2916666666666667, + "truncated": 0, + "seconds": 3415.423094224, + "inference_p95_ms": 1.6827438002337656, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.4166666666666667, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.5833333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.3333333333333333, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.4583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.2916666666666667 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.23958333333333334, + 0.3333333333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 23266, + "evaluations": 1894576, + "truncated": 0 + }, + "learner": { + "decisions": 4574, + "evaluations": 1121856, + "truncated": 0 + } + }, + "artifact_revision": "94059aac88cea216d4cbdb77620957e3188686f6" + }, + "32": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 32, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": true, + "candidate_search_model_proposal": true, + "seed": "multiplayer-search-strong-probe-v1-6p", + "games": 96, + "win_rate": 0.2604166666666667, + "truncated": 0, + "seconds": 3451.716084908, + "inference_p95_ms": 1.2017729999740823, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.16666666666666666, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.375, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.25, + "independent_seeds": 4, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.4166666666666667 + ] + } + ], + "independent_seeds": 4, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.3333333333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 22813, + "evaluations": 1846512, + "truncated": 0 + }, + "learner": { + "decisions": 4639, + "evaluations": 1136976, + "truncated": 0 + } + }, + "artifact_revision": "609b76d7805e2918deeb1aefdbef4aef586836ca" } }, "old_horizon_paired_comparison": { @@ -10913,7 +11393,107 @@ ], "changed_games": [], "scope": "First eight development deals only; search counts excluded because the extended horizon removes the known capped rollout" - } + }, + "status": "COMPLETED", + "combined_report": { + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 48, + "candidate_geographic_search": true, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "player_count": 6, + "candidate_search_model_proposal": true, + "sources": [ + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-0/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-4/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-8/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-12/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-16/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-20/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-24/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-28/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-32/evaluation.json", + "ai/runs/strong-probes/runs/multiplayer-hard-e10-search48-h2400-search_geo-6p-36/evaluation.json" + ], + "games": 960, + "independent_seeds": 40, + "win_rate": 0.26145833333333335, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.23539062500000002, + 0.2875 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 231639, + "evaluations": 18817520, + "truncated": 0 + }, + "learner": { + "decisions": 46645, + "evaluations": 11444880, + "truncated": 0 + } + }, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.26666666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.325 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.20416666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1625, + 0.25 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.30833333333333335, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.3625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "independent_seeds": 40, + "win_rate": 0.26666666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.21666666666666667, + 0.31666666666666665 + ] + } + ] + }, + "decision": "Clean development evidence of overall advantage: 26.1458% win credit, seed-cluster 95% CI [23.5391%,28.75%], above 16.6667% equal-share reference. Not qualification: original/sealed 20.4167% is below the 25% six-player search floor and its CI [16.25%,25%] includes equal share. Candidate uses 48 rollouts per proposal versus opponent 16; strength cannot be attributed to the neural model alone. Retain as search baseline while stronger-teacher replay and continued training target weaknesses. Reserved final seeds remain untouched." }, "multiplayer_h200_update19_screening": { "candidate_revision": "849cea0ecdd648946529d7c4b2769011317d280d", From 474cbd0997dcdd2824c8f085caad544c092ea035 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:21:49 +0200 Subject: [PATCH 107/184] Launch capped teacher-game repair and verified H200 update29 screening --- ai/strong/experiments.json | 103 ++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index f6c725d..8f61469 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -8556,6 +8556,37 @@ "validation_games": 40, "training_games": 200 } + }, + "six_player_pre_repair_audit": { + "revision": "23d31daa1e6d09f93d1f4d151184c8ed514fe482", + "version": "multiplayer-teacher-v2-strong", + "shard": 4, + "player_count": 6, + "validated": false, + "counts": { + "games": 240, + "positions": 23672, + "truncated": 0, + "teacher_rollouts": 2891760, + "teacher_truncated": 2, + "opponent_rollouts": 4725360, + "opponent_truncated": 0 + }, + "capped_games": [ + { + "id": 1051, + "seed": "multiplayer-teacher-v2-strong-6p-1051", + "teacher_truncated": 1, + "opponent_truncated": 0 + }, + { + "id": 1055, + "seed": "multiplayer-teacher-v2-strong-6p-1055", + "teacher_truncated": 1, + "opponent_truncated": 0 + } + ], + "decision": "Original data excluded from training pending selective full-game regeneration and full dataset audit" } }, "strong_teacher_replay_preparation": { @@ -12205,7 +12236,7 @@ "decision": "Continue H200 training: update19 improves over update9 against economic opponents at 3-6 players and frozen A260 at 3 players with paired intervals above zero. A260 win credit 32.0833% remains below 33.3333% equal-share point reference and is not qualification. Two-player economic performance regresses versus geoleague update9 (paired -6.875pp, CI [-13.28125,-0.78125]); retain earlier candidates." }, "strong_teacher_selective_repair": { - "status": "PREPARED_NOT_LAUNCHED", + "status": "LAUNCHED", "reason": "Six-player original teacher job reports two capped teacher rollouts at 110 games. Original job remains running; repair must wait for all five complete shards and pin their immutable input revision.", "source": { "archive": "strong-source-v33.tgz", @@ -12218,7 +12249,9 @@ }, "launcher": "ai/strong/launch-teacher-repair.sh", "output_version": "multiplayer-teacher-v2-strong-repaired", - "policy": "Preserve clean games; replay only affected full games at 2400-step search horizon using original IDs/seeds. Keep originals untouched and record original capped counts. Require full strict audit before GPU training." + "policy": "Preserve clean games; replay only affected full games at 2400-step search horizon using original IDs/seeds. Keep originals untouched and record original capped counts. Require full strict audit before GPU training.", + "job_id": "6abd994c404719ba37614c46", + "input_revision": "23d31daa1e6d09f93d1f4d151184c8ed514fe482" }, "multiplayer_geoleague_update19_screening": { "candidate_revision": "dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b", @@ -12928,5 +12961,71 @@ } }, "decision": "Continue training without promotion. Update19 improves over geoleague update9 at 5-6 players and against A260 with positive paired 95% intervals, but 2-player economic performance regresses. A260 32.5% remains below equal-share reference; no supported A260 difference versus H200 update19. H200 update19 is stronger in the paired 3-player economic screen. Retain earlier candidates; await stronger-teacher replay training." + }, + "multiplayer_h200_update29_screening": { + "candidate_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "training_games": 7200, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 2.4437904357910156e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-h200-u29-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abd9984404719ba37614c55" + }, + { + "run": "multiplayer-h200-u29-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abd9985fbc85ba68235d785" + }, + { + "run": "multiplayer-h200-u29-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abd9986fbc85ba68235d787" + }, + { + "run": "multiplayer-h200-u29-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abd9986404719ba37614c57" + }, + { + "run": "multiplayer-h200-u29-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abd9987fbc85ba68235d789" + }, + { + "run": "multiplayer-h200-u29-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abd9988404719ba37614c59" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0 } } From b7f4c6ac126a1405893aae21213ebbb9623b0d82 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:24:08 +0200 Subject: [PATCH 108/184] Record H200 update29 two-player paired screen --- ai/strong/experiments.json | 114 ++++++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 8f61469..5aae844 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -13026,6 +13026,118 @@ "status": "RUNNING", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", - "search_samples": 0 + "search_samples": 0, + "reports": { + "2p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.534375, + "truncated": 0, + "seconds": 23.939575663767755, + "inference_p95_ms": 0.3592967987060547, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.6875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.5875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.475, + 0.59375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "c7b447d3f606afbfbb129034e7c4cc59dcbdacc6" + } + }, + "paired_against_h200_u19": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.534375, + "baseline_win_rate": 0.5359375, + "paired_delta": -0.0015625, + "paired_seed_bootstrap_95_interval": [ + -0.06875, + 0.0671875 + ] + } + }, + "paired_against_geoleague_u19": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.534375, + "baseline_win_rate": 0.51875, + "paired_delta": 0.015625, + "paired_seed_bootstrap_95_interval": [ + -0.059375, + 0.0921875 + ] + } + } } } From 4ebefda6a2b4737c6b9cd1795bb1bc575e656a9e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:25:51 +0200 Subject: [PATCH 109/184] Record H200 update29 three-player paired economic screen --- ai/strong/experiments.json | 106 +++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 5aae844..12c2174 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -13111,6 +13111,90 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "c7b447d3f606afbfbb129034e7c4cc59dcbdacc6" + }, + "3p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.603125, + "truncated": 0, + "seconds": 29.620783384999996, + "inference_p95_ms": 0.4010227999970081, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4708333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.5625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.5166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44166666666666665, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6833333333333333, + 0.825 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5833333333333334, + 0.75 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5666666666666667, + 0.6385416666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "ed5abbc6f0d542fef59e7627f1a8166b2b557c3b" } }, "paired_against_h200_u19": { @@ -13124,6 +13208,17 @@ -0.06875, 0.0671875 ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.603125, + "baseline_win_rate": 0.6020833333333333, + "paired_delta": 0.001041666666666663, + "paired_seed_bootstrap_95_interval": [ + -0.04791666666666667, + 0.04895833333333334 + ] } }, "paired_against_geoleague_u19": { @@ -13137,6 +13232,17 @@ -0.059375, 0.0921875 ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.603125, + "baseline_win_rate": 0.540625, + "paired_delta": 0.0625, + "paired_seed_bootstrap_95_interval": [ + 0.017708333333333333, + 0.10833333333333335 + ] } } } From 9836ed887c37c4726e2aee7a3ecbfd701d5202da Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:26:30 +0200 Subject: [PATCH 110/184] Complete H200 update29 screening with supported five- and six-player gains --- ai/strong/experiments.json | 429 ++++++++++++++++++++++++++++++++++++- 1 file changed, 427 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 12c2174..9e9e5e8 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -13023,7 +13023,7 @@ "job_id": "6abd9988404719ba37614c59" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, @@ -13195,6 +13195,342 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "ed5abbc6f0d542fef59e7627f1a8166b2b557c3b" + }, + "4p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5640625, + "truncated": 0, + "seconds": 40.12652156799999, + "inference_p95_ms": 0.4124270000005474, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.39375, + 0.5625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.440625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35625, + 0.525 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.734375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6625, + 0.80625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.60625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.51875, + 0.69375 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.51328125, + 0.61328125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "528d9aff00586c748ac51c73e881bb526b674f2d" + }, + "5p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.763125, + "truncated": 0, + "seconds": 45.120892788999996, + "inference_p95_ms": 0.4177499999968859, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.745, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.69, + 0.8 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.705, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.64, + 0.77 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.8075, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.755, + 0.8575624999999991 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.795, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7325, + 0.855 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.73, + 0.795625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "528d9aff00586c748ac51c73e881bb526b674f2d" + }, + "6p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.6822916666666666, + "truncated": 0, + "seconds": 52.321573954, + "inference_p95_ms": 0.4230522000028713, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.6083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55, + 0.6666666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5958333333333333, + 0.7208333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.75, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6916666666666667, + 0.8083333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.7125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6625, + 0.7625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6479166666666667, + 0.7177083333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "528d9aff00586c748ac51c73e881bb526b674f2d" + }, + "3p/a260": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.35520833333333335, + "truncated": 0, + "seconds": 69.998844192, + "inference_p95_ms": 0.3998370000005025, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2833333333333333, + 0.4666666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.29583333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.225, + 0.37083333333333335 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.4166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.5083333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.3333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.4166666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.3145833333333333, + 0.4010416666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "528d9aff00586c748ac51c73e881bb526b674f2d" } }, "paired_against_h200_u19": { @@ -13219,6 +13555,50 @@ -0.04791666666666667, 0.04895833333333334 ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.5640625, + "baseline_win_rate": 0.5359375, + "paired_delta": 0.028125, + "paired_seed_bootstrap_95_interval": [ + -0.02890625, + 0.084375 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.763125, + "baseline_win_rate": 0.676875, + "paired_delta": 0.08625000000000001, + "paired_seed_bootstrap_95_interval": [ + 0.041874999999999996, + 0.13 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.6822916666666666, + "baseline_win_rate": 0.6119791666666666, + "paired_delta": 0.0703125, + "paired_seed_bootstrap_95_interval": [ + 0.0328125, + 0.10677083333333334 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.35520833333333335, + "baseline_win_rate": 0.32083333333333336, + "paired_delta": 0.034375, + "paired_seed_bootstrap_95_interval": [ + -0.014583333333333328, + 0.08127604166666441 + ] } }, "paired_against_geoleague_u19": { @@ -13243,7 +13623,52 @@ 0.017708333333333333, 0.10833333333333335 ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.5640625, + "baseline_win_rate": 0.5640625, + "paired_delta": 0.0, + "paired_seed_bootstrap_95_interval": [ + -0.053125, + 0.05234375 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.763125, + "baseline_win_rate": 0.68375, + "paired_delta": 0.079375, + "paired_seed_bootstrap_95_interval": [ + 0.036875, + 0.12125 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.6822916666666666, + "baseline_win_rate": 0.6192708333333333, + "paired_delta": 0.06302083333333333, + "paired_seed_bootstrap_95_interval": [ + 0.018229166666666664, + 0.10729166666666665 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.35520833333333335, + "baseline_win_rate": 0.325, + "paired_delta": 0.03020833333333333, + "paired_seed_bootstrap_95_interval": [ + -0.029166666666666664, + 0.08854166666666667 + ] } - } + }, + "decision": "Continue H200 training without promotion: five- and six-player economic gains versus both update19 runs have positive paired 95% intervals. Two-, three-, and four-player economic changes versus H200 update19 remain uncertain. Frozen A260 reaches 35.5208% win credit but the gain over either update19 run is uncertain and remains below the 40% qualification floor. Await stronger teacher replay to address persistent weaknesses; reserved final seeds untouched." } } From 2789dfc971ad64d166325f33f613b7cf40ae4f18 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:34:46 +0200 Subject: [PATCH 111/184] Audit all repaired teacher data and launch HF replay distillation pilot --- ai/strong/experiments.json | 238 ++++++++++++++++++++++++++++++++++++- 1 file changed, 236 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 9e9e5e8..00e09f1 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -12236,7 +12236,7 @@ "decision": "Continue H200 training: update19 improves over update9 against economic opponents at 3-6 players and frozen A260 at 3 players with paired intervals above zero. A260 win credit 32.0833% remains below 33.3333% equal-share point reference and is not qualification. Two-player economic performance regresses versus geoleague update9 (paired -6.875pp, CI [-13.28125,-0.78125]); retain earlier candidates." }, "strong_teacher_selective_repair": { - "status": "LAUNCHED", + "status": "COMPLETED_AUDITED", "reason": "Six-player original teacher job reports two capped teacher rollouts at 110 games. Original job remains running; repair must wait for all five complete shards and pin their immutable input revision.", "source": { "archive": "strong-source-v33.tgz", @@ -12251,7 +12251,231 @@ "output_version": "multiplayer-teacher-v2-strong-repaired", "policy": "Preserve clean games; replay only affected full games at 2400-step search horizon using original IDs/seeds. Keep originals untouched and record original capped counts. Require full strict audit before GPU training.", "job_id": "6abd994c404719ba37614c46", - "input_revision": "23d31daa1e6d09f93d1f4d151184c8ed514fe482" + "input_revision": "23d31daa1e6d09f93d1f4d151184c8ed514fe482", + "artifact_revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", + "manifest": { + "input_revision": "23d31daa1e6d09f93d1f4d151184c8ed514fe482", + "input_version": "multiplayer-teacher-v2-strong", + "output_version": "multiplayer-teacher-v2-strong-repaired", + "repaired_search_max_steps": 2400, + "shards": [ + { + "shard": 0, + "player_count": 2, + "games": 240, + "preserved_games": 240, + "regenerated_games": 0, + "positions": 38427, + "original_capped_games": [] + }, + { + "shard": 1, + "player_count": 3, + "games": 240, + "preserved_games": 240, + "regenerated_games": 0, + "positions": 30652, + "original_capped_games": [] + }, + { + "shard": 2, + "player_count": 4, + "games": 240, + "preserved_games": 240, + "regenerated_games": 0, + "positions": 30612, + "original_capped_games": [] + }, + { + "shard": 3, + "player_count": 5, + "games": 240, + "preserved_games": 240, + "regenerated_games": 0, + "positions": 25986, + "original_capped_games": [] + }, + { + "shard": 4, + "player_count": 6, + "games": 240, + "preserved_games": 238, + "regenerated_games": 2, + "positions": 23674, + "original_capped_games": [ + { + "id": 1051, + "seed": "multiplayer-teacher-v2-strong-6p-1051", + "truncated": false, + "searchStats": { + "decisions": 51, + "evaluations": 12624, + "truncated": 1 + }, + "opponentSearchStats": { + "decisions": 247, + "evaluations": 19824, + "truncated": 0 + } + }, + { + "id": 1055, + "seed": "multiplayer-teacher-v2-strong-6p-1055", + "truncated": false, + "searchStats": { + "decisions": 66, + "evaluations": 16560, + "truncated": 1 + }, + "opponentSearchStats": { + "decisions": 249, + "evaluations": 19600, + "truncated": 0 + } + } + ] + } + ] + }, + "audit": { + "revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", + "version": "multiplayer-teacher-v2-strong-repaired", + "counts": { + "2": { + "games": 240, + "positions": 38427, + "truncated": 0, + "search_rollouts": 3225936, + "search_rollouts_truncated": 0, + "opponent_search_rollouts": 1039136, + "opponent_search_rollouts_truncated": 0, + "teacher_win_credit": 151.0, + "disagreements": 7175, + "seat_rule_cells": 8, + "phases": { + "Auction": 8829, + "Resources": 15338, + "Building": 6240, + "Bureaucracy": 8020 + }, + "opponents": { + "search_geo": { + "games": 240, + "win_credit": 151.0 + } + }, + "validation_games": 48, + "training_games": 192 + }, + "3": { + "games": 240, + "positions": 30652, + "truncated": 0, + "search_rollouts": 3052992, + "search_rollouts_truncated": 0, + "opponent_search_rollouts": 2018512, + "opponent_search_rollouts_truncated": 0, + "teacher_win_credit": 94.0, + "disagreements": 6264, + "seat_rule_cells": 12, + "phases": { + "Auction": 9030, + "Resources": 11337, + "Building": 4710, + "Bureaucracy": 5575 + }, + "opponents": { + "search_geo": { + "games": 240, + "win_credit": 94.0 + } + }, + "validation_games": 48, + "training_games": 192 + }, + "4": { + "games": 240, + "positions": 30612, + "truncated": 0, + "search_rollouts": 3306336, + "search_rollouts_truncated": 0, + "opponent_search_rollouts": 3184272, + "opponent_search_rollouts_truncated": 0, + "teacher_win_credit": 82.0, + "disagreements": 6381, + "seat_rule_cells": 16, + "phases": { + "Auction": 9968, + "Resources": 10880, + "Building": 4522, + "Bureaucracy": 5242 + }, + "opponents": { + "search_geo": { + "games": 240, + "win_credit": 82.0 + } + }, + "validation_games": 48, + "training_games": 192 + }, + "5": { + "games": 240, + "positions": 25986, + "truncated": 0, + "search_rollouts": 3030432, + "search_rollouts_truncated": 0, + "opponent_search_rollouts": 3935536, + "opponent_search_rollouts_truncated": 0, + "teacher_win_credit": 68.0, + "disagreements": 5089, + "seat_rule_cells": 20, + "phases": { + "Auction": 9351, + "Resources": 8741, + "Building": 3721, + "Bureaucracy": 4173 + }, + "opponents": { + "search_geo": { + "games": 240, + "win_credit": 68.0 + } + }, + "validation_games": 40, + "training_games": 200 + }, + "6": { + "games": 240, + "positions": 23674, + "truncated": 0, + "search_rollouts": 2891760, + "search_rollouts_truncated": 0, + "opponent_search_rollouts": 4725360, + "opponent_search_rollouts_truncated": 0, + "teacher_win_credit": 77.0, + "disagreements": 4605, + "seat_rule_cells": 24, + "phases": { + "Auction": 9211, + "Resources": 7647, + "Building": 3218, + "Bureaucracy": 3598 + }, + "opponents": { + "search_geo": { + "games": 240, + "win_credit": 77.0 + } + }, + "validation_games": 48, + "training_games": 192 + } + }, + "unique_games": 1200, + "validated": true, + "scope": "Teacher-generated development data; not held-out strength evidence" + } }, "multiplayer_geoleague_update19_screening": { "candidate_revision": "dd5fbfee60e7f0b5e20f09675601aeaa7ad8691b", @@ -13670,5 +13894,15 @@ } }, "decision": "Continue H200 training without promotion: five- and six-player economic gains versus both update19 runs have positive paired 95% intervals. Two-, three-, and four-player economic changes versus H200 update19 remain uncertain. Frozen A260 reaches 35.5208% win credit but the gain over either update19 run is uncertain and remains below the 40% qualification floor. Await stronger teacher replay to address persistent weaknesses; reserved final seeds untouched." + }, + "strong_teacher_replay_pilot": { + "status": "LAUNCHED", + "job_id": "6abd9c96404719ba37614cb6", + "run": "multiplayer-distillation-strong-replay-pilot-v1-hard", + "epochs": 1, + "data_revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", + "data_version": "multiplayer-teacher-v2-strong-repaired", + "source_revision": "508bc42027cae5bfeea01228b48069c8287b332a", + "purpose": "HF-only end-to-end replay distillation validation before full training; not strength evidence" } } From 2cbc77fa3d26cac07fffde42fdcdcd83eaadee00 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:41:12 +0200 Subject: [PATCH 112/184] Validate replay training pilot and launch full fifteen-epoch HF run --- ai/strong/experiments.json | 58 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 00e09f1..ac817de 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -13896,13 +13896,67 @@ "decision": "Continue H200 training without promotion: five- and six-player economic gains versus both update19 runs have positive paired 95% intervals. Two-, three-, and four-player economic changes versus H200 update19 remain uncertain. Frozen A260 reaches 35.5208% win credit but the gain over either update19 run is uncertain and remains below the 40% qualification floor. Await stronger teacher replay to address persistent weaknesses; reserved final seeds untouched." }, "strong_teacher_replay_pilot": { - "status": "LAUNCHED", + "status": "COMPLETED_PIPELINE_VALIDATED", "job_id": "6abd9c96404719ba37614cb6", "run": "multiplayer-distillation-strong-replay-pilot-v1-hard", "epochs": 1, "data_revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", "data_version": "multiplayer-teacher-v2-strong-repaired", "source_revision": "508bc42027cae5bfeea01228b48069c8287b332a", - "purpose": "HF-only end-to-end replay distillation validation before full training; not strength evidence" + "purpose": "HF-only end-to-end replay distillation validation before full training; not strength evidence", + "artifact_revision": "cf930c2b43252aecb998e57a9cdcc0e62b447604", + "epoch1_log": { + "epoch": 1, + "loss": 0.8447044598551449, + "validation": { + "positions": 56534, + "by_player_count": { + "2": { + "positions": 15041, + "correct": 11674, + "disagreements": 2401, + "disagreement_correct": 452 + }, + "3": { + "positions": 12140, + "correct": 9614, + "disagreements": 2146, + "disagreement_correct": 445 + }, + "4": { + "positions": 11875, + "correct": 9300, + "disagreements": 2169, + "disagreement_correct": 434 + }, + "5": { + "positions": 8296, + "correct": 6601, + "disagreements": 1407, + "disagreement_correct": 257 + }, + "6": { + "positions": 9182, + "correct": 7279, + "disagreements": 1559, + "disagreement_correct": 326 + } + }, + "accuracy": 0.7865709130788552, + "search_disagreements": 9682, + "disagreement_accuracy": 0.19768642842387937 + } + }, + "export_limit": "Uploaded artifacts are epoch0 because export cadence is five epochs. Epoch1 training and validation confirmed by terminal logs; no trained pilot export or strength claim." + }, + "strong_teacher_replay_full": { + "status": "LAUNCHED", + "job_id": "6abd9e17404719ba37614ceb", + "run": "multiplayer-distillation-strong-replay-v1-hard", + "epochs": 15, + "data_revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", + "source_revision": "508bc42027cae5bfeea01228b48069c8287b332a", + "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "scope": "HF GPU replay distillation; evaluate trained exports independently before promotion" } } From b10fda5e2b1e857631530ae188bd48442baf961b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:48:48 +0200 Subject: [PATCH 113/184] Diagnose replay epoch5 numeric export discrepancy across all fixtures --- ai/strong/experiments.json | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ac817de..5b9ad3e 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -13958,5 +13958,66 @@ "source_revision": "508bc42027cae5bfeea01228b48069c8287b332a", "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", "scope": "HF GPU replay distillation; evaluate trained exports independently before promotion" + }, + "strong_teacher_replay_epoch5_export_diagnostic": { + "status": "STRICT_NUMERIC_PARITY_FAILED_ACTIONS_MATCH", + "checkpoint": { + "revision": "7b5d9573b692a76de8c3a524db1dc194107311bc", + "run": "multiplayer-distillation-strong-replay-v1-hard", + "epoch": 5, + "hashes": { + "best.pt": "752d16ef176e122d9dcff86b436477b1321174b663fbd7a4cd0d57501e05a0be", + "best.onnx": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "latest.pt": "25580dd7db237fa68d955670f5c6c1b0f496cbe25c0c02f97d721ed223e4aa93", + "latest.onnx": "7684e4c6f7e36bdf93a1cdb2568c50f0ef8d10adb5a45649f8808617c5b25eb7", + "metrics.json": "c0dc58b781765161635030e3c73d57ce19f02492c8af0c75b0d21034ff1308bb", + "schema.json": "2e4de1e5f243e5b03f2035a8c166e2cd94d1ed0f2e74d3a905be6c909d8d297f" + } + }, + "default_runtime": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "7684e4c6f7e36bdf93a1cdb2568c50f0ef8d10adb5a45649f8808617c5b25eb7", + "max_logit_error": 4.1961669921875e-05, + "max_value_error": 1.9669532775878906e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "unoptimized_runtime": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "7684e4c6f7e36bdf93a1cdb2568c50f0ef8d10adb5a45649f8808617c5b25eb7", + "max_logit_error": 4.1961669921875e-05, + "max_value_error": 1.9669532775878906e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "decision": "One of 2553 positions exceeds existing near-zero logit tolerance (1.5258789e-5 at logit approximately 0.03033). All legal action selections match, values pass, inactive values remain zero. Disabling ONNX graph optimization does not change result. Do not mark strict parity passed; investigate numeric cancellation or re-export and retain independent validation before promotion." } } From c81fa1f9311213b46f1842e09919c02b96f09bb3 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:50:42 +0200 Subject: [PATCH 114/184] Diagnose epoch5 rounding and screen strictly verified replay epoch10 --- ai/strong/experiments.json | 110 ++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 5b9ad3e..226e676 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -14018,6 +14018,114 @@ ], "specialist_route_counts": {} }, - "decision": "One of 2553 positions exceeds existing near-zero logit tolerance (1.5258789e-5 at logit approximately 0.03033). All legal action selections match, values pass, inactive values remain zero. Disabling ONNX graph optimization does not change result. Do not mark strict parity passed; investigate numeric cancellation or re-export and retain independent validation before promotion." + "decision": "Strict check remains failed for epoch5. Double precision comparison isolates small ONNX float32 error (1.46118e-5 versus reference at the offending logit), with 0.77281 winning margin and all 2553 actions identical. Epoch10 passes unchanged strict verification; evaluate epoch10 rather than relax the gate.", + "double_precision_reference": { + "positions": 2553, + "reference_details": [ + { + "position": 2307, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 11 + ], + "torch32": 0.030332565307617188, + "onnx32": 0.030347824096679688, + "reference64": 0.030333212302579682 + } + ], + "torch_max_error": 3.5502267365927764e-06, + "onnx_max_error": 1.4611794100005682e-05, + "winning_margin": 0.7728108349122729 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "7684e4c6f7e36bdf93a1cdb2568c50f0ef8d10adb5a45649f8808617c5b25eb7", + "max_logit_error": 4.1961669921875e-05, + "max_value_error": 1.9669532775878906e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + } + }, + "strong_teacher_replay_epoch10_screening": { + "candidate_revision": "625bc9534ea0eb43ef1ac80116984267706b0839", + "model_path": "runs/multiplayer-distillation-strong-replay-v1-hard/latest.onnx", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "epoch": 10, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 2.3245811462402344e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-strong-replay-e10-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abda04b404719ba37614d6f" + }, + { + "run": "multiplayer-strong-replay-e10-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abda04c404719ba37614d71" + }, + { + "run": "multiplayer-strong-replay-e10-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abda04c404719ba37614d73" + }, + { + "run": "multiplayer-strong-replay-e10-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abda04dfbc85ba68235d964" + }, + { + "run": "multiplayer-strong-replay-e10-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abda04efbc85ba68235d966" + }, + { + "run": "multiplayer-strong-replay-e10-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abda04f404719ba37614d75" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0 } } From 33ff9c57327b420bedc8afb108b92cdb90b2e0de Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:52:13 +0200 Subject: [PATCH 115/184] Record completed replay training and final export diagnostics --- ai/strong/experiments.json | 319 ++++++++++++++++++++++++++++++++++++- 1 file changed, 317 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 226e676..ed66be1 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -13950,14 +13950,329 @@ "export_limit": "Uploaded artifacts are epoch0 because export cadence is five epochs. Epoch1 training and validation confirmed by terminal logs; no trained pilot export or strength claim." }, "strong_teacher_replay_full": { - "status": "LAUNCHED", + "status": "COMPLETED", "job_id": "6abd9e17404719ba37614ceb", "run": "multiplayer-distillation-strong-replay-v1-hard", "epochs": 15, "data_revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", "source_revision": "508bc42027cae5bfeea01228b48069c8287b332a", "initial_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", - "scope": "HF GPU replay distillation; evaluate trained exports independently before promotion" + "scope": "HF GPU replay distillation; evaluate trained exports independently before promotion", + "artifact_revision": "6d5ef1e77a625e4a9a7c0879ffd6a87b59a3f1ff", + "checkpoint": { + "revision": "6d5ef1e77a625e4a9a7c0879ffd6a87b59a3f1ff", + "run": "multiplayer-distillation-strong-replay-v1-hard", + "epoch": 15, + "hashes": { + "best.pt": "752d16ef176e122d9dcff86b436477b1321174b663fbd7a4cd0d57501e05a0be", + "best.onnx": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "latest.pt": "c8c3096579a5176f90e0f19d19f483b1175dd8f41eb0a5d11ca068f573aad4e4", + "latest.onnx": "4a67c37825e341decd63439696a5a6b38fd060460b8c7645dee536e0ac04b28d", + "metrics.json": "2b2eea14f85229e80f953e5e42a76fafc01f0c66187196ce83c043e44df6651d", + "schema.json": "2e4de1e5f243e5b03f2035a8c166e2cd94d1ed0f2e74d3a905be6c909d8d297f" + } + }, + "epoch15_export_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 2001, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 8 + ], + "torch32": -0.014599084854125977, + "onnx32": -0.014615535736083984, + "reference64": -0.014614426088039423 + } + ], + "torch_max_error": 1.861260965441147e-05, + "onnx_max_error": 1.6765666588369754e-06, + "winning_margin": 3.1218458110859757 + }, + { + "position": 2532, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 2 + ], + "torch32": -0.0024939775466918945, + "onnx32": -0.0025066137313842773, + "reference64": -0.002503839010303155 + } + ], + "torch_max_error": 1.2344153468291097e-05, + "onnx_max_error": 5.2437087401102644e-06, + "winning_margin": 12.292250344758877 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "4a67c37825e341decd63439696a5a6b38fd060460b8c7645dee536e0ac04b28d", + "max_logit_error": 6.103515625e-05, + "max_value_error": 3.159046173095703e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 2, + 0 + ], + "specialist_route_counts": {} + }, + "development_summaries": [ + { + "epoch": 0, + "loss": null, + "validation": { + "positions": 56534, + "by_player_count": { + "2": { + "positions": 15041, + "correct": 11825, + "disagreements": 2401, + "disagreement_correct": 333 + }, + "3": { + "positions": 12140, + "correct": 9686, + "disagreements": 2146, + "disagreement_correct": 290 + }, + "4": { + "positions": 11875, + "correct": 9363, + "disagreements": 2169, + "disagreement_correct": 296 + }, + "5": { + "positions": 8296, + "correct": 6629, + "disagreements": 1407, + "disagreement_correct": 194 + }, + "6": { + "positions": 9182, + "correct": 7323, + "disagreements": 1559, + "disagreement_correct": 246 + } + }, + "accuracy": 0.7929033855732833, + "search_disagreements": 9682, + "disagreement_accuracy": 0.1403635612476761 + }, + "arena_win_rates": { + "2p/economic": 0.4375, + "2p/heuristic": 0.6875, + "2p/rush": 0.375, + "3p/economic": 0.5833333333333334, + "3p/heuristic": 0.8333333333333334, + "3p/rush": 0.625, + "4p/economic": 0.53125, + "4p/heuristic": 0.84375, + "4p/rush": 0.59375, + "5p/economic": 0.325, + "5p/heuristic": 0.925, + "5p/rush": 0.55, + "6p/economic": 0.5416666666666666, + "6p/heuristic": 0.9791666666666666, + "6p/rush": 0.6875 + } + }, + { + "epoch": 5, + "loss": 0.7926541517663598, + "validation": { + "positions": 56534, + "by_player_count": { + "2": { + "positions": 15041, + "correct": 11632, + "disagreements": 2401, + "disagreement_correct": 475 + }, + "3": { + "positions": 12140, + "correct": 9659, + "disagreements": 2146, + "disagreement_correct": 502 + }, + "4": { + "positions": 11875, + "correct": 9350, + "disagreements": 2169, + "disagreement_correct": 482 + }, + "5": { + "positions": 8296, + "correct": 6608, + "disagreements": 1407, + "disagreement_correct": 265 + }, + "6": { + "positions": 9182, + "correct": 7294, + "disagreements": 1559, + "disagreement_correct": 328 + } + }, + "accuracy": 0.7878975483779672, + "search_disagreements": 9682, + "disagreement_accuracy": 0.21193968188390827 + }, + "arena_win_rates": { + "2p/economic": 0.25, + "2p/heuristic": 0.5625, + "2p/rush": 0.375, + "3p/economic": 0.4166666666666667, + "3p/heuristic": 0.625, + "3p/rush": 0.5, + "4p/economic": 0.4375, + "4p/heuristic": 0.71875, + "4p/rush": 0.46875, + "5p/economic": 0.375, + "5p/heuristic": 0.875, + "5p/rush": 0.45, + "6p/economic": 0.375, + "6p/heuristic": 0.8541666666666666, + "6p/rush": 0.3958333333333333 + } + }, + { + "epoch": 10, + "loss": 0.7537491543544103, + "validation": { + "positions": 56534, + "by_player_count": { + "2": { + "positions": 15041, + "correct": 11680, + "disagreements": 2401, + "disagreement_correct": 479 + }, + "3": { + "positions": 12140, + "correct": 9646, + "disagreements": 2146, + "disagreement_correct": 493 + }, + "4": { + "positions": 11875, + "correct": 9314, + "disagreements": 2169, + "disagreement_correct": 494 + }, + "5": { + "positions": 8296, + "correct": 6560, + "disagreements": 1407, + "disagreement_correct": 269 + }, + "6": { + "positions": 9182, + "correct": 7239, + "disagreements": 1559, + "disagreement_correct": 324 + } + }, + "accuracy": 0.7860579474298652, + "search_disagreements": 9682, + "disagreement_accuracy": 0.21266267300144598 + }, + "arena_win_rates": { + "2p/economic": 0.3125, + "2p/heuristic": 0.5625, + "2p/rush": 0.3125, + "3p/economic": 0.5, + "3p/heuristic": 0.75, + "3p/rush": 0.5416666666666666, + "4p/economic": 0.34375, + "4p/heuristic": 0.75, + "4p/rush": 0.3125, + "5p/economic": 0.55, + "5p/heuristic": 0.95, + "5p/rush": 0.55, + "6p/economic": 0.5208333333333334, + "6p/heuristic": 0.9375, + "6p/rush": 0.5625 + } + }, + { + "epoch": 15, + "loss": 0.7199630066509743, + "validation": { + "positions": 56534, + "by_player_count": { + "2": { + "positions": 15041, + "correct": 11624, + "disagreements": 2401, + "disagreement_correct": 509 + }, + "3": { + "positions": 12140, + "correct": 9657, + "disagreements": 2146, + "disagreement_correct": 507 + }, + "4": { + "positions": 11875, + "correct": 9326, + "disagreements": 2169, + "disagreement_correct": 460 + }, + "5": { + "positions": 8296, + "correct": 6594, + "disagreements": 1407, + "disagreement_correct": 268 + }, + "6": { + "positions": 9182, + "correct": 7241, + "disagreements": 1559, + "disagreement_correct": 297 + } + }, + "accuracy": 0.7861110128418297, + "search_disagreements": 9682, + "disagreement_accuracy": 0.21080355298492048 + }, + "arena_win_rates": { + "2p/economic": 0.375, + "2p/heuristic": 0.625, + "2p/rush": 0.3125, + "3p/economic": 0.4583333333333333, + "3p/heuristic": 0.6666666666666666, + "3p/rush": 0.5416666666666666, + "4p/economic": 0.5625, + "4p/heuristic": 0.8125, + "4p/rush": 0.375, + "5p/economic": 0.525, + "5p/heuristic": 0.975, + "5p/rush": 0.575, + "6p/economic": 0.4583333333333333, + "6p/heuristic": 0.9166666666666666, + "6p/rush": 0.5833333333333334 + } + } + ], + "decision": "Do not promote. Internal selection retains initial epoch0 model. Epoch10 passes strict export parity and independent 3680-game screen is active. Epoch15 strict parity fails at two near-zero logits although all 2553 actions match; float64 reference is closer to ONNX than Torch32 at both offending coordinates, consistent with rounding rather than semantic export mismatch. Keep strict failure recorded and assess independent play before choosing further training." }, "strong_teacher_replay_epoch5_export_diagnostic": { "status": "STRICT_NUMERIC_PARITY_FAILED_ACTIONS_MATCH", From e2d6d49ed1d793240d16fb271df7a5a10e2475a3 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:53:10 +0200 Subject: [PATCH 116/184] Record replay epoch10 two-player regression and three-player comparison --- ai/strong/experiments.json | 220 ++++++++++++++++++++++++++++++++++++- 1 file changed, 219 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ed66be1..e49da56 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -14441,6 +14441,224 @@ "status": "RUNNING", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", - "search_samples": 0 + "search_samples": 0, + "reports": { + "2p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/625bc9534ea0eb43ef1ac80116984267706b0839/runs/multiplayer-distillation-strong-replay-v1-hard/latest.onnx", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.375, + "truncated": 0, + "seconds": 23.228182377999985, + "inference_p95_ms": 0.3610580000099617, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2625, + 0.4875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.325, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.225, + 0.425 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.475 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.425, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.525 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.321875, + 0.425 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "09f7d37441004cd4e88e5e6f4515b4411823c538" + }, + "3p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/625bc9534ea0eb43ef1ac80116984267706b0839/runs/multiplayer-distillation-strong-replay-v1-hard/latest.onnx", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.4666666666666667, + "truncated": 0, + "seconds": 28.78093157708645, + "inference_p95_ms": 0.3752783406525849, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.35, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.44166666666666665 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.325, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.4083333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55, + 0.7333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.55, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4583333333333333, + 0.6416666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.41458333333333336, + 0.51875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "09f7d37441004cd4e88e5e6f4515b4411823c538" + } + }, + "paired_against_initial_teacher": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.375, + "baseline_win_rate": 0.5046875, + "paired_delta": -0.1296875, + "paired_seed_bootstrap_95_interval": [ + -0.2015625, + -0.059375 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.4666666666666667, + "baseline_win_rate": 0.5020833333333333, + "paired_delta": -0.035416666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.09374999999999999, + 0.020833333333333336 + ] + } + }, + "paired_against_h200_u29": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.375, + "baseline_win_rate": 0.534375, + "paired_delta": -0.159375, + "paired_seed_bootstrap_95_interval": [ + -0.225, + -0.09375 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.4666666666666667, + "baseline_win_rate": 0.603125, + "paired_delta": -0.13645833333333332, + "paired_seed_bootstrap_95_interval": [ + -0.19270833333333334, + -0.08229166666666667 + ] + } + } } } From 907ced895eb54bc00dcda88c7d1fca1c9b8bbb7d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:55:47 +0200 Subject: [PATCH 117/184] Reject regressed replay candidate and audit stronger teacher label ambiguity --- ai/strong/experiments.json | 495 ++++++++++++++++++++++++++++++++++++- 1 file changed, 493 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e49da56..bde90bd 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -14438,7 +14438,7 @@ "job_id": "6abda04f404719ba37614d75" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, @@ -14610,6 +14610,342 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "09f7d37441004cd4e88e5e6f4515b4411823c538" + }, + "4p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/625bc9534ea0eb43ef1ac80116984267706b0839/runs/multiplayer-distillation-strong-replay-v1-hard/latest.onnx", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.40625, + "truncated": 0, + "seconds": 38.377409142000005, + "inference_p95_ms": 0.38055090000312924, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.2125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.14375, + 0.2875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.30625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.24375, + 0.36875 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.5625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.46875, + 0.65625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.6125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.45 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0394602718e96b28f3deca5017d5ee7a0551660a" + }, + "5p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/625bc9534ea0eb43ef1ac80116984267706b0839/runs/multiplayer-distillation-strong-replay-v1-hard/latest.onnx", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.555, + "truncated": 0, + "seconds": 44.72134034499999, + "inference_p95_ms": 0.40256700000185186, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.46, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.385, + 0.54 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.505, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.645, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.585, + 0.71 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.61, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55, + 0.675 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.52375, + 0.5875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0394602718e96b28f3deca5017d5ee7a0551660a" + }, + "6p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/625bc9534ea0eb43ef1ac80116984267706b0839/runs/multiplayer-distillation-strong-replay-v1-hard/latest.onnx", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.45729166666666665, + "truncated": 0, + "seconds": 50.322491372, + "inference_p95_ms": 0.41335899999666026, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.39166666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.32916666666666666, + 0.45 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.3875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.31666666666666665, + 0.45416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.49166666666666664, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.5666666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.5583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.6291666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.4155989583333334, + 0.4979166666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0394602718e96b28f3deca5017d5ee7a0551660a" + }, + "3p/a260": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/625bc9534ea0eb43ef1ac80116984267706b0839/runs/multiplayer-distillation-strong-replay-v1-hard/latest.onnx", + "model_sha256": "7c6c365d438e9f7a7434657ca8ae0383bf220d3963958cdadfc65ba0f733cc4a", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.225, + "truncated": 0, + "seconds": 70.312288906, + "inference_p95_ms": 0.39679199999511633, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.20833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.2916666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.13333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.075, + 0.2 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.36666666666666664, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.45 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.19166666666666668, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.26666666666666666 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.2625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0394602718e96b28f3deca5017d5ee7a0551660a" } }, "paired_against_initial_teacher": { @@ -14634,6 +14970,50 @@ -0.09374999999999999, 0.020833333333333336 ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.40625, + "baseline_win_rate": 0.50390625, + "paired_delta": -0.09765625, + "paired_seed_bootstrap_95_interval": [ + -0.15859375, + -0.0359375 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.555, + "baseline_win_rate": 0.539375, + "paired_delta": 0.015625, + "paired_seed_bootstrap_95_interval": [ + -0.025, + 0.05874999999999999 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.45729166666666665, + "baseline_win_rate": 0.45416666666666666, + "paired_delta": 0.003125, + "paired_seed_bootstrap_95_interval": [ + -0.04010416666666666, + 0.0453125 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.225, + "baseline_win_rate": 0.19583333333333333, + "paired_delta": 0.029166666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.037552083333333305, + 0.09375 + ] } }, "paired_against_h200_u29": { @@ -14658,7 +15038,118 @@ -0.19270833333333334, -0.08229166666666667 ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.40625, + "baseline_win_rate": 0.5640625, + "paired_delta": -0.1578125, + "paired_seed_bootstrap_95_interval": [ + -0.21484375, + -0.1 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.555, + "baseline_win_rate": 0.763125, + "paired_delta": -0.20812499999999998, + "paired_seed_bootstrap_95_interval": [ + -0.24937499999999999, + -0.168125 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.45729166666666665, + "baseline_win_rate": 0.6822916666666666, + "paired_delta": -0.225, + "paired_seed_bootstrap_95_interval": [ + -0.26979166666666665, + -0.17708333333333334 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.225, + "baseline_win_rate": 0.35520833333333335, + "paired_delta": -0.13020833333333331, + "paired_seed_bootstrap_95_interval": [ + -0.18854166666666666, + -0.07395833333333333 + ] } - } + }, + "decision": "Reject candidate: supported paired regressions versus initial teacher at 2 and 4 players, no supported gain in remaining screens, and supported losses versus H200 update29 in all six screens. Full replay run complete; do not extend unchanged." + }, + "strong_teacher_replay_label_audit": { + "data_revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", + "counts": { + "2": { + "positions": 38427, + "searched": 13493, + "tied_top": 5244, + "all_equal": 1629, + "disagreements": 7175, + "tied_disagreements": 1532, + "gap_le_one_sample": 7749, + "median_best_second_gap": 0.02083333333333337, + "top_tie_fraction": 0.3886459645742237, + "tied_disagreement_fraction": 0.2135191637630662 + }, + "3": { + "positions": 30652, + "searched": 12568, + "tied_top": 5386, + "all_equal": 2413, + "disagreements": 6264, + "tied_disagreements": 1404, + "gap_le_one_sample": 7611, + "median_best_second_gap": 0.020833333333333315, + "top_tie_fraction": 0.4285486950986633, + "tied_disagreement_fraction": 0.22413793103448276 + }, + "4": { + "positions": 30612, + "searched": 13475, + "tied_top": 5909, + "all_equal": 3041, + "disagreements": 6381, + "tied_disagreements": 1219, + "gap_le_one_sample": 8291, + "median_best_second_gap": 0.020833333333333315, + "top_tie_fraction": 0.4385157699443414, + "tied_disagreement_fraction": 0.19103588779188216 + }, + "5": { + "positions": 25986, + "searched": 12307, + "tied_top": 5907, + "all_equal": 3652, + "disagreements": 5089, + "tied_disagreements": 793, + "gap_le_one_sample": 7918, + "median_best_second_gap": 0.02083333333333326, + "top_tie_fraction": 0.47997074835459497, + "tied_disagreement_fraction": 0.15582629200235804 + }, + "6": { + "positions": 23674, + "searched": 11829, + "tied_top": 5938, + "all_equal": 3797, + "disagreements": 4605, + "tied_disagreements": 730, + "gap_le_one_sample": 7752, + "median_best_second_gap": 0.0, + "top_tie_fraction": 0.5019866429960267, + "tied_disagreement_fraction": 0.15852334419109662 + } + }, + "scope": "Descriptive ambiguity of teacher rollout estimates; ties do not prove incorrect targets or establish cause of regression. No per-rollout paired outcomes stored, so statistical label-confidence intervals cannot be recovered from totals alone." } } From 7ee9c29f6d98a8d8ca6dfb661f5313f582ac733f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 01:58:09 +0200 Subject: [PATCH 118/184] Audit held-out replay policy changes before choosing further training --- ai/strong/experiments.json | 307 +++++++++++++++++++++++++++++++++++++ 1 file changed, 307 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index bde90bd..3c559d9 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -15151,5 +15151,312 @@ } }, "scope": "Descriptive ambiguity of teacher rollout estimates; ties do not prove incorrect targets or establish cause of regression. No per-rollout paired outcomes stored, so statistical label-confidence intervals cannot be recovered from totals alone." + }, + "strong_teacher_replay_policy_shift_audit": { + "data_revision": "05a750ca228595ec05bc677bac1ed730ee768bc5", + "scope": "Within-dataset held-out whole games from the stronger teacher source only. This diagnoses predictions, not independent playing strength. Search-estimate comparisons condition on both actions being evaluated and can be selection-biased.", + "counts": { + "2p/all": { + "positions": 7648, + "changed": 836, + "old_target_match": 5892, + "new_target_match": 5828, + "searched": 2704, + "old_evaluated": 2693, + "new_evaluated": 2686, + "changed_to_unevaluated": 15, + "old_top_tie_match": 1342, + "new_top_tie_match": 1339, + "both_evaluated": 2679, + "new_minus_old_estimated_win_sum": 3.76041666666667, + "new_estimate_better": 279, + "new_estimate_worse": 290 + }, + "2p/Auction": { + "positions": 1763, + "changed": 424, + "old_target_match": 902, + "new_target_match": 872, + "searched": 1463, + "old_evaluated": 1459, + "new_evaluated": 1448, + "changed_to_unevaluated": 14, + "old_top_tie_match": 655, + "new_top_tie_match": 650, + "both_evaluated": 1446, + "new_minus_old_estimated_win_sum": 6.947916666666672, + "new_estimate_better": 171, + "new_estimate_worse": 173 + }, + "2p/Resources": { + "positions": 3066, + "changed": 108, + "old_target_match": 2849, + "new_target_match": 2846 + }, + "2p/Building": { + "positions": 1241, + "changed": 295, + "old_target_match": 624, + "new_target_match": 596, + "searched": 1241, + "old_evaluated": 1234, + "new_evaluated": 1238, + "changed_to_unevaluated": 1, + "old_top_tie_match": 687, + "new_top_tie_match": 689, + "both_evaluated": 1233, + "new_minus_old_estimated_win_sum": -3.1874999999999987, + "new_estimate_better": 108, + "new_estimate_worse": 117 + }, + "2p/Bureaucracy": { + "positions": 1578, + "changed": 9, + "old_target_match": 1517, + "new_target_match": 1514 + }, + "3p/all": { + "positions": 6165, + "changed": 701, + "old_target_match": 4804, + "new_target_match": 4818, + "searched": 2569, + "old_evaluated": 2559, + "new_evaluated": 2544, + "changed_to_unevaluated": 21, + "old_top_tie_match": 1345, + "new_top_tie_match": 1422, + "both_evaluated": 2538, + "new_minus_old_estimated_win_sum": 34.46874999999999, + "new_estimate_better": 314, + "new_estimate_worse": 215 + }, + "3p/Auction": { + "positions": 1861, + "changed": 476, + "old_target_match": 964, + "new_target_match": 1008, + "searched": 1629, + "old_evaluated": 1626, + "new_evaluated": 1613, + "changed_to_unevaluated": 15, + "old_top_tie_match": 757, + "new_top_tie_match": 841, + "both_evaluated": 1611, + "new_minus_old_estimated_win_sum": 35.37499999999999, + "new_estimate_better": 250, + "new_estimate_worse": 150 + }, + "3p/Resources": { + "positions": 2214, + "changed": 44, + "old_target_match": 2145, + "new_target_match": 2141 + }, + "3p/Building": { + "positions": 940, + "changed": 180, + "old_target_match": 561, + "new_target_match": 534, + "searched": 940, + "old_evaluated": 933, + "new_evaluated": 931, + "changed_to_unevaluated": 6, + "old_top_tie_match": 588, + "new_top_tie_match": 581, + "both_evaluated": 927, + "new_minus_old_estimated_win_sum": -0.9062499999999998, + "new_estimate_better": 64, + "new_estimate_worse": 65 + }, + "3p/Bureaucracy": { + "positions": 1150, + "changed": 1, + "old_target_match": 1134, + "new_target_match": 1135 + }, + "4p/all": { + "positions": 6107, + "changed": 676, + "old_target_match": 4612, + "new_target_match": 4643, + "searched": 2714, + "old_evaluated": 2696, + "new_evaluated": 2691, + "changed_to_unevaluated": 13, + "old_top_tie_match": 1403, + "new_top_tie_match": 1474, + "both_evaluated": 2683, + "new_minus_old_estimated_win_sum": 22.91666666666669, + "new_estimate_better": 296, + "new_estimate_worse": 187 + }, + "4p/Auction": { + "positions": 2017, + "changed": 432, + "old_target_match": 1031, + "new_target_match": 1055, + "searched": 1810, + "old_evaluated": 1809, + "new_evaluated": 1802, + "changed_to_unevaluated": 8, + "old_top_tie_match": 863, + "new_top_tie_match": 918, + "both_evaluated": 1801, + "new_minus_old_estimated_win_sum": 19.520833333333343, + "new_estimate_better": 222, + "new_estimate_worse": 132 + }, + "4p/Resources": { + "positions": 2150, + "changed": 76, + "old_target_match": 2036, + "new_target_match": 2042 + }, + "4p/Building": { + "positions": 904, + "changed": 162, + "old_target_match": 522, + "new_target_match": 525, + "searched": 904, + "old_evaluated": 887, + "new_evaluated": 889, + "changed_to_unevaluated": 5, + "old_top_tie_match": 540, + "new_top_tie_match": 556, + "both_evaluated": 882, + "new_minus_old_estimated_win_sum": 3.3958333333333335, + "new_estimate_better": 74, + "new_estimate_worse": 55 + }, + "4p/Bureaucracy": { + "positions": 1036, + "changed": 6, + "old_target_match": 1023, + "new_target_match": 1021 + }, + "5p/all": { + "positions": 4179, + "changed": 383, + "old_target_match": 3275, + "new_target_match": 3258, + "searched": 1964, + "old_evaluated": 1952, + "new_evaluated": 1952, + "changed_to_unevaluated": 7, + "old_top_tie_match": 1206, + "new_top_tie_match": 1220, + "both_evaluated": 1946, + "new_minus_old_estimated_win_sum": 2.0, + "new_estimate_better": 114, + "new_estimate_worse": 110 + }, + "5p/Auction": { + "positions": 1490, + "changed": 260, + "old_target_match": 879, + "new_target_match": 865, + "searched": 1363, + "old_evaluated": 1362, + "new_evaluated": 1360, + "changed_to_unevaluated": 3, + "old_top_tie_match": 814, + "new_top_tie_match": 830, + "both_evaluated": 1359, + "new_minus_old_estimated_win_sum": 2.9166666666666656, + "new_estimate_better": 90, + "new_estimate_worse": 78 + }, + "5p/Resources": { + "positions": 1391, + "changed": 37, + "old_target_match": 1336, + "new_target_match": 1341 + }, + "5p/Building": { + "positions": 601, + "changed": 82, + "old_target_match": 371, + "new_target_match": 364, + "searched": 601, + "old_evaluated": 590, + "new_evaluated": 592, + "changed_to_unevaluated": 4, + "old_top_tie_match": 392, + "new_top_tie_match": 390, + "both_evaluated": 587, + "new_minus_old_estimated_win_sum": -0.9166666666666666, + "new_estimate_better": 24, + "new_estimate_worse": 32 + }, + "5p/Bureaucracy": { + "positions": 697, + "changed": 4, + "old_target_match": 689, + "new_target_match": 688 + }, + "6p/all": { + "positions": 4775, + "changed": 497, + "old_target_match": 3772, + "new_target_match": 3746, + "searched": 2357, + "old_evaluated": 2342, + "new_evaluated": 2341, + "changed_to_unevaluated": 11, + "old_top_tie_match": 1551, + "new_top_tie_match": 1556, + "both_evaluated": 2332, + "new_minus_old_estimated_win_sum": 3.9375000000000018, + "new_estimate_better": 156, + "new_estimate_worse": 135 + }, + "6p/Auction": { + "positions": 1859, + "changed": 339, + "old_target_match": 1159, + "new_target_match": 1120, + "searched": 1730, + "old_evaluated": 1728, + "new_evaluated": 1725, + "changed_to_unevaluated": 5, + "old_top_tie_match": 1115, + "new_top_tie_match": 1112, + "both_evaluated": 1723, + "new_minus_old_estimated_win_sum": 1.2083333333333328, + "new_estimate_better": 118, + "new_estimate_worse": 110 + }, + "6p/Resources": { + "positions": 1544, + "changed": 59, + "old_target_match": 1471, + "new_target_match": 1476 + }, + "6p/Building": { + "positions": 627, + "changed": 98, + "old_target_match": 406, + "new_target_match": 413, + "searched": 627, + "old_evaluated": 614, + "new_evaluated": 616, + "changed_to_unevaluated": 6, + "old_top_tie_match": 436, + "new_top_tie_match": 444, + "both_evaluated": 609, + "new_minus_old_estimated_win_sum": 2.729166666666666, + "new_estimate_better": 38, + "new_estimate_worse": 25 + }, + "6p/Bureaucracy": { + "positions": 745, + "changed": 1, + "old_target_match": 736, + "new_target_match": 737 + } + }, + "interpretation": "Broad movement into unevaluated actions is not supported: 67 changed-to-unevaluated predictions out of 12308 searched held-out positions. Teacher-estimate improvements are concentrated at 3-4 players while independent play does not improve; no causal diagnosis from aggregate agreement. Avoid adding shortlist masking as an assumed fix. Retain RL as current successful path and investigate teacher-policy mismatch before new distillation." } } From 663a9075f8baefa431886a17bea9e37fe71a3778 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:12:12 +0200 Subject: [PATCH 119/184] Screen strictly verified geoleague update29 checkpoint --- ai/strong/experiments.json | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 3c559d9..c69c148 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -15458,5 +15458,71 @@ } }, "interpretation": "Broad movement into unevaluated actions is not supported: 67 changed-to-unevaluated predictions out of 12308 searched held-out positions. Teacher-estimate improvements are concentrated at 3-4 players while independent play does not improve; no causal diagnosis from aggregate agreement. Avoid adding shortlist masking as an assumed fix. Retain RL as current successful path and investigate teacher-policy mismatch before new distillation." + }, + "multiplayer_geoleague_update29_screening": { + "candidate_revision": "a1211645b2ed96fd0f6fc120c3861ae1177c4ca5", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "training_games": 7200, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "max_logit_error": 4.1961669921875e-05, + "max_value_error": 2.4437904357910156e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-geoleague-u29-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abda555fbc85ba68235dc44" + }, + { + "run": "multiplayer-geoleague-u29-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abda556404719ba37614f72" + }, + { + "run": "multiplayer-geoleague-u29-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abda557404719ba37614f74" + }, + { + "run": "multiplayer-geoleague-u29-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abda557404719ba37614f76" + }, + { + "run": "multiplayer-geoleague-u29-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abda558404719ba37614f78" + }, + { + "run": "multiplayer-geoleague-u29-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abda559fbc85ba68235dc46" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0 } } From 8b052f9c56947a4334ff3d0f237c6f2a8a3407ac Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:16:44 +0200 Subject: [PATCH 120/184] Complete geoleague update29 screen without promotion --- ai/strong/experiments.json | 647 ++++++++++++++++++++++++++++++++++++- 1 file changed, 645 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index c69c148..1eadad3 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -15520,9 +15520,652 @@ "job_id": "6abda559fbc85ba68235dc46" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", - "search_samples": 0 + "search_samples": 0, + "reports": { + "2p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/a1211645b2ed96fd0f6fc120c3861ae1177c4ca5/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.521875, + "truncated": 0, + "seconds": 23.62735708244145, + "inference_p95_ms": 0.3469269722700119, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.6375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.6875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.575 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.459375, + 0.584375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "844c2673c1737fda2d0004b2bd45817745aa9f8f" + }, + "3p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/a1211645b2ed96fd0f6fc120c3861ae1177c4ca5/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.55, + "truncated": 0, + "seconds": 29.329354582000008, + "inference_p95_ms": 0.39910500000672755, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.38333333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2833333333333333, + 0.48333333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65, + 0.825 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.675 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5020833333333333, + 0.5958333333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "844c2673c1737fda2d0004b2bd45817745aa9f8f" + }, + "4p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/a1211645b2ed96fd0f6fc120c3861ae1177c4ca5/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.584375, + "truncated": 0, + "seconds": 38.92658715099999, + "inference_p95_ms": 0.39247299999658475, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.56875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.64375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.4125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.33125, + 0.49375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.7875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.725, + 0.85 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.56875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.6625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.54375, + 0.6234375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "844c2673c1737fda2d0004b2bd45817745aa9f8f" + }, + "5p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/a1211645b2ed96fd0f6fc120c3861ae1177c4ca5/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.65375, + "truncated": 0, + "seconds": 45.194118737, + "inference_p95_ms": 0.41138600001033865, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.565, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.49, + 0.64 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.605, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.53, + 0.68 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.745, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.685, + 0.8 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.7, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.645, + 0.76 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.615, + 0.6925 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "844c2673c1737fda2d0004b2bd45817745aa9f8f" + }, + "6p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/a1211645b2ed96fd0f6fc120c3861ae1177c4ca5/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.5953125, + "truncated": 0, + "seconds": 53.942861275, + "inference_p95_ms": 0.4226009999968028, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.5083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4583333333333333, + 0.5583333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.51875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4479166666666667, + 0.5895833333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6125, + 0.7208333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6291666666666667, + 0.7458333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5666666666666667, + 0.6234375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8796a350f9c9eef1d327c0b965abc98b2716cfb9" + }, + "3p/a260": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/a1211645b2ed96fd0f6fc120c3861ae1177c4ca5/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "e9705a6944d06acda92a8165dc4de8700e01258801d5933f5f12b24de26a31fa", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.3020833333333333, + "truncated": 0, + "seconds": 71.39658182500001, + "inference_p95_ms": 0.4137979999967456, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.275, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.175, + 0.375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.25, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3416666666666667, + 0.5583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.23333333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15, + 0.31666666666666665 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.25625, + 0.3458333333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "8796a350f9c9eef1d327c0b965abc98b2716cfb9" + } + }, + "paired_against_geoleague_u19": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.521875, + "baseline_win_rate": 0.51875, + "paired_delta": 0.003125, + "paired_seed_bootstrap_95_interval": [ + -0.071875, + 0.084375 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.55, + "baseline_win_rate": 0.540625, + "paired_delta": 0.009374999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.05104166666666667, + 0.06875 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.584375, + "baseline_win_rate": 0.5640625, + "paired_delta": 0.0203125, + "paired_seed_bootstrap_95_interval": [ + -0.0265625, + 0.0640625 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.65375, + "baseline_win_rate": 0.68375, + "paired_delta": -0.029999999999999992, + "paired_seed_bootstrap_95_interval": [ + -0.07250000000000001, + 0.012500000000000002 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.5953125, + "baseline_win_rate": 0.6192708333333333, + "paired_delta": -0.023958333333333335, + "paired_seed_bootstrap_95_interval": [ + -0.06458333333333333, + 0.01666666666666667 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.3020833333333333, + "baseline_win_rate": 0.325, + "paired_delta": -0.022916666666666675, + "paired_seed_bootstrap_95_interval": [ + -0.08125, + 0.03125 + ] + } + }, + "paired_against_h200_u29": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.521875, + "baseline_win_rate": 0.534375, + "paired_delta": -0.0125, + "paired_seed_bootstrap_95_interval": [ + -0.09375, + 0.071875 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.55, + "baseline_win_rate": 0.603125, + "paired_delta": -0.05312499999999999, + "paired_seed_bootstrap_95_interval": [ + -0.10625, + 6.6353172956075e-18 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.584375, + "baseline_win_rate": 0.5640625, + "paired_delta": 0.0203125, + "paired_seed_bootstrap_95_interval": [ + -0.03361328124999998, + 0.0765625 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.65375, + "baseline_win_rate": 0.763125, + "paired_delta": -0.109375, + "paired_seed_bootstrap_95_interval": [ + -0.14875000000000002, + -0.069375 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.5953125, + "baseline_win_rate": 0.6822916666666666, + "paired_delta": -0.08697916666666668, + "paired_seed_bootstrap_95_interval": [ + -0.1296875, + -0.0453125 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.3020833333333333, + "baseline_win_rate": 0.35520833333333335, + "paired_delta": -0.053125, + "paired_seed_bootstrap_95_interval": [ + -0.115625, + 0.004166666666666668 + ] + } + }, + "decision": "No promotion: none of the six paired comparisons against geoleague update19 supports an improvement. Frozen A260 is 30.2083%, below the 40% floor and equal-share point reference. H200 update29 is stronger at 5-6 players with paired intervals excluding zero; other cross-run differences remain uncertain. Continue the authorized training horizon and retain older checkpoints rather than assume stronger training opponents ensure stronger play." } } From 3167294603a0d6fdc78bbea461ff421a93326387 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:18:09 +0200 Subject: [PATCH 121/184] Launch independent screen for verified H200 update39 checkpoint --- ai/strong/experiments.json | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 1eadad3..dd25c3e 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -16167,5 +16167,71 @@ } }, "decision": "No promotion: none of the six paired comparisons against geoleague update19 supports an improvement. Frozen A260 is 30.2083%, below the 40% floor and equal-share point reference. H200 update29 is stronger at 5-6 players with paired intervals excluding zero; other cross-run differences remain uncertain. Continue the authorized training horizon and retain older checkpoints rather than assume stronger training opponents ensure stronger play." + }, + "multiplayer_h200_update39_screening": { + "candidate_revision": "8796a350f9c9eef1d327c0b965abc98b2716cfb9", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "training_games": 9600, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "max_logit_error": 4.9591064453125e-05, + "max_value_error": 3.4570693969726562e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-h200-u39-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abda6b9fbc85ba68235dcc3" + }, + { + "run": "multiplayer-h200-u39-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abda6ba404719ba37614fde" + }, + { + "run": "multiplayer-h200-u39-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abda6bafbc85ba68235dcc5" + }, + { + "run": "multiplayer-h200-u39-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abda6bb404719ba37614fe0" + }, + { + "run": "multiplayer-h200-u39-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abda6bcfbc85ba68235dcc7" + }, + { + "run": "multiplayer-h200-u39-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abda6bc404719ba37614fe4" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0 } } From b2697f884c7fa06097ebc27a9ca938009b32f56e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:21:34 +0200 Subject: [PATCH 122/184] Complete H200 update39 screen and retain earlier candidates --- ai/strong/experiments.json | 579 ++++++++++++++++++++++++++++++++++++- 1 file changed, 577 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index dd25c3e..b421a27 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -16229,9 +16229,584 @@ "job_id": "6abda6bc404719ba37614fe4" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", - "search_samples": 0 + "search_samples": 0, + "reports": { + "2p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8796a350f9c9eef1d327c0b965abc98b2716cfb9/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.5484375, + "truncated": 0, + "seconds": 23.362376932000018, + "inference_p95_ms": 0.3619089999915559, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.50625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.6125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5125, + 0.7625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.575, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.6875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.4890625, + 0.6078125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "da2646da6e15de37f97c377c42e992119856c265" + }, + "3p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8796a350f9c9eef1d327c0b965abc98b2716cfb9/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.596875, + "truncated": 0, + "seconds": 29.373136950000003, + "inference_p95_ms": 0.40471579998211377, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44166666666666665, + 0.6166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.5166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.43333333333333335, + 0.5916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65, + 0.8083333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6041666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 0.7083333333333334 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5479166666666667, + 0.6447916666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "da2646da6e15de37f97c377c42e992119856c265" + }, + "4p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8796a350f9c9eef1d327c0b965abc98b2716cfb9/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.56875, + "truncated": 0, + "seconds": 39.914446182999995, + "inference_p95_ms": 0.4112304999836168, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.6125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.421875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3375, + 0.50625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.696875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6249218750000001, + 0.771875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.63125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.54375, + 0.71875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5296875, + 0.60703125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "da2646da6e15de37f97c377c42e992119856c265" + }, + "5p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8796a350f9c9eef1d327c0b965abc98b2716cfb9/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.7425, + "truncated": 0, + "seconds": 46.13328969599996, + "inference_p95_ms": 0.4221394499978715, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.69, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.61, + 0.765 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.695, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.635, + 0.755 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.835, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.775, + 0.89 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.75, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.69, + 0.81 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7075, + 0.775 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "da2646da6e15de37f97c377c42e992119856c265" + }, + "6p/economic": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8796a350f9c9eef1d327c0b965abc98b2716cfb9/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.69375, + "truncated": 0, + "seconds": 52.99550231100005, + "inference_p95_ms": 0.4283142499872383, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.7083333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6541666666666667, + 0.7625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5833333333333334, + 0.6916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.7458333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7, + 0.7916666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6208333333333333, + 0.7416666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6645833333333333, + 0.721875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "da2646da6e15de37f97c377c42e992119856c265" + }, + "3p/a260": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8796a350f9c9eef1d327c0b965abc98b2716cfb9/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.31666666666666665, + "truncated": 0, + "seconds": 71.35815037100002, + "inference_p95_ms": 0.404631999981575, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.26666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19166666666666668, + 0.3416666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.26666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.18333333333333332, + 0.35 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.36666666666666664, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.25833333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.18333333333333332, + 0.3416666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.26875, + 0.36666666666666664 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "b8898b3086c0dbf196855eefb87b8a35d822a17b" + } + }, + "paired_against_h200_u29": { + "2p/economic": { + "games": 320, + "independent_seeds": 40, + "candidate_win_rate": 0.5484375, + "baseline_win_rate": 0.534375, + "paired_delta": 0.0140625, + "paired_seed_bootstrap_95_interval": [ + -0.075, + 0.1 + ] + }, + "3p/economic": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.596875, + "baseline_win_rate": 0.603125, + "paired_delta": -0.00625, + "paired_seed_bootstrap_95_interval": [ + -0.065625, + 0.05208333333333333 + ] + }, + "4p/economic": { + "games": 640, + "independent_seeds": 40, + "candidate_win_rate": 0.56875, + "baseline_win_rate": 0.5640625, + "paired_delta": 0.0046875, + "paired_seed_bootstrap_95_interval": [ + -0.0453125, + 0.05546875 + ] + }, + "5p/economic": { + "games": 800, + "independent_seeds": 40, + "candidate_win_rate": 0.7425, + "baseline_win_rate": 0.763125, + "paired_delta": -0.020625, + "paired_seed_bootstrap_95_interval": [ + -0.055625, + 0.015000000000000003 + ] + }, + "6p/economic": { + "games": 960, + "independent_seeds": 40, + "candidate_win_rate": 0.69375, + "baseline_win_rate": 0.6822916666666666, + "paired_delta": 0.011458333333333334, + "paired_seed_bootstrap_95_interval": [ + -0.028125, + 0.051041666666666666 + ] + }, + "3p/a260": { + "games": 480, + "independent_seeds": 40, + "candidate_win_rate": 0.31666666666666665, + "baseline_win_rate": 0.35520833333333335, + "paired_delta": -0.03854166666666666, + "paired_seed_bootstrap_95_interval": [ + -0.0875, + 0.010416666666666668 + ] + } + }, + "decision": "No promotion. No paired 95% interval versus update29 excludes zero in the positive direction across any of the six screens. Frozen A260 point result declines from 35.5208% to 31.6667%, with uncertain difference; original/open, original/sealed and recharged/sealed remain weak. Retain update29 and other earlier checkpoints. Continue the current authorized training horizon, but do not infer progress from internal checkpoint selection." } } From c10a327e9791d6193a195cd4ae5675d234a49eee Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:38:43 +0200 Subject: [PATCH 123/184] Audit sparse league snapshot selection against independent screens --- ai/strong/experiments.json | 438 +++++++++++++++++++++++++++++++++++++ 1 file changed, 438 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b421a27..6c01274 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -16808,5 +16808,443 @@ } }, "decision": "No promotion. No paired 95% interval versus update29 excludes zero in the positive direction across any of the six screens. Frozen A260 point result declines from 35.5208% to 31.6667%, with uncertain difference; original/open, original/sealed and recharged/sealed remain weak. Retain update29 and other earlier checkpoints. Continue the current authorized training horizon, but do not infer progress from internal checkpoint selection." + }, + "multiplayer_league_selection_audit": { + "artifact_revision": "b8898b3086c0dbf196855eefb87b8a35d822a17b", + "selection_opponents": [ + "economic", + "heuristic", + "rush" + ], + "independent_deals_per_count": 2, + "excluded_from_selection": [ + "legacy", + "search", + "search_geo", + "frozen_neural_opponents" + ], + "runs": { + "multiplayer-refine-hard-v1": { + "metrics_sha256": "64e7154a9b394d389637ccd08321c892dbd3de7ad98ca73226b687bd4f7f543b", + "selection_history": [ + { + "update": -1, + "selection_score": 0.3097222222222222, + "new_best": true, + "snapshot_update_by_index": [ + -1 + ] + }, + { + "update": 9, + "selection_score": 0.3804166666666667, + "new_best": true, + "snapshot_update_by_index": [ + -1, + 9 + ] + }, + { + "update": 19, + "selection_score": 0.4604166666666666, + "new_best": true, + "snapshot_update_by_index": [ + -1, + 9, + 19 + ] + }, + { + "update": 29, + "selection_score": 0.5116666666666666, + "new_best": true, + "snapshot_update_by_index": [ + 9, + 19, + 29 + ] + }, + { + "update": 39, + "selection_score": 0.5781944444444443, + "new_best": true, + "snapshot_update_by_index": [ + 19, + 29, + 39 + ] + } + ], + "training_windows": [ + { + "updates": [ + 0, + 9 + ], + "opponents": { + "search": { + "games": 309, + "wins": 61, + "truncated": 0 + }, + "economic": { + "games": 313, + "wins": 85, + "truncated": 0 + }, + "heuristic": { + "games": 294, + "wins": 169, + "truncated": 0 + }, + "rush": { + "games": 293, + "wins": 90, + "truncated": 0 + }, + "snapshot2": { + "games": 285, + "wins": 34, + "truncated": 0 + }, + "snapshot1": { + "games": 295, + "wins": 39, + "truncated": 0 + }, + "snapshot0": { + "games": 302, + "wins": 42, + "truncated": 0 + } + } + }, + { + "updates": [ + 10, + 19 + ], + "opponents": { + "economic": { + "games": 300, + "wins": 86, + "truncated": 0 + }, + "heuristic": { + "games": 308, + "wins": 214, + "truncated": 0 + }, + "search": { + "games": 307, + "wins": 85.5, + "truncated": 0 + }, + "rush": { + "games": 307, + "wins": 101, + "truncated": 0 + }, + "snapshot2": { + "games": 297, + "wins": 49, + "truncated": 0 + }, + "snapshot0": { + "games": 292, + "wins": 59, + "truncated": 0 + }, + "snapshot1": { + "games": 286, + "wins": 41, + "truncated": 0 + } + } + }, + { + "updates": [ + 20, + 29 + ], + "opponents": { + "economic": { + "games": 317, + "wins": 110, + "truncated": 0 + }, + "heuristic": { + "games": 292, + "wins": 208, + "truncated": 0 + }, + "rush": { + "games": 311, + "wins": 128, + "truncated": 0 + }, + "search": { + "games": 282, + "wins": 103, + "truncated": 0 + }, + "snapshot0": { + "games": 303, + "wins": 67, + "truncated": 0 + }, + "snapshot1": { + "games": 275, + "wins": 46, + "truncated": 0 + }, + "snapshot2": { + "games": 295, + "wins": 40, + "truncated": 0 + } + } + }, + { + "updates": [ + 30, + 39 + ], + "opponents": { + "rush": { + "games": 300, + "wins": 124, + "truncated": 0 + }, + "search": { + "games": 294, + "wins": 130, + "truncated": 0 + }, + "heuristic": { + "games": 300, + "wins": 228, + "truncated": 0 + }, + "economic": { + "games": 323, + "wins": 124, + "truncated": 0 + }, + "snapshot0": { + "games": 320, + "wins": 58, + "truncated": 0 + }, + "snapshot2": { + "games": 287, + "wins": 49, + "truncated": 0 + }, + "snapshot1": { + "games": 291, + "wins": 50.5, + "truncated": 0 + } + } + } + ] + }, + "multiplayer-refine-geoleague-async-v1": { + "metrics_sha256": "830e1295640f18acad3dc20918e8a84a2c9716f19e9438dc574fde8fd85100a4", + "selection_history": [ + { + "update": -1, + "selection_score": 0.3097222222222222, + "new_best": true, + "snapshot_update_by_index": [ + -1 + ] + }, + { + "update": 9, + "selection_score": 0.4645833333333333, + "new_best": true, + "snapshot_update_by_index": [ + -1, + 9 + ] + }, + { + "update": 19, + "selection_score": 0.5069444444444444, + "new_best": true, + "snapshot_update_by_index": [ + -1, + 9, + 19 + ] + }, + { + "update": 29, + "selection_score": 0.45749999999999996, + "new_best": false, + "snapshot_update_by_index": [ + -1, + 9, + 19 + ] + } + ], + "training_windows": [ + { + "updates": [ + 0, + 9 + ], + "opponents": { + "rush": { + "games": 327, + "wins": 87, + "truncated": 0 + }, + "economic": { + "games": 315, + "wins": 79.5, + "truncated": 0 + }, + "heuristic": { + "games": 286, + "wins": 167, + "truncated": 0 + }, + "snapshot2": { + "games": 300, + "wins": 45.5, + "truncated": 0 + }, + "snapshot1": { + "games": 297, + "wins": 45, + "truncated": 0 + }, + "snapshot0": { + "games": 283, + "wins": 38, + "truncated": 0 + }, + "search_geo": { + "games": 298, + "wins": 12, + "truncated": 0 + } + } + }, + { + "updates": [ + 10, + 19 + ], + "opponents": { + "rush": { + "games": 322, + "wins": 114, + "truncated": 0 + }, + "economic": { + "games": 286, + "wins": 90, + "truncated": 0 + }, + "heuristic": { + "games": 273, + "wins": 183, + "truncated": 0 + }, + "snapshot2": { + "games": 277, + "wins": 44, + "truncated": 0 + }, + "snapshot0": { + "games": 301, + "wins": 49, + "truncated": 0 + }, + "snapshot1": { + "games": 316, + "wins": 40, + "truncated": 0 + }, + "search_geo": { + "games": 301, + "wins": 26, + "truncated": 0 + } + } + }, + { + "updates": [ + 20, + 29 + ], + "opponents": { + "rush": { + "games": 328, + "wins": 111, + "truncated": 0 + }, + "heuristic": { + "games": 296, + "wins": 206, + "truncated": 0 + }, + "economic": { + "games": 293, + "wins": 102, + "truncated": 0 + }, + "snapshot2": { + "games": 314, + "wins": 26, + "truncated": 0 + }, + "snapshot0": { + "games": 296, + "wins": 56, + "truncated": 0 + }, + "snapshot1": { + "games": 272, + "wins": 43, + "truncated": 0 + }, + "search_geo": { + "games": 297, + "wins": 28, + "truncated": 0 + } + } + } + ] + } + }, + "limitations": [ + "Training opponent summaries pool player counts and rule variants, omit all-learner self-play, and use stochastic learner moves; these are not independent strength estimates.", + "Snapshot selection reconstructed from pinned metrics and train.py semantics; checkpoint files do not persist the snapshot pool.", + "No causal claim that selection explains the independent screening plateau." + ], + "next_experiment_constraints": [ + "Finish the current fixed 80-update runs without changing their configuration.", + "If another refinement is needed, separate opponent-pool admission from the two-deal heuristic selection score, retain diverse historical opponents, and validate with stronger held-out opponents.", + "Keep final reserved seeds unused until candidate selection and all existing strength gates remain unchanged." + ], + "status": "COMPLETED_DIAGNOSTIC", + "source_commit": "b2697f8", + "source_locations": [ + "ai/strong/train.py:evaluate,selection_score,snapshot admission", + "ai/strong/bridge.cjs:reset arena seed mapping", + "ai/pool.py:EnginePool reset offsets" + ], + "independent_evidence": { + "multiplayer_h200_update39_screening": "Internal score increased from 0.5116666666666666 to 0.5781944444444443 and admitted update39, but none of six paired 95% intervals against update29 supports a gain.", + "multiplayer_geoleague_update29_screening": "Internal score declined and update29 was not admitted; none of six paired comparisons supports improvement over update19." + }, + "decision": "Do not promote using internal best or training win rates. Complete current runs and keep independent checkpoint screening. Future league redesign should decouple opponent admission from this sparse heuristic-only selection and measure whether a diverse retained pool improves held-out strength." } } From c7a9491f25a8555652af535ad426113b8dbaf1cb Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:41:55 +0200 Subject: [PATCH 124/184] Screen raw PPO transfer against geographic search across player counts --- ai/strong/experiments.json | 365 +++++++++++++++++++++++++- ai/strong/launch-multiplayer-arena.sh | 4 + 2 files changed, 368 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 6c01274..5b58424 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -108,7 +108,27 @@ "multiplayer-p5-search-probe-6p": "6abd4dcffbc85ba68235c3ae", "multiplayer-distillation-v1-hard-canceled-queued": "6abd4d17fbc85ba68235c391", "multiplayer-distillation-v2-soft": "6abd5021fbc85ba68235c463", - "multiplayer-distillation-v2-hard": "6abd5022404719ba37614022" + "multiplayer-distillation-v2-hard": "6abd5022404719ba37614022", + "multiplayer-h200-u29-raw-search-geo-h2400-2p": "6abdabec404719ba37615128", + "multiplayer-h200-u29-raw-search-geo-h2400-3p": "6abdabecfbc85ba68235de6f", + "multiplayer-h200-u29-raw-search-geo-h2400-4p": "6abdabed404719ba3761512c", + "multiplayer-h200-u29-raw-search-geo-h2400-5p": "6abdabeefbc85ba68235de73", + "multiplayer-h200-u29-raw-search-geo-h2400-6p": "6abdabeefbc85ba68235de75", + "multiplayer-hard-e10-raw-search-geo-h2400-2p": "6abdabef404719ba3761512e", + "multiplayer-hard-e10-raw-search-geo-h2400-3p": "6abdabf0fbc85ba68235de77", + "multiplayer-hard-e10-raw-search-geo-h2400-4p": "6abdabf0fbc85ba68235de79", + "multiplayer-hard-e10-raw-search-geo-h2400-5p": "6abdabf1404719ba37615130", + "multiplayer-hard-e10-raw-search-geo-h2400-6p": "6abdabf2404719ba37615132", + "multiplayer-h200-u29-raw-search-geo-h2400-2p-v2": "6abdac2efbc85ba68235de89", + "multiplayer-h200-u29-raw-search-geo-h2400-3p-v2": "6abdac2efbc85ba68235de8b", + "multiplayer-h200-u29-raw-search-geo-h2400-4p-v2": "6abdac2f404719ba37615150", + "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2": "6abdac30fbc85ba68235de8d", + "multiplayer-h200-u29-raw-search-geo-h2400-6p-v2": "6abdac30fbc85ba68235de8f", + "multiplayer-hard-e10-raw-search-geo-h2400-2p-v2": "6abdac31fbc85ba68235de91", + "multiplayer-hard-e10-raw-search-geo-h2400-3p-v2": "6abdac32404719ba37615152", + "multiplayer-hard-e10-raw-search-geo-h2400-4p-v2": "6abdac32fbc85ba68235de93", + "multiplayer-hard-e10-raw-search-geo-h2400-5p-v2": "6abdac33404719ba37615157", + "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2": "6abdac34404719ba37615159" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -17246,5 +17266,348 @@ "multiplayer_geoleague_update29_screening": "Internal score declined and update29 was not admitted; none of six paired comparisons supports improvement over update19." }, "decision": "Do not promote using internal best or training win rates. Complete current runs and keep independent checkpoint screening. Future league redesign should decouple opponent admission from this sparse heuristic-only selection and measure whether a diverse retained pool improves held-out strength." + }, + "multiplayer_h200_update29_strong_opponent_transfer_screen": { + "status": "RUNNING", + "purpose": "Test whether raw-policy PPO improvements over its warm start transfer to a stronger independent geographic search baseline across all counts. Neither learner uses online search.", + "source": { + "archive": "strong-source-v32.tgz", + "revision": "37465b08df007221665d796448aea57e6828257e", + "base_revision": "9752cbc31db834b8c07b62504997fc0134a8e0ee", + "changed_files": [ + "ai/strong/search.cjs", + "ai/strong/evaluate.py", + "ai/strong/combine-arenas.py", + "ai/strong/verify-final.py", + "ai/strong/diagnose-search-horizon.cjs", + "ai/strong/test-search-horizon.cjs", + "ai/strong/fixtures/search-horizon-six-player.json" + ], + "archive_sha256": "b95ab1d8bc8f2bae42e7428d8f7d80e727083c3e48f8c0075d64e6ae16144bfc" + }, + "jobs": { + "multiplayer-h200-u29-raw-search-geo-h2400-2p-v2": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-2p-v2", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 2, + "games": 64, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-2p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac2efbc85ba68235de89", + "observed_stage": "RUNNING", + "candidate_geographic_search": false + }, + "multiplayer-h200-u29-raw-search-geo-h2400-3p-v2": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-3p-v2", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 3, + "games": 96, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-3p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac2efbc85ba68235de8b", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-h200-u29-raw-search-geo-h2400-4p-v2": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-4p-v2", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 4, + "games": 128, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-4p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac2f404719ba37615150", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 5, + "games": 160, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-5p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac30fbc85ba68235de8d", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-h200-u29-raw-search-geo-h2400-6p-v2": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-6p-v2", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 6, + "games": 192, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac30fbc85ba68235de8f", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-hard-e10-raw-search-geo-h2400-2p-v2": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-2p-v2", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 2, + "games": 64, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-2p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac31fbc85ba68235de91", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-hard-e10-raw-search-geo-h2400-3p-v2": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-3p-v2", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 3, + "games": 96, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-3p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac32404719ba37615152", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-hard-e10-raw-search-geo-h2400-4p-v2": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-4p-v2", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 4, + "games": 128, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-4p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac32fbc85ba68235de93", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-hard-e10-raw-search-geo-h2400-5p-v2": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-5p-v2", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 5, + "games": 160, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-5p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac33404719ba37615157", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + }, + "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 6, + "games": 192, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdac34404719ba37615159", + "observed_stage": "SCHEDULING", + "candidate_geographic_search": false + } + }, + "total_games": 1280, + "independent_deals_per_count": 8, + "pairing": "Same deal seeds, seat and four rule combinations between candidates; 32*N games per model/count.", + "candidate_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "warm_start_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "analysis_plan": "Verify model hashes, exact pair sets, all actual and search rollout truncation counters, and horizon 2400. Report each count/rule with seed-cluster intervals and paired per-deal differences (20000 bootstrap draws, seed623). Eight deals is diagnostic only; do not qualify or claim lack of difference from wide intervals. Expand supported or promising candidates on development seeds before final qualification.", + "final_reserved_seeds_used": false, + "invalid_initial_launches": { + "reason": "Candidate geographic-search flag incompatible with zero candidate samples. No evaluation results used. Corrected geography to 0; search_geo opponents unchanged. Launcher now rejects this combination before submission.", + "jobs": { + "multiplayer-h200-u29-raw-search-geo-h2400-2p": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-2p", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 2, + "games": 64, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-2p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabec404719ba37615128", + "observed_stage": "ERROR" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-3p": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-3p", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 3, + "games": 96, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-3p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabecfbc85ba68235de6f", + "observed_stage": "CANCELED" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-4p": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-4p", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 4, + "games": 128, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-4p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabed404719ba3761512c", + "observed_stage": "CANCELED" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-5p": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-5p", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 5, + "games": 160, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-5p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabeefbc85ba68235de73", + "observed_stage": "CANCELED" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-6p": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-6p", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "player_count": 6, + "games": 192, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabeefbc85ba68235de75", + "observed_stage": "CANCELED" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-2p": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-2p", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 2, + "games": 64, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-2p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabef404719ba3761512e", + "observed_stage": "CANCELED" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-3p": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-3p", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 3, + "games": 96, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-3p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabf0fbc85ba68235de77", + "observed_stage": "CANCELED" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-4p": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-4p", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 4, + "games": 128, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-4p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabf0fbc85ba68235de79", + "observed_stage": "CANCELED" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-5p": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-5p", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 5, + "games": 160, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-5p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabf1404719ba37615130", + "observed_stage": "ERROR" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-6p": { + "run": "multiplayer-hard-e10-raw-search-geo-h2400-6p", + "model_path": "runs/multiplayer-distillation-v2-hard/best.onnx", + "model_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", + "player_count": 6, + "games": 192, + "deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "opponent": "search_geo", + "search_samples": 0, + "search_max_steps": 2400, + "async_arena": true, + "job_id": "6abdabf2404719ba37615132", + "observed_stage": "ERROR" + } + } + } } } diff --git a/ai/strong/launch-multiplayer-arena.sh b/ai/strong/launch-multiplayer-arena.sh index 3806802..60e2fa0 100644 --- a/ai/strong/launch-multiplayer-arena.sh +++ b/ai/strong/launch-multiplayer-arena.sh @@ -5,6 +5,10 @@ case "${4:?opponent}" in economic|heuristic|rush|legacy|search|search_geo) ;; *) echo "Unsupported opponent mode; use OPPONENT_MODEL_PATH for a frozen model" >&2; exit 2 ;; esac +if [[ "${6:?geography}" == 1 ]] && ! [[ "${5:?samples}" =~ ^[1-9][0-9]*$ ]]; then + echo "Candidate geographic search requires a positive sample budget; opponent search_geo is configured separately" >&2 + exit 2 +fi extra_env=() if [[ -n "${OPPONENT_MODEL_PATH:-}" ]]; then extra_env+=(--env "OPPONENT_MODEL_PATH=$OPPONENT_MODEL_PATH" --env "OPPONENT_MODEL_REVISION=${OPPONENT_MODEL_REVISION:?pin opponent revision}") From 3b3b7900d14c75a863ad87c2a8d2576e58c1e555 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:46:22 +0200 Subject: [PATCH 125/184] Record clean two-player search-baseline failure of retained PPO model --- ai/strong/experiments.json | 116 +++++++++++++++++++++++++++++++++---- 1 file changed, 105 insertions(+), 11 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 5b58424..04daa59 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17299,7 +17299,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac2efbc85ba68235de89", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-h200-u29-raw-search-geo-h2400-3p-v2": { @@ -17315,7 +17315,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac2efbc85ba68235de8b", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-h200-u29-raw-search-geo-h2400-4p-v2": { @@ -17331,7 +17331,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac2f404719ba37615150", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2": { @@ -17347,7 +17347,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac30fbc85ba68235de8d", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-h200-u29-raw-search-geo-h2400-6p-v2": { @@ -17363,7 +17363,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac30fbc85ba68235de8f", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-2p-v2": { @@ -17379,7 +17379,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac31fbc85ba68235de91", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-3p-v2": { @@ -17395,7 +17395,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac32404719ba37615152", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-4p-v2": { @@ -17411,7 +17411,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac32fbc85ba68235de93", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-5p-v2": { @@ -17427,7 +17427,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac33404719ba37615157", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2": { @@ -17443,7 +17443,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac34404719ba37615159", - "observed_stage": "SCHEDULING", + "observed_stage": "RUNNING", "candidate_geographic_search": false } }, @@ -17608,6 +17608,100 @@ "observed_stage": "ERROR" } } - } + }, + "reports": { + "multiplayer-h200-u29-raw-search-geo-h2400-2p-v2": { + "async_rollout": true, + "engine_workers": 64, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-2p", + "games": 64, + "win_rate": 0.28125, + "truncated": 0, + "seconds": 221.72314867470413, + "inference_p95_ms": 1.0433310642838478, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 16, + "win_rate": 0.125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 16, + "win_rate": 0.3125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.4375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 16, + "win_rate": 0.375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 16, + "win_rate": 0.3125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.5625 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.390625 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 3337, + "evaluations": 270832, + "truncated": 0 + } + }, + "artifact_revision": "8fcda890c08b9e8b03de86304d3b47a4e8ad588e" + } + }, + "paired_against_warm_start": {}, + "interim_decision": "Retained raw H200 update29 is not a viable universal candidate: 2p versus search_geo is 28.125% on 64 games/8 deals, seed-cluster 95% interval [18.75%,39.0625%], below equal-share 50%. All games and 270832 opponent search rollouts finish without truncation. Warm-start paired result and counts3-6 pending; do not infer training regression or transfer gain yet. Preserve unchanged qualification requirements." } } From d04b770a1109409d3e67588366c3c1601c05151a Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:47:12 +0200 Subject: [PATCH 126/184] Record paired two-player transfer result against strong search --- ai/strong/experiments.json | 105 +++++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 04daa59..dbd581e 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17379,7 +17379,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac31fbc85ba68235de91", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-3p-v2": { @@ -17699,9 +17699,108 @@ } }, "artifact_revision": "8fcda890c08b9e8b03de86304d3b47a4e8ad588e" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-2p-v2": { + "async_rollout": true, + "engine_workers": 64, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-2p", + "games": 64, + "win_rate": 0.203125, + "truncated": 0, + "seconds": 242.381745824, + "inference_p95_ms": 0.9557070499852216, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 16, + "win_rate": 0.125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 16, + "win_rate": 0.25, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.4375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 16, + "win_rate": 0.125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 16, + "win_rate": 0.3125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.5625 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.09375, + 0.3125 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 3603, + "evaluations": 290800, + "truncated": 0 + } + }, + "artifact_revision": "2ce72e8875627f7c2e8917dab5e36a3b78e2172c" } }, - "paired_against_warm_start": {}, - "interim_decision": "Retained raw H200 update29 is not a viable universal candidate: 2p versus search_geo is 28.125% on 64 games/8 deals, seed-cluster 95% interval [18.75%,39.0625%], below equal-share 50%. All games and 270832 opponent search rollouts finish without truncation. Warm-start paired result and counts3-6 pending; do not infer training regression or transfer gain yet. Preserve unchanged qualification requirements." + "paired_against_warm_start": { + "2": { + "independent_deals": 8, + "difference": 0.078125, + "paired_seed_bootstrap_95_interval": [ + -0.109375, + 0.265625 + ] + } + }, + "interim_decision": "Both raw models lose decisively to the stronger search baseline at 2p: H200 update29 28.125% [18.75%,39.0625%], warm-start hard epoch10 20.3125% [9.375%,31.25%], each 64 games/8 paired deals. Training difference +7.8125 percentage points has paired seed-cluster 95% interval [-10.9375,+26.5625], so neither improvement nor regression is established. All completed actual games and opponent rollouts have zero truncation. Counts3-6 pending. Neither raw model meets the 2p strength gate; preserve full qualification requirements." } } From 5fdc669394ba31aaf9820fb101a86e9ce593b7ac Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 02:50:52 +0200 Subject: [PATCH 127/184] Measure three-player PPO transfer gain and remaining strength gap --- ai/strong/experiments.json | 194 ++++++++++++++++++++++++++++++++++++- 1 file changed, 191 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index dbd581e..f59e5b6 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17315,7 +17315,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac2efbc85ba68235de8b", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-h200-u29-raw-search-geo-h2400-4p-v2": { @@ -17395,7 +17395,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac32404719ba37615152", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-4p-v2": { @@ -17789,6 +17789,186 @@ } }, "artifact_revision": "2ce72e8875627f7c2e8917dab5e36a3b78e2172c" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-3p-v2": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-3p", + "games": 96, + "win_rate": 0.20833333333333334, + "truncated": 0, + "seconds": 414.827211731, + "inference_p95_ms": 1.1042674000009356, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.2916666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.4583333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.20833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.25 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.125, + 0.2916666666666667 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 9025, + "evaluations": 741648, + "truncated": 0 + } + }, + "artifact_revision": "3e2098dc0e6e3ef56371a1c4fd86b73aa7ec0a9a" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-3p-v2": { + "async_rollout": true, + "engine_workers": 96, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-3p", + "games": 96, + "win_rate": 0.0625, + "truncated": 0, + "seconds": 431.87200624499997, + "inference_p95_ms": 1.1315879999983733, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 24, + "win_rate": 0.125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.25 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 24, + "win_rate": 0.08333333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.25 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 24, + "win_rate": 0.041666666666666664, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 24, + "win_rate": 0.0, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.020833333333333332, + 0.11458333333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 9720, + "evaluations": 800192, + "truncated": 0 + } + }, + "artifact_revision": "39994e449ae73641638a2443dee64e6eedb2efa3" } }, "paired_against_warm_start": { @@ -17799,8 +17979,16 @@ -0.109375, 0.265625 ] + }, + "3": { + "independent_deals": 8, + "difference": 0.14583333333333331, + "paired_seed_bootstrap_95_interval": [ + 0.05208333333333333, + 0.23958333333333331 + ] } }, - "interim_decision": "Both raw models lose decisively to the stronger search baseline at 2p: H200 update29 28.125% [18.75%,39.0625%], warm-start hard epoch10 20.3125% [9.375%,31.25%], each 64 games/8 paired deals. Training difference +7.8125 percentage points has paired seed-cluster 95% interval [-10.9375,+26.5625], so neither improvement nor regression is established. All completed actual games and opponent rollouts have zero truncation. Counts3-6 pending. Neither raw model meets the 2p strength gate; preserve full qualification requirements." + "interim_decision": "Completed paired 2p and 3p screens do not qualify either raw policy. At 2p, H200 update29 28.125% versus warm start20.3125%, paired gain7.8125pp CI[-10.9375,26.5625]: uncertain. At 3p, update29 20.8333% versus warm start6.25%, paired gain14.5833pp CI[5.2083,23.9583]: evidence of transfer improvement on these eight development deals, but its own interval[12.5%,29.1667%] remains below one-third equal share. Four reports have complete seat/rule pairing, correct model hashes and zero game/search truncations. Counts4-6 pending; no promotion or final-seed use. Improvement from a weak starting point is not sufficient strength." } } From 5d1c2f4a28bcf38be536d8dd9afd9f5ac58fec09 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:03:23 +0200 Subject: [PATCH 128/184] Record four-player strong-opponent screening result --- ai/strong/experiments.json | 95 +++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index f59e5b6..12dc673 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17331,7 +17331,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac2f404719ba37615150", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2": { @@ -17969,6 +17969,96 @@ } }, "artifact_revision": "39994e449ae73641638a2443dee64e6eedb2efa3" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-4p-v2": { + "async_rollout": true, + "engine_workers": 128, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-4p", + "games": 128, + "win_rate": 0.1953125, + "truncated": 0, + "seconds": 1234.477901723, + "inference_p95_ms": 1.139249000016207, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 32, + "win_rate": 0.34375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.5 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 32, + "win_rate": 0.15625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.03125, + 0.28125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 32, + "win_rate": 0.21875, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 32, + "win_rate": 0.0625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.15625 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.125, + 0.265625 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 19485, + "evaluations": 1602368, + "truncated": 0 + } + }, + "artifact_revision": "ff40c4dc9a0f79b5317f9100ca9ddc665a56beda" } }, "paired_against_warm_start": { @@ -17989,6 +18079,7 @@ ] } }, - "interim_decision": "Completed paired 2p and 3p screens do not qualify either raw policy. At 2p, H200 update29 28.125% versus warm start20.3125%, paired gain7.8125pp CI[-10.9375,26.5625]: uncertain. At 3p, update29 20.8333% versus warm start6.25%, paired gain14.5833pp CI[5.2083,23.9583]: evidence of transfer improvement on these eight development deals, but its own interval[12.5%,29.1667%] remains below one-third equal share. Four reports have complete seat/rule pairing, correct model hashes and zero game/search truncations. Counts4-6 pending; no promotion or final-seed use. Improvement from a weak starting point is not sufficient strength." + "interim_decision": "Completed paired 2p and 3p screens do not qualify either raw policy. At 2p, H200 update29 28.125% versus warm start20.3125%, paired gain7.8125pp CI[-10.9375,26.5625]: uncertain. At 3p, update29 20.8333% versus warm start6.25%, paired gain14.5833pp CI[5.2083,23.9583]: evidence of transfer improvement on these eight development deals, but its own interval[12.5%,29.1667%] remains below one-third equal share. Four reports have complete seat/rule pairing, correct model hashes and zero game/search truncations. Counts4-6 pending; no promotion or final-seed use. Improvement from a weak starting point is not sufficient strength.", + "four_player_interim_decision": "Retained raw H200 update29 scores19.53125% on128games/8deals against search_geo, seed-cluster95%CI[12.5%,26.5625%]. Equal-share25% is inside the interval, so do not assert a statistically supported deficit; there is no supported superiority and the point estimate is below the32.5% qualification floor. Actual games and search rollouts all finish without truncation. Warm-start paired4p result pending; do not infer a training effect yet." } } From f575135dbac731126a1e6b0315bad6cdf35abde6 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:05:20 +0200 Subject: [PATCH 129/184] Record supported four-player PPO transfer gain without qualification --- ai/strong/experiments.json | 104 +++++++++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 12dc673..b42c283 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17411,7 +17411,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac32fbc85ba68235de93", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-5p-v2": { @@ -18059,6 +18059,96 @@ } }, "artifact_revision": "ff40c4dc9a0f79b5317f9100ca9ddc665a56beda" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-4p-v2": { + "async_rollout": true, + "engine_workers": 128, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-4p", + "games": 128, + "win_rate": 0.03125, + "truncated": 0, + "seconds": 1300.964938827, + "inference_p95_ms": 1.2332318999511924, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 32, + "win_rate": 0.03125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.09375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 32, + "win_rate": 0.0, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 32, + "win_rate": 0.0625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.15625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 32, + "win_rate": 0.03125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.09375 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.0078125, + 0.0546875 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 20479, + "evaluations": 1685184, + "truncated": 0 + } + }, + "artifact_revision": "c0adc00b8ea3fe5f447d226c5340ce3ad52a7386" } }, "paired_against_warm_start": { @@ -18077,9 +18167,17 @@ 0.05208333333333333, 0.23958333333333331 ] + }, + "4": { + "independent_deals": 8, + "difference": 0.1640625, + "paired_seed_bootstrap_95_interval": [ + 0.078125, + 0.25 + ] } }, - "interim_decision": "Completed paired 2p and 3p screens do not qualify either raw policy. At 2p, H200 update29 28.125% versus warm start20.3125%, paired gain7.8125pp CI[-10.9375,26.5625]: uncertain. At 3p, update29 20.8333% versus warm start6.25%, paired gain14.5833pp CI[5.2083,23.9583]: evidence of transfer improvement on these eight development deals, but its own interval[12.5%,29.1667%] remains below one-third equal share. Four reports have complete seat/rule pairing, correct model hashes and zero game/search truncations. Counts4-6 pending; no promotion or final-seed use. Improvement from a weak starting point is not sufficient strength.", - "four_player_interim_decision": "Retained raw H200 update29 scores19.53125% on128games/8deals against search_geo, seed-cluster95%CI[12.5%,26.5625%]. Equal-share25% is inside the interval, so do not assert a statistically supported deficit; there is no supported superiority and the point estimate is below the32.5% qualification floor. Actual games and search rollouts all finish without truncation. Warm-start paired4p result pending; do not infer a training effect yet." + "interim_decision": "Paired2-4p results complete. Training gains against search_geo are supported at3p and4p on eight development deals each, uncertain at2p. Neither raw policy meets the corresponding strength gates. Await5-6p and remaining authorized training checkpoints; final reserved seeds remain unused.", + "four_player_interim_decision": "Paired4p comparison complete: retained H200 update29 wins19.53125% versus warm-start3.125%, each128games/8deals. Gain16.40625pp has paired seed-cluster95%CI[7.8125,25.0], supporting transfer improvement on these development deals. Retained-policy interval[12.5%,26.5625%] includes equal-share25%, and point estimate remains below32.5% qualification floor. Both reports pass pairing, hash and zero actual/search truncation checks. Improvement from the weak warm start does not qualify the model. Counts5-6 pending." } } From ee9d5bc3cc329cb21f09d119349f716f8fb05dfe Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:23:44 +0200 Subject: [PATCH 130/184] Identify sealed-auction weakness hidden by five-player aggregate gain --- ai/strong/experiments.json | 95 +++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b42c283..ba74682 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17347,7 +17347,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac30fbc85ba68235de8d", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-h200-u29-raw-search-geo-h2400-6p-v2": { @@ -18149,6 +18149,96 @@ } }, "artifact_revision": "c0adc00b8ea3fe5f447d226c5340ce3ad52a7386" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2": { + "async_rollout": true, + "engine_workers": 160, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-5p", + "games": 160, + "win_rate": 0.3375, + "truncated": 0, + "seconds": 2414.599975093, + "inference_p95_ms": 1.2528380000020434, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 40, + "win_rate": 0.475, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.65 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 40, + "win_rate": 0.075, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.025, + 0.15 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 40, + "win_rate": 0.575, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 40, + "win_rate": 0.225, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15, + 0.3 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.28125, + 0.3875 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 30021, + "evaluations": 2470800, + "truncated": 0 + } + }, + "artifact_revision": "afc522c0c8e47c103b2f7085e68a7d1284cffd39" } }, "paired_against_warm_start": { @@ -18178,6 +18268,7 @@ } }, "interim_decision": "Paired2-4p results complete. Training gains against search_geo are supported at3p and4p on eight development deals each, uncertain at2p. Neither raw policy meets the corresponding strength gates. Await5-6p and remaining authorized training checkpoints; final reserved seeds remain unused.", - "four_player_interim_decision": "Paired4p comparison complete: retained H200 update29 wins19.53125% versus warm-start3.125%, each128games/8deals. Gain16.40625pp has paired seed-cluster95%CI[7.8125,25.0], supporting transfer improvement on these development deals. Retained-policy interval[12.5%,26.5625%] includes equal-share25%, and point estimate remains below32.5% qualification floor. Both reports pass pairing, hash and zero actual/search truncation checks. Improvement from the weak warm start does not qualify the model. Counts5-6 pending." + "four_player_interim_decision": "Paired4p comparison complete: retained H200 update29 wins19.53125% versus warm-start3.125%, each128games/8deals. Gain16.40625pp has paired seed-cluster95%CI[7.8125,25.0], supporting transfer improvement on these development deals. Retained-policy interval[12.5%,26.5625%] includes equal-share25%, and point estimate remains below32.5% qualification floor. Both reports pass pairing, hash and zero actual/search truncation checks. Improvement from the weak warm start does not qualify the model. Counts5-6 pending.", + "five_player_interim_decision": "Retained H200 update29 scores33.75% overall on160games/8deals, CI[28.125%,38.75%], above20% equal share. However original/open47.5%, original/sealed7.5% CI[2.5%,15%], recharged/open57.5%, recharged/sealed22.5% CI[15%,30%]. Original sealed has a supported deficit; recharged sealed superiority is unproven. Overall strength hides major sealed-auction weakness, so no qualification or aggregate-only promotion. All160games and2470800 opponent rollouts complete without truncation. Paired warm-start5p and both6p reports remain pending. Prioritize rule-specific sealed-auction diagnosis after the fixed cohort rather than infer universal strength from aggregate gains." } } From 4456df54b82515610024704b4273e2c9a0274ae3 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:24:51 +0200 Subject: [PATCH 131/184] Resolve five-player paired gains and isolate original sealed gap --- ai/strong/experiments.json | 158 ++++++++++++++++++++++++++++++++++++- 1 file changed, 155 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ba74682..5ca78f7 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17427,7 +17427,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac33404719ba37615157", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2": { @@ -18239,6 +18239,96 @@ } }, "artifact_revision": "afc522c0c8e47c103b2f7085e68a7d1284cffd39" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-5p-v2": { + "async_rollout": true, + "engine_workers": 160, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-5p", + "games": 160, + "win_rate": 0.05, + "truncated": 0, + "seconds": 2471.1648306869997, + "inference_p95_ms": 1.192698099995937, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 40, + "win_rate": 0.075, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.175 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 40, + "win_rate": 0.025, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.075 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 40, + "win_rate": 0.1, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.025, + 0.175 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 40, + "win_rate": 0.0, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.01875, + 0.0875 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 31608, + "evaluations": 2604384, + "truncated": 0 + } + }, + "artifact_revision": "9a9e65f7123ca06742fdf649e21a3f555c21dc20" } }, "paired_against_warm_start": { @@ -18265,10 +18355,72 @@ 0.078125, 0.25 ] + }, + "5": { + "independent_deals": 8, + "difference": 0.2875, + "paired_seed_bootstrap_95_interval": [ + 0.19375, + 0.36875 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games_per_candidate": 40, + "independent_deals": 8, + "candidate_win_rate": 0.475, + "warm_start_win_rate": 0.075, + "difference": 0.4, + "paired_seed_bootstrap_95_interval": [ + 0.125, + 0.6000000000000001 + ] + }, + { + "variant": "original", + "sealed": true, + "games_per_candidate": 40, + "independent_deals": 8, + "candidate_win_rate": 0.075, + "warm_start_win_rate": 0.025, + "difference": 0.05, + "paired_seed_bootstrap_95_interval": [ + -0.05, + 0.15000000000000002 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games_per_candidate": 40, + "independent_deals": 8, + "candidate_win_rate": 0.575, + "warm_start_win_rate": 0.1, + "difference": 0.47500000000000003, + "paired_seed_bootstrap_95_interval": [ + 0.30000000000000004, + 0.65 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games_per_candidate": 40, + "independent_deals": 8, + "candidate_win_rate": 0.225, + "warm_start_win_rate": 0.0, + "difference": 0.225, + "paired_seed_bootstrap_95_interval": [ + 0.15000000000000002, + 0.30000000000000004 + ] + } + ] } }, - "interim_decision": "Paired2-4p results complete. Training gains against search_geo are supported at3p and4p on eight development deals each, uncertain at2p. Neither raw policy meets the corresponding strength gates. Await5-6p and remaining authorized training checkpoints; final reserved seeds remain unused.", + "interim_decision": "Paired2-5p complete. Supported overall gains at3-5p, uncertain at2p; no universal raw-model qualification. Five-player original/sealed remains weak and its paired gain is uncertain. Await6p and remaining authorized training checkpoints; final reserved seeds unused.", "four_player_interim_decision": "Paired4p comparison complete: retained H200 update29 wins19.53125% versus warm-start3.125%, each128games/8deals. Gain16.40625pp has paired seed-cluster95%CI[7.8125,25.0], supporting transfer improvement on these development deals. Retained-policy interval[12.5%,26.5625%] includes equal-share25%, and point estimate remains below32.5% qualification floor. Both reports pass pairing, hash and zero actual/search truncation checks. Improvement from the weak warm start does not qualify the model. Counts5-6 pending.", - "five_player_interim_decision": "Retained H200 update29 scores33.75% overall on160games/8deals, CI[28.125%,38.75%], above20% equal share. However original/open47.5%, original/sealed7.5% CI[2.5%,15%], recharged/open57.5%, recharged/sealed22.5% CI[15%,30%]. Original sealed has a supported deficit; recharged sealed superiority is unproven. Overall strength hides major sealed-auction weakness, so no qualification or aggregate-only promotion. All160games and2470800 opponent rollouts complete without truncation. Paired warm-start5p and both6p reports remain pending. Prioritize rule-specific sealed-auction diagnosis after the fixed cohort rather than infer universal strength from aggregate gains." + "five_player_interim_decision": "Paired5p complete: retained H200 update29 wins33.75% versus warm-start5%, gain28.75pp paired95%CI[19.375,36.875],160games/8deals each. Per-rule paired gains: original/open40pp CI[12.5,60], original/sealed5pp CI[-5,15], recharged/open47.5pp CI[30,65], recharged/sealed22.5pp CI[15,30]. Original sealed remains the key unresolved training transfer gap: retained7.5% own95%CI[2.5,15] remains below20% equal share. Recharged sealed improves from zero but superiority over20% is unproven. No promotion despite aggregate gains; next diagnosis should trace original sealed auction decisions and outcome timing. All completed reports have verified hashes/pairings and zero game/search truncation. Both6p and training checkpoints pending." } } From b3290f9718ee01555558a41bdbc3005a369297ef Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:26:34 +0200 Subject: [PATCH 132/184] Validate H200 update49 export and dispatch paired screening --- ai/strong/experiments.json | 81 +++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 5ca78f7..a507122 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -128,7 +128,13 @@ "multiplayer-hard-e10-raw-search-geo-h2400-3p-v2": "6abdac32404719ba37615152", "multiplayer-hard-e10-raw-search-geo-h2400-4p-v2": "6abdac32fbc85ba68235de93", "multiplayer-hard-e10-raw-search-geo-h2400-5p-v2": "6abdac33404719ba37615157", - "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2": "6abdac34404719ba37615159" + "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2": "6abdac34404719ba37615159", + "multiplayer-h200-u49-economic-2p": "6abdb6b7fbc85ba68235e18e", + "multiplayer-h200-u49-economic-3p": "6abdb6b7fbc85ba68235e190", + "multiplayer-h200-u49-economic-4p": "6abdb6b8fbc85ba68235e193", + "multiplayer-h200-u49-economic-5p": "6abdb6b9404719ba37615331", + "multiplayer-h200-u49-economic-6p": "6abdb6b9404719ba37615333", + "multiplayer-h200-u49-a260-3p": "6abdb6bafbc85ba68235e195" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -18422,5 +18428,78 @@ "interim_decision": "Paired2-5p complete. Supported overall gains at3-5p, uncertain at2p; no universal raw-model qualification. Five-player original/sealed remains weak and its paired gain is uncertain. Await6p and remaining authorized training checkpoints; final reserved seeds unused.", "four_player_interim_decision": "Paired4p comparison complete: retained H200 update29 wins19.53125% versus warm-start3.125%, each128games/8deals. Gain16.40625pp has paired seed-cluster95%CI[7.8125,25.0], supporting transfer improvement on these development deals. Retained-policy interval[12.5%,26.5625%] includes equal-share25%, and point estimate remains below32.5% qualification floor. Both reports pass pairing, hash and zero actual/search truncation checks. Improvement from the weak warm start does not qualify the model. Counts5-6 pending.", "five_player_interim_decision": "Paired5p complete: retained H200 update29 wins33.75% versus warm-start5%, gain28.75pp paired95%CI[19.375,36.875],160games/8deals each. Per-rule paired gains: original/open40pp CI[12.5,60], original/sealed5pp CI[-5,15], recharged/open47.5pp CI[30,65], recharged/sealed22.5pp CI[15,30]. Original sealed remains the key unresolved training transfer gap: retained7.5% own95%CI[2.5,15] remains below20% equal share. Recharged sealed improves from zero but superiority over20% is unproven. No promotion despite aggregate gains; next diagnosis should trace original sealed auction decisions and outcome timing. All completed reports have verified hashes/pairings and zero game/search truncation. Both6p and training checkpoints pending." + }, + "multiplayer_h200_update49_screening": { + "candidate_revision": "d6adef40b2b836108cd4c3d2e384eefb67a133a0", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "training_games": 12000, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 2.4139881134033203e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-h200-u49-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abdb6b7fbc85ba68235e18e", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-h200-u49-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abdb6b7fbc85ba68235e190", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-h200-u49-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abdb6b8fbc85ba68235e193", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-h200-u49-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abdb6b9404719ba37615331", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u49-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abdb6b9404719ba37615333", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u49-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abdb6bafbc85ba68235e195", + "observed_stage": "SCHEDULING" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Await six complete paired screens; retain update29 until supported improvement. Internal best remains update39; screen new latest update49 explicitly." } } From 1cc4937c7b43853d43667ded29f53581ee5a2876 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:28:11 +0200 Subject: [PATCH 133/184] Collect first three H200 update49 paired screens --- ai/strong/experiments.json | 314 ++++++++++++++++++++++++++++++++++++- 1 file changed, 310 insertions(+), 4 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a507122..96e0d58 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -18458,21 +18458,21 @@ "players": 2, "opponent": "economic", "job_id": "6abdb6b7fbc85ba68235e18e", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-economic-3p", "players": 3, "opponent": "economic", "job_id": "6abdb6b7fbc85ba68235e190", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-economic-4p", "players": 4, "opponent": "economic", "job_id": "6abdb6b8fbc85ba68235e193", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-economic-5p", @@ -18500,6 +18500,312 @@ "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Await six complete paired screens; retain update29 until supported improvement. Internal best remains update39; screen new latest update49 explicitly." + "decision": "Interim: 2-4p economic screens complete (1440games), all zero actual/search truncation and correct paired seeds/hashes. Win rates51.875%,57.395833%,57.1875%. Paired changes versus retained update29 are-1.5625pp CI[-10,6.5625],-2.916667pp CI[-7.916667,2.1875],+0.78125pp CI[-4.53125,6.25]; no supported gain. Await5p,6p and frozen A260 before complete comparison; no promotion.", + "reports": { + "multiplayer-h200-u49-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.51875, + "truncated": 0, + "seconds": 23.843398569999863, + "inference_p95_ms": 0.35980000016024855, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.575 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.425, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.5375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.7375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.55, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.675 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.575 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "25837673070c484e58af49f136f3d84b7d19ce25" + }, + "multiplayer-h200-u49-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5739583333333333, + "truncated": 0, + "seconds": 29.194970452000234, + "inference_p95_ms": 0.3806619002261868, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.48333333333333334, + 0.6833333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.4666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.39166666666666666, + 0.5416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.575, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.5791666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.6791666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.528125, + 0.6239583333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "25837673070c484e58af49f136f3d84b7d19ce25" + }, + "multiplayer-h200-u49-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.571875, + "truncated": 0, + "seconds": 40.342280506156385, + "inference_p95_ms": 0.41211163625121117, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.49375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.40625, + 0.58125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.38125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.30625, + 0.45625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.725, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65625, + 0.79375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.6875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.60625, + 0.76875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.525, + 0.615625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "25837673070c484e58af49f136f3d84b7d19ce25" + } + }, + "paired_against_h200_u29": { + "multiplayer-h200-u49-economic-2p": { + "independent_deals": 40, + "difference": -0.015625, + "paired_seed_bootstrap_95_interval": [ + -0.1, + 0.065625 + ] + }, + "multiplayer-h200-u49-economic-3p": { + "independent_deals": 40, + "difference": -0.029166666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.07916666666666668, + 0.021875 + ] + }, + "multiplayer-h200-u49-economic-4p": { + "independent_deals": 40, + "difference": 0.0078125, + "paired_seed_bootstrap_95_interval": [ + -0.0453125, + 0.0625 + ] + } + }, + "paired_against_h200_u39": { + "multiplayer-h200-u49-economic-2p": { + "independent_deals": 40, + "difference": -0.0296875, + "paired_seed_bootstrap_95_interval": [ + -0.1, + 0.0421875 + ] + }, + "multiplayer-h200-u49-economic-3p": { + "independent_deals": 40, + "difference": -0.022916666666666672, + "paired_seed_bootstrap_95_interval": [ + -0.078125, + 0.034375 + ] + }, + "multiplayer-h200-u49-economic-4p": { + "independent_deals": 40, + "difference": 0.003125, + "paired_seed_bootstrap_95_interval": [ + -0.04765625, + 0.0546875 + ] + } + } } } From 7a4504ff06ebad2e47a19cf775cf292249959285 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:30:32 +0200 Subject: [PATCH 134/184] Complete H200 update49 screening and test six-player gain against search --- ai/strong/experiments.json | 334 ++++++++++++++++++++++++++++++++++++- 1 file changed, 328 insertions(+), 6 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 96e0d58..902e06a 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -134,7 +134,8 @@ "multiplayer-h200-u49-economic-4p": "6abdb6b8fbc85ba68235e193", "multiplayer-h200-u49-economic-5p": "6abdb6b9404719ba37615331", "multiplayer-h200-u49-economic-6p": "6abdb6b9404719ba37615333", - "multiplayer-h200-u49-a260-3p": "6abdb6bafbc85ba68235e195" + "multiplayer-h200-u49-a260-3p": "6abdb6bafbc85ba68235e195", + "multiplayer-h200-u49-raw-search-geo-h2400-6p": "6abdb7a0404719ba37615356" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -18479,28 +18480,28 @@ "players": 5, "opponent": "economic", "job_id": "6abdb6b9404719ba37615331", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abdb6b9404719ba37615333", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abdb6bafbc85ba68235e195", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Interim: 2-4p economic screens complete (1440games), all zero actual/search truncation and correct paired seeds/hashes. Win rates51.875%,57.395833%,57.1875%. Paired changes versus retained update29 are-1.5625pp CI[-10,6.5625],-2.916667pp CI[-7.916667,2.1875],+0.78125pp CI[-4.53125,6.25]; no supported gain. Await5p,6p and frozen A260 before complete comparison; no promotion.", + "decision": "Completed3680games, all verified paired seats/rules/hash and zero truncation. Versus retained update29 only6p economic improves with paired95%CI excluding zero: +5.520833pp CI[1.041667,10]. Other five paired differences uncertain. Frozen A26038.125% CI[33.3333,42.9167] remains below40% floor; original/sealed30%, and3/4rule intervals do not exclude equal share. Versus update39,6p economic and A260 gains supported, but this does not prove improvement over retained update29 at A260. Preserve update49 as a promising6p research candidate; no universal promotion. Launch paired6p search_geo diagnostic before attributing independent strength to the economic-bot gain.", "reports": { "multiplayer-h200-u49-economic-2p": { "async_rollout": false, @@ -18753,6 +18754,258 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "25837673070c484e58af49f136f3d84b7d19ce25" + }, + "multiplayer-h200-u49-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.765, + "truncated": 0, + "seconds": 45.347156088999995, + "inference_p95_ms": 0.424177999997255, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.73, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.665, + 0.795 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.72, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.655, + 0.785 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.85, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.79, + 0.9 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.76, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.695, + 0.82 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.73125, + 0.7975 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "71ca7607f407c2d122ecc6b735a6b38b1b06041b" + }, + "multiplayer-h200-u49-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.7375, + "truncated": 0, + "seconds": 51.717031529999986, + "inference_p95_ms": 0.42063749999812206, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.7291666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6625, + 0.7916666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6791666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6166666666666667, + 0.7416666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.8041666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7458333333333333, + 0.8583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.7375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.675, + 0.8 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7, + 0.7739843749999996 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "71ca7607f407c2d122ecc6b735a6b38b1b06041b" + }, + "multiplayer-h200-u49-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.38125, + "truncated": 0, + "seconds": 75.464404352, + "inference_p95_ms": 0.4063510000094084, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.30833333333333335, + 0.49166666666666664 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.3, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.225, + 0.38333333333333336 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.44166666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3416666666666667, + 0.5416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.38333333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.4666666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.42916666666666664 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "71ca7607f407c2d122ecc6b735a6b38b1b06041b" } }, "paired_against_h200_u29": { @@ -18779,6 +19032,30 @@ -0.0453125, 0.0625 ] + }, + "multiplayer-h200-u49-economic-5p": { + "independent_deals": 40, + "difference": 0.0018750000000000017, + "paired_seed_bootstrap_95_interval": [ + -0.0375, + 0.03937499999999999 + ] + }, + "multiplayer-h200-u49-economic-6p": { + "independent_deals": 40, + "difference": 0.055208333333333325, + "paired_seed_bootstrap_95_interval": [ + 0.010416666666666666, + 0.1 + ] + }, + "multiplayer-h200-u49-a260-3p": { + "independent_deals": 40, + "difference": 0.026041666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.03229166666666667, + 0.084375 + ] } }, "paired_against_h200_u39": { @@ -18805,7 +19082,52 @@ -0.04765625, 0.0546875 ] + }, + "multiplayer-h200-u49-economic-5p": { + "independent_deals": 40, + "difference": 0.0225, + "paired_seed_bootstrap_95_interval": [ + -0.0175, + 0.06375 + ] + }, + "multiplayer-h200-u49-economic-6p": { + "independent_deals": 40, + "difference": 0.04375, + "paired_seed_bootstrap_95_interval": [ + 0.004166666666666666, + 0.08333333333333334 + ] + }, + "multiplayer-h200-u49-a260-3p": { + "independent_deals": 40, + "difference": 0.06458333333333333, + "paired_seed_bootstrap_95_interval": [ + 0.006250000000000001, + 0.125 + ] } } + }, + "multiplayer_h200_update49_six_player_search_screen": { + "status": "RUNNING", + "run": "multiplayer-h200-u49-raw-search-geo-h2400-6p", + "job_id": "6abdb7a0404719ba37615356", + "observed_stage": "RUNNING", + "candidate_revision": "d6adef40b2b836108cd4c3d2e384eefb67a133a0", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "source_revision": "37465b08df007221665d796448aea57e6828257e", + "opponent": "search_geo", + "player_count": 6, + "games": 192, + "independent_deals": 8, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "deal_offset": 0, + "candidate_search_samples": 0, + "candidate_geographic_search": false, + "search_max_steps": 2400, + "async_arena": true, + "analysis_plan": "Validate full report and pair exact gameSeed/rule/seat sets with retained update29 and original hard epoch10 search transfer reports. Seed-cluster paired bootstrap20000 draws seed623. Eight development deals diagnostic only; preserve all strength gates and final reserved seeds." } } From e4d0295a3274f279cad97dec646cd9b793176cd1 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:31:58 +0200 Subject: [PATCH 135/184] Diagnose city and capacity deficits in sealed-auction losses --- ai/strong/experiments.json | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 902e06a..63a9eff 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -19129,5 +19129,99 @@ "search_max_steps": 2400, "async_arena": true, "analysis_plan": "Validate full report and pair exact gameSeed/rule/seat sets with retained update29 and original hard epoch10 search transfer reports. Seed-cluster paired bootstrap20000 draws seed623. Eight development deals diagnostic only; preserve all strength gates and final reserved seeds." + }, + "multiplayer_h200_update29_five_player_terminal_audit": { + "run": "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 40, + "losses": 21, + "loss_counts": { + "cities_below_winner_power": 16, + "capacity_below_winner_power": 5, + "powered_below_city_capacity_ceiling": 1, + "money_above_winner_mean": 10 + }, + "loss_medians": { + "money": 30, + "cities": 14, + "capacity": 17, + "powered": 14, + "winner_powered": 15, + "round": 10 + } + }, + { + "variant": "original", + "sealed": true, + "games": 40, + "losses": 37, + "loss_counts": { + "cities_below_winner_power": 28, + "capacity_below_winner_power": 13, + "powered_below_city_capacity_ceiling": 1, + "money_above_winner_mean": 18 + }, + "loss_medians": { + "money": 19, + "cities": 14, + "capacity": 15, + "powered": 14, + "winner_powered": 16, + "round": 10 + } + }, + { + "variant": "recharged", + "sealed": false, + "games": 40, + "losses": 17, + "loss_counts": { + "cities_below_winner_power": 14, + "capacity_below_winner_power": 4, + "powered_below_city_capacity_ceiling": 0, + "money_above_winner_mean": 11 + }, + "loss_medians": { + "money": 27, + "cities": 14, + "capacity": 16, + "powered": 14, + "winner_powered": 15, + "round": 9 + } + }, + { + "variant": "recharged", + "sealed": true, + "games": 40, + "losses": 31, + "loss_counts": { + "cities_below_winner_power": 28, + "capacity_below_winner_power": 14, + "powered_below_city_capacity_ceiling": 1, + "money_above_winner_mean": 13 + }, + "loss_medians": { + "money": 17, + "cities": 13, + "capacity": 16, + "powered": 13, + "winner_powered": 16, + "round": 9 + } + } + ], + "limitations": [ + "Descriptive terminal audit of the eight-deal diagnostic cohort; repeated seats/rules are correlated.", + "City/capacity deficits can overlap. Powered below min(cities,capacity) does not by itself establish fuel shortage or a policy bug.", + "Final money does not establish whether earlier bids, plants, fuel or connections were affordable; causality requires trajectories or controlled replays." + ], + "artifact_revision": "afc522c0c8e47c103b2f7085e68a7d1284cffd39", + "status": "COMPLETED_DESCRIPTIVE_AUDIT", + "decision": "Trace building timing and auction spending jointly in original/sealed replays. In37losses,28 finish with fewer cities than winner powered count,13 with insufficient generation capacity, and only1 below their own city/capacity output ceiling. The rule split does not by itself establish bidding as the cause; avoid a fuel-only or bidding-only fix without trajectory evidence." } } From 89e0bf57551bdf0e8231eb6fffa939824bf37605 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:36:33 +0200 Subject: [PATCH 136/184] Capture exact original-sealed replay for spending and growth diagnosis --- ai/strong/experiments.json | 147 +++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 63a9eff..1f62e7d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -19223,5 +19223,152 @@ "artifact_revision": "afc522c0c8e47c103b2f7085e68a7d1284cffd39", "status": "COMPLETED_DESCRIPTIVE_AUDIT", "decision": "Trace building timing and auction spending jointly in original/sealed replays. In37losses,28 finish with fewer cities than winner powered count,13 with insufficient generation capacity, and only1 below their own city/capacity output ceiling. The rule split does not by itself establish bidding as the cause; avoid a fuel-only or bidding-only fix without trajectory evidence." + }, + "multiplayer_original_sealed_replay_v1": { + "exact_terminal_replay": true, + "selection": "First original/sealed loss in sorted gameSeed,seat order; illustrative, not representative sampling.", + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-0", + "seat": 0, + "episode": 0, + "actions_logged": 602, + "seconds": 124.73933792800017, + "ledger": [ + { + "round": 1, + "kind": "plant_purchase", + "plants": [ + 3 + ], + "money_before": 50, + "money_after": 47, + "paid": 3 + }, + { + "round": 1, + "kind": "building_finished", + "money": 13, + "cities": 2, + "capacity": 1 + }, + { + "round": 2, + "kind": "building_finished", + "money": 29, + "cities": 2, + "capacity": 1 + }, + { + "round": 3, + "kind": "plant_purchase", + "plants": [ + 23 + ], + "money_before": 51, + "money_after": 23, + "paid": 28 + }, + { + "round": 3, + "kind": "building_finished", + "money": 8, + "cities": 2, + "capacity": 4 + }, + { + "round": 4, + "kind": "building_finished", + "money": 14, + "cities": 3, + "capacity": 4 + }, + { + "round": 5, + "kind": "plant_purchase", + "plants": [ + 26 + ], + "money_before": 58, + "money_after": 16, + "paid": 42 + }, + { + "round": 5, + "kind": "building_finished", + "money": 10, + "cities": 3, + "capacity": 9 + }, + { + "round": 6, + "kind": "plant_purchase", + "plants": [ + 12 + ], + "money_before": 54, + "money_after": 42, + "paid": 12 + }, + { + "round": 6, + "kind": "building_finished", + "money": 15, + "cities": 4, + "capacity": 10 + }, + { + "round": 7, + "kind": "building_finished", + "money": 16, + "cities": 6, + "capacity": 10 + }, + { + "round": 8, + "kind": "plant_purchase", + "plants": [ + 29 + ], + "money_before": 89, + "money_after": 59, + "paid": 30 + }, + { + "round": 8, + "kind": "building_finished", + "money": 10, + "cities": 8, + "capacity": 12 + }, + { + "round": 9, + "kind": "building_finished", + "money": 23, + "cities": 11, + "capacity": 12 + }, + { + "round": 10, + "kind": "plant_purchase", + "plants": [ + 50 + ], + "money_before": 135, + "money_after": 78, + "paid": 57 + }, + { + "round": 10, + "kind": "building_finished", + "money": 15, + "cities": 13, + "capacity": 15 + } + ], + "trace_sha256": "073371fe900b47197c15b2e1b7d9c5a41bc91b823ccc21e51ffcb38ef742c252", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "finding": "This trajectory buys plant26 for42 in round5, leaving16 before resources and10 at building end, with3cities versus9capacity. Round6 adds plant12 for12 and ends with4cities versus10capacity. Final13cities/15capacity loses to15powered. Illustrates early generation spending preceding delayed city growth; it does not prove the purchases were inferior or a universal bidding bug.", + "next_diagnostic": "Controlled replay alternatives at round5 purchase and building choices, with complete continuations and unchanged public-information constraints; test more trajectories before changing training rewards or policy.", + "artifact_revision": "0861fa682f9cd0dfae45db4557d1f716b398daea" } } From ef790594e105d8c96e19ce4a7028d269270461d4 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:40:47 +0200 Subject: [PATCH 137/184] Test legal lower sealed bid in exact replay without claiming strength --- ai/strong/experiments.json | 160 +++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 1f62e7d..bbe3418 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -19370,5 +19370,165 @@ "finding": "This trajectory buys plant26 for42 in round5, leaving16 before resources and10 at building end, with3cities versus9capacity. Round6 adds plant12 for12 and ends with4cities versus10capacity. Final13cities/15capacity loses to15powered. Illustrates early generation spending preceding delayed city growth; it does not prove the purchases were inferior or a universal bidding bug.", "next_diagnostic": "Controlled replay alternatives at round5 purchase and building choices, with complete continuations and unchanged public-information constraints; test more trajectories before changing training rewards or policy.", "artifact_revision": "0861fa682f9cd0dfae45db4557d1f716b398daea" + }, + "multiplayer_original_sealed_counterfactual_v1": { + "status": "COMPLETED_SINGLE_TRAJECTORY_DIAGNOSTIC", + "source_replay_revision": "0861fa682f9cd0dfae45db4557d1f716b398daea", + "exact_prefix_replay": true, + "intervention_index": 218, + "intervention": { + "requested": { + "name": "Bid", + "data": 50 + }, + "action": { + "name": "Bid", + "data": 26 + } + }, + "baseline_terminal": { + "round": 10, + "players": [ + { + "cities": 13, + "powered": 13, + "money": 15, + "capacity": 15, + "plants": [ + 26, + 29, + 50 + ] + }, + { + "cities": 12, + "powered": 12, + "money": 13, + "capacity": 18, + "plants": [ + 34, + 39, + 46 + ] + }, + { + "cities": 12, + "powered": 12, + "money": 4, + "capacity": 14, + "plants": [ + 25, + 37, + 35 + ] + }, + { + "cities": 15, + "powered": 15, + "money": 12, + "capacity": 16, + "plants": [ + 27, + 31, + 38 + ] + }, + { + "cities": 15, + "powered": 15, + "money": 20, + "capacity": 15, + "plants": [ + 24, + 33, + 36 + ] + } + ] + }, + "alternative_terminal": { + "round": 10, + "players": [ + { + "cities": 15, + "powered": 14, + "money": 36, + "capacity": 14, + "plants": [ + 24, + 21, + 39 + ] + }, + { + "cities": 13, + "powered": 13, + "money": 12, + "capacity": 15, + "plants": [ + 26, + 27, + 36 + ] + }, + { + "cities": 13, + "powered": 13, + "money": 10, + "capacity": 15, + "plants": [ + 25, + 33, + 50 + ] + }, + { + "cities": 13, + "powered": 13, + "money": 3, + "capacity": 17, + "plants": [ + 31, + 34, + 30 + ] + }, + { + "cities": 15, + "powered": 15, + "money": 0, + "capacity": 16, + "plants": [ + 20, + 29, + 38 + ] + } + ] + }, + "baseline_win": 0, + "alternative_win": 0, + "actual_truncated": false, + "search_stats": { + "search_geo": { + "decisions": 178, + "evaluations": 14944, + "truncated": 0 + } + }, + "trace_sha256": "186834b06e8b85c6d7eee70da2ec73789debcfa2136b74bb4079d1e5bfed6805", + "pass_branch": { + "status": "REJECTED_ILLEGAL_ALTERNATIVE", + "reason": "No Pass action in legal candidate set at round5 Bid for nominated plant26; no terminal outcome was generated.", + "next_legal_location": "An earlier auction nomination decision would need separate legality validation and replay." + }, + "limitations": [ + "One selected losing trajectory, not an independent strength estimate.", + "Single bid changed from50 to26; subsequent unchanged policies and random streams evolve with the changed game.", + "Result remains a loss; higher final powered/city count does not establish better expected win probability.", + "Bridge policyMoves counts the requested Bid at the overridden move; executed action is recorded in trace." + ], + "decision": "The lower bid yields15cities/14powered/36cash versus baseline13cities/13powered/15cash, but both lose. Do not hardcode a bid cap or infer causality across sealed games. Further legal counterfactuals and repeated public-belief continuations are required before training changes.", + "artifact_revision": "3878b0883aca1cefa9eca9ca242141bbca260d9e" } } From 7e9c8dd6a6abb251e7d7f98b7152a5a8d92409bb Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:48:21 +0200 Subject: [PATCH 138/184] Screen geographic checkpoint39 and record six-player rule imbalance --- ai/strong/experiments.json | 205 ++++++++++++++++++++++++++++++++++++- 1 file changed, 202 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index bbe3418..114c3b3 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -135,7 +135,13 @@ "multiplayer-h200-u49-economic-5p": "6abdb6b9404719ba37615331", "multiplayer-h200-u49-economic-6p": "6abdb6b9404719ba37615333", "multiplayer-h200-u49-a260-3p": "6abdb6bafbc85ba68235e195", - "multiplayer-h200-u49-raw-search-geo-h2400-6p": "6abdb7a0404719ba37615356" + "multiplayer-h200-u49-raw-search-geo-h2400-6p": "6abdb7a0404719ba37615356", + "multiplayer-geoleague-u39-economic-2p": "6abdbbbbfbc85ba68235e2cd", + "multiplayer-geoleague-u39-economic-3p": "6abdbbbc404719ba37615424", + "multiplayer-geoleague-u39-economic-4p": "6abdbbbdfbc85ba68235e2cf", + "multiplayer-geoleague-u39-economic-5p": "6abdbbbdfbc85ba68235e2d1", + "multiplayer-geoleague-u39-economic-6p": "6abdbbbefbc85ba68235e2d3", + "multiplayer-geoleague-u39-a260-3p": "6abdbbbffbc85ba68235e2d5" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -17370,7 +17376,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac30fbc85ba68235de8f", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false }, "multiplayer-hard-e10-raw-search-geo-h2400-2p-v2": { @@ -18336,6 +18342,96 @@ } }, "artifact_revision": "9a9e65f7123ca06742fdf649e21a3f555c21dc20" + }, + "multiplayer-h200-u29-raw-search-geo-h2400-6p-v2": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.3697916666666667, + "truncated": 0, + "seconds": 3869.067510446, + "inference_p95_ms": 1.1855946999389744, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.5, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3958333333333333, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.1875, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.25 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.5416666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.25, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.3958333333333333 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.4270833333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 43855, + "evaluations": 3575856, + "truncated": 0 + } + }, + "artifact_revision": "41df7f2afd3bab0a2c2bad8cb5d707c22ea25007" } }, "paired_against_warm_start": { @@ -18428,7 +18524,8 @@ }, "interim_decision": "Paired2-5p complete. Supported overall gains at3-5p, uncertain at2p; no universal raw-model qualification. Five-player original/sealed remains weak and its paired gain is uncertain. Await6p and remaining authorized training checkpoints; final reserved seeds unused.", "four_player_interim_decision": "Paired4p comparison complete: retained H200 update29 wins19.53125% versus warm-start3.125%, each128games/8deals. Gain16.40625pp has paired seed-cluster95%CI[7.8125,25.0], supporting transfer improvement on these development deals. Retained-policy interval[12.5%,26.5625%] includes equal-share25%, and point estimate remains below32.5% qualification floor. Both reports pass pairing, hash and zero actual/search truncation checks. Improvement from the weak warm start does not qualify the model. Counts5-6 pending.", - "five_player_interim_decision": "Paired5p complete: retained H200 update29 wins33.75% versus warm-start5%, gain28.75pp paired95%CI[19.375,36.875],160games/8deals each. Per-rule paired gains: original/open40pp CI[12.5,60], original/sealed5pp CI[-5,15], recharged/open47.5pp CI[30,65], recharged/sealed22.5pp CI[15,30]. Original sealed remains the key unresolved training transfer gap: retained7.5% own95%CI[2.5,15] remains below20% equal share. Recharged sealed improves from zero but superiority over20% is unproven. No promotion despite aggregate gains; next diagnosis should trace original sealed auction decisions and outcome timing. All completed reports have verified hashes/pairings and zero game/search truncation. Both6p and training checkpoints pending." + "five_player_interim_decision": "Paired5p complete: retained H200 update29 wins33.75% versus warm-start5%, gain28.75pp paired95%CI[19.375,36.875],160games/8deals each. Per-rule paired gains: original/open40pp CI[12.5,60], original/sealed5pp CI[-5,15], recharged/open47.5pp CI[30,65], recharged/sealed22.5pp CI[15,30]. Original sealed remains the key unresolved training transfer gap: retained7.5% own95%CI[2.5,15] remains below20% equal share. Recharged sealed improves from zero but superiority over20% is unproven. No promotion despite aggregate gains; next diagnosis should trace original sealed auction decisions and outcome timing. All completed reports have verified hashes/pairings and zero game/search truncation. Both6p and training checkpoints pending.", + "six_player_interim_decision": "Retained raw H200 update29 completed192games/8deals against search_geo:36.979167% CI[31.25%,42.708333%]. Open rules50%/54.166667% show gains over16.6667% equal share; original sealed18.75% CI[12.5%,25%] and recharged sealed25% CI[12.5%,39.583333%] do not establish superiority. Original sealed point below25% floor. All games and3575856 opponent rollouts untruncated. Aggregate advantage is promising but no qualification; paired warm start pending and update49 comparison running." }, "multiplayer_h200_update49_screening": { "candidate_revision": "d6adef40b2b836108cd4c3d2e384eefb67a133a0", @@ -19530,5 +19627,107 @@ ], "decision": "The lower bid yields15cities/14powered/36cash versus baseline13cities/13powered/15cash, but both lose. Do not hardcode a bid cap or infer causality across sealed games. Further legal counterfactuals and repeated public-belief continuations are required before training changes.", "artifact_revision": "3878b0883aca1cefa9eca9ca242141bbca260d9e" + }, + "multiplayer_geoleague_update39_screening": { + "candidate_revision": "8f3c53baede66c9ab26bf3f056825d65950d8890", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "training_games": 9600, + "training_truncated": 0, + "export_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 317, + "output": 0, + "player_count": 2, + "mismatches": [ + { + "index": [ + 0, + 1 + ], + "torch32": 0.0012531280517578125, + "onnx32": 0.0012407302856445312, + "reference64": 0.0012526222476694215 + } + ], + "torch_max_error": 7.864087958608934e-07, + "onnx_max_error": 1.189196202489029e-05, + "winning_margin": 9.66277571274246 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 3.0100345611572266e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {}, + "strict_failure": "Position317,2p, logit[0,1]:ONNX0.0012407302856445312 versusTorch0.0012531280517578125; default rtol1e-4/atol1e-5 fails. Float64reference0.0012526222476694215; no tolerance change." + }, + "strict_export_parity_passed": false, + "jobs": [ + { + "run": "multiplayer-geoleague-u39-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abdbbbbfbc85ba68235e2cd", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-geoleague-u39-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abdbbbc404719ba37615424", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-geoleague-u39-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abdbbbdfbc85ba68235e2cf", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u39-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abdbbbdfbc85ba68235e2d1", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u39-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abdbbbefbc85ba68235e2d3", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u39-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abdbbbffbc85ba68235e2d5", + "observed_stage": "SCHEDULING" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Internal best remains update19; evaluate latest39 explicitly.", + "qualification_eligible": false } } From e978b0ba80bb47595bb20fae7d53cca0cb9c5275 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:49:26 +0200 Subject: [PATCH 139/184] Collect first geographic update39 research screens --- ai/strong/experiments.json | 232 ++++++++++++++++++++++++++++++++++++- 1 file changed, 228 insertions(+), 4 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 114c3b3..6d99c0b 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -19685,14 +19685,14 @@ "players": 2, "opponent": "economic", "job_id": "6abdbbbbfbc85ba68235e2cd", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u39-economic-3p", "players": 3, "opponent": "economic", "job_id": "6abdbbbc404719ba37615424", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u39-economic-4p", @@ -19727,7 +19727,231 @@ "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Internal best remains update19; evaluate latest39 explicitly.", - "qualification_eligible": false + "decision": "Interim research-only screen:2p economic55.78125% and3p economic55.416667%,800games across40deals/count with verified model hashes, exact seat/rule pairs and zero truncation. Versus retained geoleague update19, paired gains3.90625pp CI[-4.21875,12.03125] and1.354167pp CI[-4.6875,7.5] are uncertain. Await other four screens; no promotion. Strict export parity still fails one near-zero logit despite2553 matching actions; qualification_eligible remains false.", + "qualification_eligible": false, + "reports": { + "multiplayer-geoleague-u39-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8f3c53baede66c9ab26bf3f056825d65950d8890/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.5578125, + "truncated": 0, + "seconds": 24.10616613100001, + "inference_p95_ms": 0.36452019994612783, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.6375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3375, + 0.5625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.7125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6125, + 0.8125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.53125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.63125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.509375, + 0.6046875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "6d022ff3ff13c1622651a1c2aa9cb4a8c5943f18" + }, + "multiplayer-geoleague-u39-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8f3c53baede66c9ab26bf3f056825d65950d8890/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5541666666666667, + "truncated": 0, + "seconds": 29.419854412786663, + "inference_p95_ms": 0.4020548891276123, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.36666666666666664, + 0.5583333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.4083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.49166666666666664 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65, + 0.825 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5083333333333333, + 0.7083333333333334 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5104166666666666, + 0.5958333333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "6d022ff3ff13c1622651a1c2aa9cb4a8c5943f18" + } + }, + "paired_against_geoleague_u19": { + "multiplayer-geoleague-u39-economic-2p": { + "independent_deals": 40, + "difference": 0.0390625, + "paired_seed_bootstrap_95_interval": [ + -0.0421875, + 0.1203125 + ] + }, + "multiplayer-geoleague-u39-economic-3p": { + "independent_deals": 40, + "difference": 0.013541666666666665, + "paired_seed_bootstrap_95_interval": [ + -0.04687499999999999, + 0.075 + ] + } + }, + "paired_against_geoleague_u29": { + "multiplayer-geoleague-u39-economic-2p": { + "independent_deals": 40, + "difference": 0.0359375, + "paired_seed_bootstrap_95_interval": [ + -0.040625, + 0.109375 + ] + }, + "multiplayer-geoleague-u39-economic-3p": { + "independent_deals": 40, + "difference": 0.004166666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.039583333333333325, + 0.04583333333333333 + ] + } + }, + "paired_against_h200_u49": { + "multiplayer-geoleague-u39-economic-2p": { + "independent_deals": 40, + "difference": 0.0390625, + "paired_seed_bootstrap_95_interval": [ + -0.034375, + 0.1109375 + ] + }, + "multiplayer-geoleague-u39-economic-3p": { + "independent_deals": 40, + "difference": -0.019791666666666673, + "paired_seed_bootstrap_95_interval": [ + -0.08645833333333333, + 0.04583333333333332 + ] + } + } } } From 247174b64dd96c7ba96f91c7809b3e9f65101e94 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:50:29 +0200 Subject: [PATCH 140/184] Complete 1280-game strong-opponent transfer audit across player counts --- ai/strong/experiments.json | 177 +++++++++++++++++++++++++++++++++++-- 1 file changed, 169 insertions(+), 8 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 6d99c0b..a05e9d4 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -17281,7 +17281,7 @@ "decision": "Do not promote using internal best or training win rates. Complete current runs and keep independent checkpoint screening. Future league redesign should decouple opponent admission from this sparse heuristic-only selection and measure whether a diverse retained pool improves held-out strength." }, "multiplayer_h200_update29_strong_opponent_transfer_screen": { - "status": "RUNNING", + "status": "COMPLETED", "purpose": "Test whether raw-policy PPO improvements over its warm start transfer to a stronger independent geographic search baseline across all counts. Neither learner uses online search.", "source": { "archive": "strong-source-v32.tgz", @@ -17456,7 +17456,7 @@ "search_max_steps": 2400, "async_arena": true, "job_id": "6abdac34404719ba37615159", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_geographic_search": false } }, @@ -18432,6 +18432,96 @@ } }, "artifact_revision": "41df7f2afd3bab0a2c2bad8cb5d707c22ea25007" + }, + "multiplayer-hard-e10-raw-search-geo-h2400-6p-v2": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/ab34dd266010ded1c9a6c818c721e5505dd1ddeb/runs/multiplayer-distillation-v2-hard/best.onnx", + "model_sha256": "b0521ab8dd978833658f4bc3bef05b6ab7e6f10bf17966700c6834d25012f62c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.10416666666666667, + "truncated": 0, + "seconds": 3985.7409409320003, + "inference_p95_ms": 1.1848322999924221, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.14583333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.22916666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.041666666666666664, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.10416666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.16666666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.0625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.14583333333333334 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.140625 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 45384, + "evaluations": 3700784, + "truncated": 0 + } + }, + "artifact_revision": "6d022ff3ff13c1622651a1c2aa9cb4a8c5943f18" } }, "paired_against_warm_start": { @@ -18520,12 +18610,83 @@ ] } ] + }, + "6": { + "independent_deals": 8, + "difference": 0.265625, + "paired_seed_bootstrap_95_interval": [ + 0.19791666666666669, + 0.3385416666666667 + ], + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games_per_candidate": 48, + "independent_deals": 8, + "candidate_win_rate": 0.5, + "warm_start_win_rate": 0.14583333333333334, + "difference": 0.35416666666666663, + "paired_seed_bootstrap_95_interval": [ + 0.22916666666666666, + 0.47916666666666663 + ] + }, + { + "variant": "original", + "sealed": true, + "games_per_candidate": 48, + "independent_deals": 8, + "candidate_win_rate": 0.1875, + "warm_start_win_rate": 0.041666666666666664, + "difference": 0.14583333333333331, + "paired_seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.20833333333333331 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games_per_candidate": 48, + "independent_deals": 8, + "candidate_win_rate": 0.5416666666666666, + "warm_start_win_rate": 0.16666666666666666, + "difference": 0.375, + "paired_seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.5833333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games_per_candidate": 48, + "independent_deals": 8, + "candidate_win_rate": 0.25, + "warm_start_win_rate": 0.0625, + "difference": 0.1875, + "paired_seed_bootstrap_95_interval": [ + 0.020833333333333332, + 0.375 + ] + } + ] } }, - "interim_decision": "Paired2-5p complete. Supported overall gains at3-5p, uncertain at2p; no universal raw-model qualification. Five-player original/sealed remains weak and its paired gain is uncertain. Await6p and remaining authorized training checkpoints; final reserved seeds unused.", + "interim_decision": "Completed all1280games/10reports. H200 update29 versus original hard epoch10 shows supported paired gains on8development deals/count at3p(+14.5833pp),4p(+16.40625pp),5p(+28.75pp),6p(+26.5625pp CI[19.791667,33.854167]);2p gain uncertain. Overall search-reference point rates28.125%,20.8333%,19.53125%,33.75%,36.979167% at2-6p. No universal qualification:2-4p fail strength floors and5-6p have unresolved sealed-rule weaknesses. Preserve these as evidence of PPO transfer, not expert strength. Continue fixed training horizons and update49 six-player search comparison; diagnose original sealed decisions before next training design. Reserved final seeds remain unused.", "four_player_interim_decision": "Paired4p comparison complete: retained H200 update29 wins19.53125% versus warm-start3.125%, each128games/8deals. Gain16.40625pp has paired seed-cluster95%CI[7.8125,25.0], supporting transfer improvement on these development deals. Retained-policy interval[12.5%,26.5625%] includes equal-share25%, and point estimate remains below32.5% qualification floor. Both reports pass pairing, hash and zero actual/search truncation checks. Improvement from the weak warm start does not qualify the model. Counts5-6 pending.", "five_player_interim_decision": "Paired5p complete: retained H200 update29 wins33.75% versus warm-start5%, gain28.75pp paired95%CI[19.375,36.875],160games/8deals each. Per-rule paired gains: original/open40pp CI[12.5,60], original/sealed5pp CI[-5,15], recharged/open47.5pp CI[30,65], recharged/sealed22.5pp CI[15,30]. Original sealed remains the key unresolved training transfer gap: retained7.5% own95%CI[2.5,15] remains below20% equal share. Recharged sealed improves from zero but superiority over20% is unproven. No promotion despite aggregate gains; next diagnosis should trace original sealed auction decisions and outcome timing. All completed reports have verified hashes/pairings and zero game/search truncation. Both6p and training checkpoints pending.", - "six_player_interim_decision": "Retained raw H200 update29 completed192games/8deals against search_geo:36.979167% CI[31.25%,42.708333%]. Open rules50%/54.166667% show gains over16.6667% equal share; original sealed18.75% CI[12.5%,25%] and recharged sealed25% CI[12.5%,39.583333%] do not establish superiority. Original sealed point below25% floor. All games and3575856 opponent rollouts untruncated. Aggregate advantage is promising but no qualification; paired warm start pending and update49 comparison running." + "six_player_interim_decision": "Completed paired6p:36.979167% versus10.416667%, gain26.5625pp CI[19.791667,33.854167]. All384paired games and search rollouts untruncated. Retained original/sealed18.75% and recharged/sealed25% have intervals including equal share; original sealed point misses25% floor. No qualification despite aggregate advantage.", + "completion_audit": { + "games": 1280, + "reports": 10, + "search_rollouts": 17742848, + "game_truncations": 0, + "search_truncations": 0, + "paired_model_hashes_checked": true, + "exact_seat_rule_seed_pairs_checked": true + } }, "multiplayer_h200_update49_screening": { "candidate_revision": "d6adef40b2b836108cd4c3d2e384eefb67a133a0", @@ -19699,28 +19860,28 @@ "players": 4, "opponent": "economic", "job_id": "6abdbbbdfbc85ba68235e2cf", - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-geoleague-u39-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abdbbbdfbc85ba68235e2d1", - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-geoleague-u39-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abdbbbefbc85ba68235e2d3", - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-geoleague-u39-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abdbbbffbc85ba68235e2d5", - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" } ], "status": "RUNNING", From 3e4c264d98982a2c2cf6171558061e269ae6149d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 03:56:33 +0200 Subject: [PATCH 141/184] Complete geographic update39 screening without candidate promotion --- ai/strong/experiments.json | 450 ++++++++++++++++++++++++++++++++++++- 1 file changed, 444 insertions(+), 6 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a05e9d4..551ecbb 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -19860,35 +19860,35 @@ "players": 4, "opponent": "economic", "job_id": "6abdbbbdfbc85ba68235e2cf", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u39-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abdbbbdfbc85ba68235e2d1", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u39-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abdbbbefbc85ba68235e2d3", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u39-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abdbbbffbc85ba68235e2d5", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Interim research-only screen:2p economic55.78125% and3p economic55.416667%,800games across40deals/count with verified model hashes, exact seat/rule pairs and zero truncation. Versus retained geoleague update19, paired gains3.90625pp CI[-4.21875,12.03125] and1.354167pp CI[-4.6875,7.5] are uncertain. Await other four screens; no promotion. Strict export parity still fails one near-zero logit despite2553 matching actions; qualification_eligible remains false.", + "decision": "Completed research-only screen: 3680 games, 40 independent deals per player count, exact model hashes and seat/rule pairs verified, zero actual-game or search truncation. Economic win rates for 2\u20136 players: 55.78125%, 55.416667%, 52.34375%, 63.875%, 57.916667%; A260 3p: 29.583333%. All six paired intervals against geographic update19 include zero: no supported improvement. Against geographic update29, 4p regresses by 6.09375 percentage points (95% paired seed interval -11.25 to -0.78125); other differences uncertain. Against H200 update49, supported deficits at 5p (-12.625 points), 6p (-15.833333 points), and A260 3p (-8.541667 points). Do not promote. Strict export parity also remains failed on one near-zero logit despite all 2553 matching actions. Preserve existing training horizons and reserved final seeds.", "qualification_eligible": false, "reports": { "multiplayer-geoleague-u39-economic-2p": { @@ -20058,6 +20058,342 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "6d022ff3ff13c1622651a1c2aa9cb4a8c5943f18" + }, + "multiplayer-geoleague-u39-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8f3c53baede66c9ab26bf3f056825d65950d8890/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5234375, + "truncated": 0, + "seconds": 39.493547398000004, + "inference_p95_ms": 0.40366449999851284, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.53125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44375, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.35, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.425 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.69375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.61875, + 0.76875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.51875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.43125, + 0.60625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.475, + 0.5703125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "dea8a5b3c175fe78c8e9150b0fc4dd4570faef9d" + }, + "multiplayer-geoleague-u39-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8f3c53baede66c9ab26bf3f056825d65950d8890/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.63875, + "truncated": 0, + "seconds": 45.446101498999994, + "inference_p95_ms": 0.4178070000001803, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.48, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.555 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.63, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.555, + 0.7 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.71, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.63, + 0.7875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.735, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.67, + 0.795 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.59125, + 0.6825 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "dea8a5b3c175fe78c8e9150b0fc4dd4570faef9d" + }, + "multiplayer-geoleague-u39-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8f3c53baede66c9ab26bf3f056825d65950d8890/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.5791666666666667, + "truncated": 0, + "seconds": 52.398058068, + "inference_p95_ms": 0.4313895499976183, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.5501041666666652 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.6833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6208333333333333, + 0.7417708333333318 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6708333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.7333333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5416666666666666, + 0.6166666666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "dea8a5b3c175fe78c8e9150b0fc4dd4570faef9d" + }, + "multiplayer-geoleague-u39-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/8f3c53baede66c9ab26bf3f056825d65950d8890/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "c3198e7fe044b213f885512b9f0821112c522817b631b34c04cfaa7f255dd38d", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.29583333333333334, + "truncated": 0, + "seconds": 69.09088197500002, + "inference_p95_ms": 0.40144629999758763, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.275, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19166666666666668, + 0.36666666666666664 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.21666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.13333333333333333, + 0.30833333333333335 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.44166666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.25, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.18333333333333332, + 0.31666666666666665 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.25, + 0.33958333333333335 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "dea8a5b3c175fe78c8e9150b0fc4dd4570faef9d" } }, "paired_against_geoleague_u19": { @@ -20076,6 +20412,38 @@ -0.04687499999999999, 0.075 ] + }, + "multiplayer-geoleague-u39-economic-4p": { + "independent_deals": 40, + "difference": -0.040625, + "paired_seed_bootstrap_95_interval": [ + -0.0875, + 0.0078125 + ] + }, + "multiplayer-geoleague-u39-economic-5p": { + "independent_deals": 40, + "difference": -0.045, + "paired_seed_bootstrap_95_interval": [ + -0.094375, + 0.0025000000000000014 + ] + }, + "multiplayer-geoleague-u39-economic-6p": { + "independent_deals": 40, + "difference": -0.04010416666666666, + "paired_seed_bootstrap_95_interval": [ + -0.08645833333333333, + 0.0046875 + ] + }, + "multiplayer-geoleague-u39-a260-3p": { + "independent_deals": 40, + "difference": -0.029166666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.0875, + 0.029166666666666664 + ] } }, "paired_against_geoleague_u29": { @@ -20094,6 +20462,38 @@ -0.039583333333333325, 0.04583333333333333 ] + }, + "multiplayer-geoleague-u39-economic-4p": { + "independent_deals": 40, + "difference": -0.0609375, + "paired_seed_bootstrap_95_interval": [ + -0.1125, + -0.0078125 + ] + }, + "multiplayer-geoleague-u39-economic-5p": { + "independent_deals": 40, + "difference": -0.015000000000000003, + "paired_seed_bootstrap_95_interval": [ + -0.056874999999999995, + 0.026875 + ] + }, + "multiplayer-geoleague-u39-economic-6p": { + "independent_deals": 40, + "difference": -0.01614583333333334, + "paired_seed_bootstrap_95_interval": [ + -0.05104166666666667, + 0.019270833333333334 + ] + }, + "multiplayer-geoleague-u39-a260-3p": { + "independent_deals": 40, + "difference": -0.00625, + "paired_seed_bootstrap_95_interval": [ + -0.06041666666666666, + 0.04999999999999999 + ] } }, "paired_against_h200_u49": { @@ -20112,7 +20512,45 @@ -0.08645833333333333, 0.04583333333333332 ] + }, + "multiplayer-geoleague-u39-economic-4p": { + "independent_deals": 40, + "difference": -0.0484375, + "paired_seed_bootstrap_95_interval": [ + -0.10625, + 0.0109375 + ] + }, + "multiplayer-geoleague-u39-economic-5p": { + "independent_deals": 40, + "difference": -0.12625, + "paired_seed_bootstrap_95_interval": [ + -0.1825, + -0.0725 + ] + }, + "multiplayer-geoleague-u39-economic-6p": { + "independent_deals": 40, + "difference": -0.15833333333333335, + "paired_seed_bootstrap_95_interval": [ + -0.209375, + -0.10625 + ] + }, + "multiplayer-geoleague-u39-a260-3p": { + "independent_deals": 40, + "difference": -0.08541666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.15833333333333333, + -0.014583333333333332 + ] } + }, + "completion_audit": { + "games": 3680, + "reports": 6, + "truncated": 0, + "qualification_eligible": false } } } From 420c316d636726dc1af31977919579693a7e9555 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:05:02 +0200 Subject: [PATCH 142/184] Audit auction-mode performance and training gains across player counts --- ai/strong/experiments.json | 682 +++++++++++++++++++++++++++++++++++++ 1 file changed, 682 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 551ecbb..27a3590 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -20552,5 +20552,687 @@ "truncated": 0, "qualification_eligible": false } + }, + "multiplayer_raw_search_auction_gap_audit": { + "scope": "Existing eight development deals per count, raw models against search_geo16, Germany 2\u20136 players. Exploratory paired rule contrasts; no new games or reserved final seeds. Intervals are marginal, not multiplicity-adjusted. Rule changes alter trajectories, so this is not a causal auction-only effect.", + "models": { + "h200-u29": { + "2": { + "artifact_revision": "8fcda890c08b9e8b03de86304d3b47a4e8ad588e", + "by_variant": { + "original": { + "open": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3125 + ] + }, + "sealed": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.3125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.4375 + ] + }, + "sealed_minus_open": 0.1875, + "paired_seed_bootstrap_95_interval": [ + -0.0625, + 0.4375 + ] + }, + "recharged": { + "open": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.5 + ] + }, + "sealed": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.3125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.5625 + ] + }, + "sealed_minus_open": -0.0625, + "paired_seed_bootstrap_95_interval": [ + -0.3125, + 0.1875 + ] + } + } + }, + "3": { + "artifact_revision": "3e2098dc0e6e3ef56371a1c4fd86b73aa7ec0a9a", + "by_variant": { + "original": { + "open": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.2916666666666667, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.4583333333333333 + ] + }, + "sealed": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.20833333333333334, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.2916666666666667 + ] + }, + "sealed_minus_open": -0.08333333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.29166666666666663, + 0.08333333333333333 + ] + }, + "recharged": { + "open": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.20833333333333334, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.375 + ] + }, + "sealed": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.25 + ] + }, + "sealed_minus_open": -0.08333333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.25, + 0.08333333333333333 + ] + } + } + }, + "4": { + "artifact_revision": "ff40c4dc9a0f79b5317f9100ca9ddc665a56beda", + "by_variant": { + "original": { + "open": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.34375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.5 + ] + }, + "sealed": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.15625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.03125, + 0.28125 + ] + }, + "sealed_minus_open": -0.1875, + "paired_seed_bootstrap_95_interval": [ + -0.40625, + 0.03125 + ] + }, + "recharged": { + "open": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.21875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.375 + ] + }, + "sealed": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.0625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.15625 + ] + }, + "sealed_minus_open": -0.15625, + "paired_seed_bootstrap_95_interval": [ + -0.28125, + -0.03125 + ] + } + } + }, + "5": { + "artifact_revision": "afc522c0c8e47c103b2f7085e68a7d1284cffd39", + "by_variant": { + "original": { + "open": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.475, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.65 + ] + }, + "sealed": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.075, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.025, + 0.15 + ] + }, + "sealed_minus_open": -0.4, + "paired_seed_bootstrap_95_interval": [ + -0.575, + -0.225 + ] + }, + "recharged": { + "open": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.575, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.75 + ] + }, + "sealed": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.225, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15, + 0.3 + ] + }, + "sealed_minus_open": -0.35, + "paired_seed_bootstrap_95_interval": [ + -0.525, + -0.2 + ] + } + } + }, + "6": { + "artifact_revision": "41df7f2afd3bab0a2c2bad8cb5d707c22ea25007", + "by_variant": { + "original": { + "open": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.5, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3958333333333333, + 0.625 + ] + }, + "sealed": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.1875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.25 + ] + }, + "sealed_minus_open": -0.3125, + "paired_seed_bootstrap_95_interval": [ + -0.4375, + -0.20833333333333331 + ] + }, + "recharged": { + "open": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.5416666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.6666666666666666 + ] + }, + "sealed": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.25, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.125, + 0.3958333333333333 + ] + }, + "sealed_minus_open": -0.29166666666666663, + "paired_seed_bootstrap_95_interval": [ + -0.47916666666666663, + -0.0625 + ] + } + } + } + }, + "hard-e10": { + "2": { + "artifact_revision": "2ce72e8875627f7c2e8917dab5e36a3b78e2172c", + "by_variant": { + "original": { + "open": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3125 + ] + }, + "sealed": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.25, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.4375 + ] + }, + "sealed_minus_open": 0.125, + "paired_seed_bootstrap_95_interval": [ + 0.0, + 0.3125 + ] + }, + "recharged": { + "open": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.3125 + ] + }, + "sealed": { + "games": 16, + "independent_seeds": 8, + "win_rate": 0.3125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.5625 + ] + }, + "sealed_minus_open": 0.1875, + "paired_seed_bootstrap_95_interval": [ + 0.0625, + 0.375 + ] + } + } + }, + "3": { + "artifact_revision": "39994e449ae73641638a2443dee64e6eedb2efa3", + "by_variant": { + "original": { + "open": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.25 + ] + }, + "sealed": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.08333333333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.25 + ] + }, + "sealed_minus_open": -0.041666666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.20833333333333331, + 0.20833333333333331 + ] + }, + "recharged": { + "open": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.041666666666666664, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.125 + ] + }, + "sealed": { + "games": 24, + "independent_seeds": 8, + "win_rate": 0.0, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + }, + "sealed_minus_open": -0.041666666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.125, + 0.0 + ] + } + } + }, + "4": { + "artifact_revision": "c0adc00b8ea3fe5f447d226c5340ce3ad52a7386", + "by_variant": { + "original": { + "open": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.03125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.09375 + ] + }, + "sealed": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.0, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + }, + "sealed_minus_open": -0.03125, + "paired_seed_bootstrap_95_interval": [ + -0.09375, + 0.0 + ] + }, + "recharged": { + "open": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.0625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.15625 + ] + }, + "sealed": { + "games": 32, + "independent_seeds": 8, + "win_rate": 0.03125, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.09375 + ] + }, + "sealed_minus_open": -0.03125, + "paired_seed_bootstrap_95_interval": [ + -0.125, + 0.0625 + ] + } + } + }, + "5": { + "artifact_revision": "9a9e65f7123ca06742fdf649e21a3f555c21dc20", + "by_variant": { + "original": { + "open": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.075, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.175 + ] + }, + "sealed": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.025, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.075 + ] + }, + "sealed_minus_open": -0.05, + "paired_seed_bootstrap_95_interval": [ + -0.125, + 0.0 + ] + }, + "recharged": { + "open": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.1, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.025, + 0.175 + ] + }, + "sealed": { + "games": 40, + "independent_seeds": 8, + "win_rate": 0.0, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.0 + ] + }, + "sealed_minus_open": -0.1, + "paired_seed_bootstrap_95_interval": [ + -0.17500000000000002, + -0.025 + ] + } + } + }, + "6": { + "artifact_revision": "6d022ff3ff13c1622651a1c2aa9cb4a8c5943f18", + "by_variant": { + "original": { + "open": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.14583333333333334, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0625, + 0.22916666666666666 + ] + }, + "sealed": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.041666666666666664, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.10416666666666667 + ] + }, + "sealed_minus_open": -0.10416666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.22916666666666666, + 0.020833333333333336 + ] + }, + "recharged": { + "open": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.16666666666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.2916666666666667 + ] + }, + "sealed": { + "games": 48, + "independent_seeds": 8, + "win_rate": 0.0625, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.0, + 0.14583333333333334 + ] + }, + "sealed_minus_open": -0.10416666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.2708333333333333, + 0.08333333333333333 + ] + } + } + } + } + }, + "training_gain_interaction": { + "2": { + "original": { + "sealed_training_gain_minus_open_training_gain": 0.0625, + "paired_seed_bootstrap_95_interval": [ + -0.25, + 0.375 + ] + }, + "recharged": { + "sealed_training_gain_minus_open_training_gain": -0.25, + "paired_seed_bootstrap_95_interval": [ + -0.5625, + 0.0625 + ] + } + }, + "3": { + "original": { + "sealed_training_gain_minus_open_training_gain": -0.041666666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.4593749999999991, + 0.29166666666666663 + ] + }, + "recharged": { + "sealed_training_gain_minus_open_training_gain": -0.041666666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.16666666666666666, + 0.08333333333333333 + ] + } + }, + "4": { + "original": { + "sealed_training_gain_minus_open_training_gain": -0.15625, + "paired_seed_bootstrap_95_interval": [ + -0.40625, + 0.0625 + ] + }, + "recharged": { + "sealed_training_gain_minus_open_training_gain": -0.125, + "paired_seed_bootstrap_95_interval": [ + -0.3125, + 0.0625 + ] + } + }, + "5": { + "original": { + "sealed_training_gain_minus_open_training_gain": -0.35, + "paired_seed_bootstrap_95_interval": [ + -0.5, + -0.15000000000000002 + ] + }, + "recharged": { + "sealed_training_gain_minus_open_training_gain": -0.25, + "paired_seed_bootstrap_95_interval": [ + -0.4, + -0.1 + ] + } + }, + "6": { + "original": { + "sealed_training_gain_minus_open_training_gain": -0.20833333333333331, + "paired_seed_bootstrap_95_interval": [ + -0.3333333333333333, + -0.08333333333333333 + ] + }, + "recharged": { + "sealed_training_gain_minus_open_training_gain": -0.1875, + "paired_seed_bootstrap_95_interval": [ + -0.5416666666666666, + 0.20833333333333331 + ] + } + } + }, + "decision": "Exploratory evidence concentrates the open/sealed performance gap at higher player counts. Retained H200 update29 has sealed deficits in both variants at 5p and 6p with marginal paired intervals excluding zero, and in Recharged 4p. Training-gain contrasts must be read separately: low baseline performance can conceal an existing weakness. Two and three player gap intervals include zero; general strength there is inadequate rather than a proven sealed-specific failure. Prioritize multi-trajectory auction/build-budget diagnosis for higher counts before changing rewards or bid rules. No candidate promotion, final qualification, or causal claim follows from this eight-deal audit." } } From 216ee4894bafb2468a845a25334d24d28e6a9185 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:11:07 +0200 Subject: [PATCH 143/184] Record exact sealed auction replay on a second independent deal --- ai/strong/experiments.json | 193 +++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 27a3590..52d0df3 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -21234,5 +21234,198 @@ } }, "decision": "Exploratory evidence concentrates the open/sealed performance gap at higher player counts. Retained H200 update29 has sealed deficits in both variants at 5p and 6p with marginal paired intervals excluding zero, and in Recharged 4p. Training-gain contrasts must be read separately: low baseline performance can conceal an existing weakness. Two and three player gap intervals include zero; general strength there is inadequate rather than a proven sealed-specific failure. Prioritize multi-trajectory auction/build-budget diagnosis for higher counts before changing rewards or bid rules. No candidate promotion, final qualification, or causal claim follows from this eight-deal audit." + }, + "multiplayer_original_sealed_replay_second_deal_v1": { + "exact_terminal_replay": true, + "selection": "First original/sealed loss by seat on the second distinct losing deal in sorted gameSeed order; illustrative, not representative sampling.", + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "seat": 0, + "episode": 20, + "actions_logged": 537, + "seconds": 124.00193229800061, + "ledger": [ + { + "round": 1, + "kind": "plant_purchase", + "plants": [ + 10 + ], + "money_before": 50, + "money_after": 40, + "paid": 10 + }, + { + "round": 1, + "kind": "building_finished", + "money": 5, + "cities": 2, + "capacity": 2 + }, + { + "round": 2, + "kind": "plant_purchase", + "plants": [ + 12 + ], + "money_before": 38, + "money_after": 20, + "paid": 18 + }, + { + "round": 2, + "kind": "building_finished", + "money": 3, + "cities": 2, + "capacity": 4 + }, + { + "round": 3, + "kind": "building_finished", + "money": 27, + "cities": 2, + "capacity": 4 + }, + { + "round": 4, + "kind": "plant_purchase", + "plants": [ + 37 + ], + "money_before": 60, + "money_after": 23, + "paid": 37 + }, + { + "round": 4, + "kind": "building_finished", + "money": 23, + "cities": 2, + "capacity": 8 + }, + { + "round": 5, + "kind": "building_finished", + "money": 6, + "cities": 4, + "capacity": 8 + }, + { + "round": 6, + "kind": "building_finished", + "money": 18, + "cities": 6, + "capacity": 8 + }, + { + "round": 7, + "kind": "building_finished", + "money": 22, + "cities": 9, + "capacity": 8 + }, + { + "round": 8, + "kind": "plant_purchase", + "plants": [ + 21 + ], + "money_before": 112, + "money_after": 88, + "paid": 24 + }, + { + "round": 8, + "kind": "building_finished", + "money": 24, + "cities": 11, + "capacity": 10 + }, + { + "round": 9, + "kind": "plant_purchase", + "plants": [ + 38 + ], + "money_before": 129, + "money_after": 79, + "paid": 50 + }, + { + "round": 9, + "kind": "building_finished", + "money": 4, + "cities": 14, + "capacity": 15 + } + ], + "final": { + "round": 9, + "players": [ + { + "cities": 14, + "powered": 14, + "money": 4, + "capacity": 15, + "plants": [ + 37, + 21, + 38 + ] + }, + { + "cities": 10, + "powered": 10, + "money": 25, + "capacity": 16, + "plants": [ + 20, + 32, + 34 + ] + }, + { + "cities": 11, + "powered": 11, + "money": 28, + "capacity": 16, + "plants": [ + 26, + 29, + 36 + ] + }, + { + "cities": 13, + "powered": 13, + "money": 17, + "capacity": 13, + "plants": [ + 28, + 27, + 31 + ] + }, + { + "cities": 15, + "powered": 15, + "money": 60, + "capacity": 15, + "plants": [ + 25, + 30, + 33 + ] + } + ] + }, + "trace_sha256": "8a43e942b3444c4c0c716cd6b85d45a49d86f68d00160ce27630ded7dcbf48fc", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "finding": "Second distinct deal reproduces all 537 moves and exact terminal/search outcomes. At round4 the learner buys plant37 for37, leaving23 cash, ends building with2 cities versus8 capacity, and reaches4 cities next round. It finishes round9 with14 cities powered versus a winner at15, despite15 capacity. This repeats generation capacity running ahead of city growth in an independently selected deal; it does not prove the purchase or build choice was inferior. Building connectivity costs and future income must be evaluated before intervention.", + "next_diagnostic": "Compare legal alternatives before the round4 plant37 nomination/purchase, and actual affordable building choices. Use complete continuations and avoid treating a lower bid as equivalent to avoiding purchase.", + "artifact_revision": "6e4e29e56df04be457aa4287d9b4ce84ca5c42dc", + "artifact_path": "runs/original-sealed-replay-second-deal-v1", + "local_trace": "ai/runs/sealed-replay/second-deal/trace.jsonl", + "training_performed": false } } From 5d2a6cc7726d3868a11d8ac5c050c47090cd24b0 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:12:36 +0200 Subject: [PATCH 144/184] Identify forced building pass and legal auction alternatives in second replay --- ai/strong/experiments.json | 65 +++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 52d0df3..a451a16 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -21426,6 +21426,69 @@ "artifact_revision": "6e4e29e56df04be457aa4287d9b4ce84ca5c42dc", "artifact_path": "runs/original-sealed-replay-second-deal-v1", "local_trace": "ai/runs/sealed-replay/second-deal/trace.jsonl", - "training_performed": false + "training_performed": false, + "legal_options_audit": { + "artifact_revision": "881394f491b18d12c450113b34261cb80914378e", + "artifact_path": "runs/original-sealed-replay-second-deal-v1/legal-options.json", + "exact_all_before_after_states": true, + "actions": 537, + "round4_nomination": { + "index": 186, + "round": 4, + "phase": "Auction", + "action": { + "name": "ChoosePowerPlant", + "data": 37 + }, + "money": 60, + "cities": [ + "K\u00f6ln", + "Aachen" + ], + "legal": [ + { + "name": "ChoosePowerPlant", + "data": 14 + }, + { + "name": "ChoosePowerPlant", + "data": 23 + }, + { + "name": "ChoosePowerPlant", + "data": 24 + }, + { + "name": "ChoosePowerPlant", + "data": 37 + }, + { + "name": "Pass", + "data": true + } + ] + }, + "round4_building": { + "index": 198, + "round": 4, + "phase": "Building", + "action": { + "name": "Pass", + "data": true + }, + "money": 23, + "cities": [ + "K\u00f6ln", + "Aachen" + ], + "legal": [ + { + "name": "Pass", + "data": true + } + ] + }, + "finding": "All 537 root moves are legal and every captured before/after state matches direct engine replay. Round4 building Pass is the sole legal action at23 cash: no voluntary refusal of an affordable city. At index186 with60 cash the learner instead has legal nomination choices14,23,24,37 and Pass. Plant37 is acquired at face value37, so reducing its bid is not an available intervention. The next controlled alternative should be Pass at nomination, with exact prefix and complete continuation. This does not yet show that passing improves outcome." + } } } From 05840e34cf4cd7c5519df80b14f097c116d851cf Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:15:21 +0200 Subject: [PATCH 145/184] Record worse outcome after legal auction pass on second sealed deal --- ai/strong/experiments.json | 245 +++++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a451a16..27db575 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -21490,5 +21490,250 @@ }, "finding": "All 537 root moves are legal and every captured before/after state matches direct engine replay. Round4 building Pass is the sole legal action at23 cash: no voluntary refusal of an affordable city. At index186 with60 cash the learner instead has legal nomination choices14,23,24,37 and Pass. Plant37 is acquired at face value37, so reducing its bid is not an available intervention. The next controlled alternative should be Pass at nomination, with exact prefix and complete continuation. This does not yet show that passing improves outcome." } + }, + "multiplayer_original_sealed_second_deal_pass_v1": { + "exact_prefix_replay": true, + "intervention_index": 186, + "intervention": { + "requested": { + "name": "ChoosePowerPlant", + "data": 37 + }, + "action": { + "name": "Pass", + "data": true + } + }, + "terminal": { + "env": 0, + "episode": 20, + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "truncated": false, + "value": [ + 0, + 0, + 0, + 0, + 1 + ], + "playerCount": 5, + "variant": "original", + "sealed": true, + "steps": 539, + "roles": [ + "learner", + "search_geo", + "search_geo", + "search_geo", + "search_geo" + ], + "policyMoves": { + "ChoosePowerPlant": 10, + "Bid": 14, + "BuyResource": 30, + "Pass": 37, + "Build": 13, + "UsePowerPlant": 11, + "DiscardPowerPlant": 2 + }, + "searchStats": { + "search_geo": { + "decisions": 156, + "evaluations": 13232, + "truncated": 0 + } + }, + "final": { + "round": 9, + "players": [ + { + "cities": 13, + "powered": 12, + "money": 4, + "capacity": 15, + "plants": [ + 23, + 30, + 31 + ] + }, + { + "cities": 8, + "powered": 8, + "money": 23, + "capacity": 16, + "plants": [ + 32, + 29, + 50 + ] + }, + { + "cities": 11, + "powered": 11, + "money": 26, + "capacity": 16, + "plants": [ + 26, + 21, + 38 + ] + }, + { + "cities": 13, + "powered": 13, + "money": 19, + "capacity": 15, + "plants": [ + 28, + 24, + 46 + ] + }, + { + "cities": 17, + "powered": 17, + "money": 4, + "capacity": 18, + "plants": [ + 25, + 36, + 39 + ] + } + ] + } + }, + "counter_limitation": "bridge policyMoves counts the requested action at the single overridden move; trace contains actual executed action", + "selection": "First original/sealed loss by seat on second distinct losing deal; single-trajectory diagnostic, not representative sampling.", + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "seat": 0, + "episode": 20, + "actions_logged": 539, + "seconds": 106.28592136299994, + "baseline_final": { + "round": 9, + "players": [ + { + "cities": 14, + "powered": 14, + "money": 4, + "capacity": 15, + "plants": [ + 37, + 21, + 38 + ] + }, + { + "cities": 10, + "powered": 10, + "money": 25, + "capacity": 16, + "plants": [ + 20, + 32, + 34 + ] + }, + { + "cities": 11, + "powered": 11, + "money": 28, + "capacity": 16, + "plants": [ + 26, + 29, + 36 + ] + }, + { + "cities": 13, + "powered": 13, + "money": 17, + "capacity": 13, + "plants": [ + 28, + 27, + 31 + ] + }, + { + "cities": 15, + "powered": 15, + "money": 60, + "capacity": 15, + "plants": [ + 25, + 30, + 33 + ] + } + ] + }, + "building_ledger": [ + { + "round": 1, + "cities": 2, + "money": 5, + "capacity": 2 + }, + { + "round": 2, + "cities": 2, + "money": 3, + "capacity": 4 + }, + { + "round": 3, + "cities": 2, + "money": 27, + "capacity": 4 + }, + { + "round": 4, + "cities": 4, + "money": 5, + "capacity": 4 + }, + { + "round": 5, + "cities": 4, + "money": 16, + "capacity": 7 + }, + { + "round": 6, + "cities": 5, + "money": 10, + "capacity": 11 + }, + { + "round": 7, + "cities": 6, + "money": 15, + "capacity": 15 + }, + { + "round": 8, + "cities": 9, + "money": 18, + "capacity": 15 + }, + { + "round": 9, + "cities": 13, + "money": 4, + "capacity": 15 + } + ], + "trace_sha256": "ce0863e246c07fd7aee4fd4408fb1c20538ac06f3cc251a963411831b2da2f53", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "finding": "Passing instead of nominating plant37 does not rescue this deal: learner ends with13 cities/12 powered versus baseline14/14; winner improves from15 to17 powered. Both lose. Exact prefix at action186, complete539-move continuation and13232 opponent search rollouts without truncation. Early spare generation capacity alone does not justify a rule to avoid buying. Full trajectories diverge after intervention; this single fixed hidden-world comparison is not an estimate of public-information expected value.", + "next_diagnostic": "Compare cheaper legal plant choices and inspect why alternative ends with12 powered despite13 cities and15 capacity; use multiple public-consistent continuations before general policy changes.", + "artifact_revision": "b793353f1ac5a6d07aa2a43461500c36cb76b330", + "artifact_path": "runs/original-sealed-second-deal-pass-v1", + "training_performed": false } } From cc25990ae5201d75bbe875edfe602ec7f27ea058 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:17:16 +0200 Subject: [PATCH 146/184] Verify affordable uranium omission in sealed counterfactual endgame --- ai/strong/experiments.json | 39 +++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 27db575..7a7dff2 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -21734,6 +21734,43 @@ "next_diagnostic": "Compare cheaper legal plant choices and inspect why alternative ends with12 powered despite13 cities and15 capacity; use multiple public-consistent continuations before general policy changes.", "artifact_revision": "b793353f1ac5a6d07aa2a43461500c36cb76b330", "artifact_path": "runs/original-sealed-second-deal-pass-v1", - "training_performed": false + "training_performed": false, + "final_round_fuel_audit": { + "artifact_revision": "04b807cb61fcdc4f491f31f2b1d1a4d411625865", + "artifact_path": "runs/original-sealed-second-deal-pass-v1", + "exact_all_states_and_legal_moves": 539, + "resource_pass_index": 500, + "cash_at_resource_pass": 102, + "uranium_price": 1, + "fuel_owned": { + "coal": 3, + "garbage": 3, + "uranium": 0 + }, + "plants": [ + 23, + 30, + 31 + ], + "subsequent_city_costs": [ + 25, + 23, + 26, + 24 + ], + "fixed_suffix_intervention": { + "action": "Buy one uranium immediately before resource Pass", + "exact_prefix": true, + "remaining_recorded_actions_all_legal": true, + "terminal": true, + "cities": 13, + "powered": 13, + "cash": 3, + "baseline_powered": 12, + "baseline_cash": 4, + "outcome_unchanged_loss": true + }, + "interpretation": "Concrete feasible extra powered city: buying one uranium still permits every recorded later build. This is a fixed-action continuation, not rerunning neural/search policies after intervention, and not an increase in win probability: winner remains17 powered. Do not turn this single losing-deal score improvement into a claim of general strength or automatically alter reward." + } } } From 8cbe344bf951d686b9738797490bfcb12ea032a8 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:21:00 +0200 Subject: [PATCH 147/184] Reject cheaper-plant shortcut after complete sealed nomination comparison --- ai/strong/experiments.json | 385 +++++++++++++++++++++++++++++++++++++ 1 file changed, 385 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 7a7dff2..ed4c8ef 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -21772,5 +21772,390 @@ }, "interpretation": "Concrete feasible extra powered city: buying one uranium still permits every recorded later build. This is a fixed-action continuation, not rerunning neural/search policies after intervention, and not an increase in win probability: winner remains17 powered. Do not turn this single losing-deal score improvement into a claim of general strength or automatically alter reward." } + }, + "multiplayer_original_sealed_second_deal_nominations_v1": { + "scope": "Exhaust all five legal nomination choices at round4/index186 of second distinct original/sealed5p losing deal. Same frozen model and search_geo16 opponents; exact prefix verified on every intervention. One fixed hidden-world deal, not public-belief expected value or a policy strength evaluation.", + "model_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "reports": { + "14": { + "exact_prefix_replay": true, + "intervention_index": 186, + "intervention": { + "requested": { + "name": "ChoosePowerPlant", + "data": 37 + }, + "action": { + "name": "ChoosePowerPlant", + "data": 14 + } + }, + "terminal": { + "env": 0, + "episode": 20, + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "truncated": false, + "value": [ + 0, + 0, + 0, + 0, + 1 + ], + "playerCount": 5, + "variant": "original", + "sealed": true, + "steps": 534, + "roles": [ + "learner", + "search_geo", + "search_geo", + "search_geo", + "search_geo" + ], + "policyMoves": { + "ChoosePowerPlant": 12, + "Bid": 14, + "BuyResource": 34, + "Pass": 36, + "Build": 11, + "UsePowerPlant": 12, + "DiscardPowerPlant": 3 + }, + "searchStats": { + "search_geo": { + "decisions": 149, + "evaluations": 12720, + "truncated": 0 + } + }, + "final": { + "round": 9, + "players": [ + { + "cities": 11, + "powered": 11, + "money": 8, + "capacity": 15, + "plants": [ + 31, + 29, + 34 + ] + }, + { + "cities": 8, + "powered": 8, + "money": 21, + "capacity": 16, + "plants": [ + 32, + 24, + 50 + ] + }, + { + "cities": 12, + "powered": 12, + "money": 19, + "capacity": 17, + "plants": [ + 26, + 30, + 39 + ] + }, + { + "cities": 12, + "powered": 12, + "money": 9, + "capacity": 14, + "plants": [ + 28, + 27, + 46 + ] + }, + { + "cities": 16, + "powered": 16, + "money": 21, + "capacity": 19, + "plants": [ + 25, + 36, + 38 + ] + } + ] + } + }, + "counter_limitation": "bridge policyMoves counts the requested action at the single overridden move; trace contains actual executed action", + "selection": "First original/sealed loss by seat on second distinct losing deal; single-trajectory diagnostic, not representative sampling.", + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "seat": 0, + "episode": 20, + "actions_logged": 534, + "seconds": 120.92460491699967, + "trace_sha256": "bfb27aba711fbe23a7dfdcfd75ce1dc171fe9d2c5bd47afc4375f9b62d575304" + }, + "23": { + "exact_prefix_replay": true, + "intervention_index": 186, + "intervention": { + "requested": { + "name": "ChoosePowerPlant", + "data": 37 + }, + "action": { + "name": "ChoosePowerPlant", + "data": 23 + } + }, + "terminal": { + "env": 0, + "episode": 20, + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "truncated": false, + "value": [ + 0, + 0, + 0, + 0, + 1 + ], + "playerCount": 5, + "variant": "original", + "sealed": true, + "steps": 538, + "roles": [ + "learner", + "search_geo", + "search_geo", + "search_geo", + "search_geo" + ], + "policyMoves": { + "ChoosePowerPlant": 11, + "Bid": 12, + "BuyResource": 31, + "Pass": 38, + "Build": 13, + "UsePowerPlant": 13, + "DiscardPowerPlant": 2 + }, + "searchStats": { + "search_geo": { + "decisions": 150, + "evaluations": 12768, + "truncated": 0 + } + }, + "final": { + "round": 9, + "players": [ + { + "cities": 13, + "powered": 13, + "money": 0, + "capacity": 13, + "plants": [ + 23, + 31, + 21 + ] + }, + { + "cities": 11, + "powered": 11, + "money": 12, + "capacity": 15, + "plants": [ + 20, + 32, + 33 + ] + }, + { + "cities": 11, + "powered": 11, + "money": 41, + "capacity": 11, + "plants": [ + 24, + 15, + 29 + ] + }, + { + "cities": 12, + "powered": 12, + "money": 49, + "capacity": 12, + "plants": [ + 28, + 27, + 26 + ] + }, + { + "cities": 15, + "powered": 15, + "money": 7, + "capacity": 18, + "plants": [ + 25, + 36, + 30 + ] + } + ] + } + }, + "counter_limitation": "bridge policyMoves counts the requested action at the single overridden move; trace contains actual executed action", + "selection": "First original/sealed loss by seat on second distinct losing deal; single-trajectory diagnostic, not representative sampling.", + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "seat": 0, + "episode": 20, + "actions_logged": 538, + "seconds": 125.83779679100189, + "trace_sha256": "ee6a044665e214748034f93c0283e88d83f751af0500ea8667494a8eca1f9d4e" + }, + "24": { + "exact_prefix_replay": true, + "intervention_index": 186, + "intervention": { + "requested": { + "name": "ChoosePowerPlant", + "data": 37 + }, + "action": { + "name": "ChoosePowerPlant", + "data": 24 + } + }, + "terminal": { + "env": 0, + "episode": 20, + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "truncated": false, + "value": [ + 0, + 0, + 0, + 0, + 1 + ], + "playerCount": 5, + "variant": "original", + "sealed": true, + "steps": 534, + "roles": [ + "learner", + "search_geo", + "search_geo", + "search_geo", + "search_geo" + ], + "policyMoves": { + "ChoosePowerPlant": 11, + "Bid": 12, + "BuyResource": 19, + "Pass": 42, + "Build": 8, + "UsePowerPlant": 9, + "DiscardPowerPlant": 2 + }, + "searchStats": { + "search_geo": { + "decisions": 155, + "evaluations": 13248, + "truncated": 0 + } + }, + "final": { + "round": 9, + "players": [ + { + "cities": 8, + "powered": 8, + "money": 13, + "capacity": 15, + "plants": [ + 24, + 36, + 33 + ] + }, + { + "cities": 9, + "powered": 9, + "money": 20, + "capacity": 17, + "plants": [ + 20, + 32, + 39 + ] + }, + { + "cities": 12, + "powered": 12, + "money": 23, + "capacity": 16, + "plants": [ + 26, + 21, + 38 + ] + }, + { + "cities": 12, + "powered": 12, + "money": 16, + "capacity": 17, + "plants": [ + 28, + 31, + 46 + ] + }, + { + "cities": 15, + "powered": 15, + "money": 59, + "capacity": 15, + "plants": [ + 25, + 29, + 30 + ] + } + ] + } + }, + "counter_limitation": "bridge policyMoves counts the requested action at the single overridden move; trace contains actual executed action", + "selection": "First original/sealed loss by seat on second distinct losing deal; single-trajectory diagnostic, not representative sampling.", + "gameSeed": "multiplayer-raw-search-transfer-v1-5p-1", + "seat": 0, + "episode": 20, + "actions_logged": 534, + "seconds": 129.30454191899844, + "trace_sha256": "55627fc60f2dc7c6d01183f38543f6bc22b794fd0c5671b032e2b349afda4478" + } + }, + "final_powered_by_choice": { + "37_baseline": 14, + "pass": 12, + "14": 11, + "23": 13, + "24": 8 + }, + "all_outcomes_loss": true, + "decision": "The original plant37 nomination produces the highest final powered count among all five legal choices on this fixed deal with frozen continuation policies; none wins. Reject the proposed local explanation that simply passing or choosing a cheaper plant would repair this loss. Excess generation capacity is a symptom, not proof of this nomination being wrong. Further work should assess earlier network/purchase sequence and more public-consistent worlds, while independent checkpoint strength screens remain the promotion authority.", + "artifact_revision": "6b2e9215953296958387f2a80789a38e4a6b54e0", + "artifact_path": "runs/original-sealed-second-deal-nominations-v1", + "training_performed": false } } From 67307f3b0e6f9ce8db777849e08728747204f7b5 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:39:17 +0200 Subject: [PATCH 148/184] Record update49 search result and extend paired six-player comparison --- ai/strong/experiments.json | 276 ++++++++++++++++++++++++++++++++++++- 1 file changed, 272 insertions(+), 4 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ed4c8ef..9a7d4c7 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -141,7 +141,15 @@ "multiplayer-geoleague-u39-economic-4p": "6abdbbbdfbc85ba68235e2cf", "multiplayer-geoleague-u39-economic-5p": "6abdbbbdfbc85ba68235e2d1", "multiplayer-geoleague-u39-economic-6p": "6abdbbbefbc85ba68235e2d3", - "multiplayer-geoleague-u39-a260-3p": "6abdbbbffbc85ba68235e2d5" + "multiplayer-geoleague-u39-a260-3p": "6abdbbbffbc85ba68235e2d5", + "multiplayer-h200-u29-raw-search-geo-6p-d8": "6abdc7cbfbc85ba68235e6b2", + "multiplayer-h200-u29-raw-search-geo-6p-d16": "6abdc7ccfbc85ba68235e6b4", + "multiplayer-h200-u29-raw-search-geo-6p-d24": "6abdc7ccfbc85ba68235e6b6", + "multiplayer-h200-u29-raw-search-geo-6p-d32": "6abdc7cdfbc85ba68235e6b8", + "multiplayer-h200-u49-raw-search-geo-6p-d8": "6abdc7cefbc85ba68235e6ba", + "multiplayer-h200-u49-raw-search-geo-6p-d16": "6abdc7ce404719ba376156a8", + "multiplayer-h200-u49-raw-search-geo-6p-d24": "6abdc7cf404719ba376156aa", + "multiplayer-h200-u49-raw-search-geo-6p-d32": "6abdc7d0404719ba376156ac" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -19368,10 +19376,10 @@ } }, "multiplayer_h200_update49_six_player_search_screen": { - "status": "RUNNING", + "status": "COMPLETED", "run": "multiplayer-h200-u49-raw-search-geo-h2400-6p", "job_id": "6abdb7a0404719ba37615356", - "observed_stage": "RUNNING", + "observed_stage": "COMPLETED", "candidate_revision": "d6adef40b2b836108cd4c3d2e384eefb67a133a0", "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", @@ -19386,7 +19394,184 @@ "candidate_geographic_search": false, "search_max_steps": 2400, "async_arena": true, - "analysis_plan": "Validate full report and pair exact gameSeed/rule/seat sets with retained update29 and original hard epoch10 search transfer reports. Seed-cluster paired bootstrap20000 draws seed623. Eight development deals diagnostic only; preserve all strength gates and final reserved seeds." + "analysis_plan": "Validate full report and pair exact gameSeed/rule/seat sets with retained update29 and original hard epoch10 search transfer reports. Seed-cluster paired bootstrap20000 draws seed623. Eight development deals diagnostic only; preserve all strength gates and final reserved seeds.", + "artifact_revision": "f366ea8b70c8779b2767d19cb1864cfe4eaa46f4", + "report": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.40625, + "truncated": 0, + "seconds": 4024.4283418610003, + "inference_p95_ms": 1.699805000009746, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.5416666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.3229166666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.17708333333333334, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.5416666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4583333333333333, + 0.6046874999999924 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.21875, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.34375 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.484375 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 43762, + "evaluations": 3563552, + "truncated": 0 + } + } + }, + "paired_comparisons": { + "h200-u29": { + "independent_deals": 8, + "difference": 0.03645833333333333, + "paired_seed_bootstrap_95_interval": [ + -0.04947916666666667, + 0.13802083333333331 + ], + "by_rules": { + "original/False": { + "independent_deals": 8, + "difference": 0.04166666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.08333333333333333, + 0.16666666666666666 + ] + }, + "original/True": { + "independent_deals": 8, + "difference": 0.13541666666666669, + "paired_seed_bootstrap_95_interval": [ + -0.031249999999999997, + 0.32291666666666663 + ] + }, + "recharged/False": { + "independent_deals": 8, + "difference": 0.0, + "paired_seed_bootstrap_95_interval": [ + -0.14583333333333334, + 0.14583333333333331 + ] + }, + "recharged/True": { + "independent_deals": 8, + "difference": -0.031249999999999993, + "paired_seed_bootstrap_95_interval": [ + -0.20833333333333331, + 0.15625 + ] + } + } + }, + "hard-e10": { + "independent_deals": 8, + "difference": 0.30208333333333337, + "paired_seed_bootstrap_95_interval": [ + 0.21354166666666669, + 0.4010416666666667 + ], + "by_rules": { + "original/False": { + "independent_deals": 8, + "difference": 0.3958333333333333, + "paired_seed_bootstrap_95_interval": [ + 0.25, + 0.5416666666666666 + ] + }, + "original/True": { + "independent_deals": 8, + "difference": 0.28125, + "paired_seed_bootstrap_95_interval": [ + 0.125, + 0.47916666666666663 + ] + }, + "recharged/False": { + "independent_deals": 8, + "difference": 0.37499999999999994, + "paired_seed_bootstrap_95_interval": [ + 0.20833333333333331, + 0.5416666666666666 + ] + }, + "recharged/True": { + "independent_deals": 8, + "difference": 0.15625, + "paired_seed_bootstrap_95_interval": [ + -0.010416666666666671, + 0.29166666666666663 + ] + } + } + } + }, + "interpretation": "Completed192-game diagnostic:40.625% wins CI[33.333333,48.4375],3,563,552 opponent rollouts with zero truncation. Versus update29 +3.645833pp pairedCI[-4.947917,13.802083], no supported overall or per-rule improvement. Versus original hard epoch10 +30.208333pp CI[21.354167,40.104167]. Rule win rates original open54.166667%,original sealed32.291667%,Recharged open54.166667%,Recharged sealed21.875%; last below25% floor with CI including1/6chance. No qualification or universal promotion. Extend paired development comparison to40 deals before choosing between update29 and49." }, "multiplayer_h200_update29_five_player_terminal_audit": { "run": "multiplayer-h200-u29-raw-search-geo-h2400-5p-v2", @@ -22157,5 +22342,88 @@ "artifact_revision": "6b2e9215953296958387f2a80789a38e4a6b54e0", "artifact_path": "runs/original-sealed-second-deal-nominations-v1", "training_performed": false + }, + "multiplayer_h200_u29_u49_six_player_search_extension": { + "status": "RUNNING", + "scope": "Paired development extension to40 independent deals/model, including existing offsets0\u20137; not reserved final evaluation. Add32 deals/model at offsets8,16,24,32. Eight192-game jobs,1536 new games total. Freeze both candidates and use identical source32/search_geo16/opponent budget/horizon2400/raw policy settings.", + "seed": "multiplayer-raw-search-transfer-v1-6p", + "source_revision": "37465b08df007221665d796448aea57e6828257e", + "analysis_plan": "Validate all reports, model hashes, exact rule/seat pairs, no duplicate or missing seed offsets0\u201339, zero game/search truncation. Combine960games/model and compute overall and four rule-stratum paired seed bootstrap20000 seed623. Require all existing strength gates; this is diagnostic and does not consume reserved final seeds.", + "models": { + "29": { + "revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f" + }, + "49": { + "revision": "d6adef40b2b836108cd4c3d2e384eefb67a133a0", + "sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e" + } + }, + "jobs": [ + { + "run": "multiplayer-h200-u29-raw-search-geo-6p-d8", + "job_id": "6abdc7cbfbc85ba68235e6b2", + "update": 29, + "deal_offset": 8, + "games": 192, + "player_count": 6 + }, + { + "run": "multiplayer-h200-u29-raw-search-geo-6p-d16", + "job_id": "6abdc7ccfbc85ba68235e6b4", + "update": 29, + "deal_offset": 16, + "games": 192, + "player_count": 6 + }, + { + "run": "multiplayer-h200-u29-raw-search-geo-6p-d24", + "job_id": "6abdc7ccfbc85ba68235e6b6", + "update": 29, + "deal_offset": 24, + "games": 192, + "player_count": 6 + }, + { + "run": "multiplayer-h200-u29-raw-search-geo-6p-d32", + "job_id": "6abdc7cdfbc85ba68235e6b8", + "update": 29, + "deal_offset": 32, + "games": 192, + "player_count": 6 + }, + { + "run": "multiplayer-h200-u49-raw-search-geo-6p-d8", + "job_id": "6abdc7cefbc85ba68235e6ba", + "update": 49, + "deal_offset": 8, + "games": 192, + "player_count": 6 + }, + { + "run": "multiplayer-h200-u49-raw-search-geo-6p-d16", + "job_id": "6abdc7ce404719ba376156a8", + "update": 49, + "deal_offset": 16, + "games": 192, + "player_count": 6 + }, + { + "run": "multiplayer-h200-u49-raw-search-geo-6p-d24", + "job_id": "6abdc7cf404719ba376156aa", + "update": 49, + "deal_offset": 24, + "games": 192, + "player_count": 6 + }, + { + "run": "multiplayer-h200-u49-raw-search-geo-6p-d32", + "job_id": "6abdc7d0404719ba376156ac", + "update": 49, + "deal_offset": 32, + "games": 192, + "player_count": 6 + } + ] } } From 73c26307e48e6b6c8469d150e478b4cbb22d21e8 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:40:44 +0200 Subject: [PATCH 149/184] Verify extended comparison jobs and record observed scheduling states --- ai/strong/experiments.json | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 9a7d4c7..f4bbf04 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -22366,7 +22366,8 @@ "update": 29, "deal_offset": 8, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "RUNNING" }, { "run": "multiplayer-h200-u29-raw-search-geo-6p-d16", @@ -22374,7 +22375,8 @@ "update": 29, "deal_offset": 16, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "RUNNING" }, { "run": "multiplayer-h200-u29-raw-search-geo-6p-d24", @@ -22382,7 +22384,8 @@ "update": 29, "deal_offset": 24, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-h200-u29-raw-search-geo-6p-d32", @@ -22390,7 +22393,8 @@ "update": 29, "deal_offset": 32, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d8", @@ -22398,7 +22402,8 @@ "update": 49, "deal_offset": 8, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d16", @@ -22406,7 +22411,8 @@ "update": 49, "deal_offset": 16, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d24", @@ -22414,7 +22420,8 @@ "update": 49, "deal_offset": 24, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d32", @@ -22422,8 +22429,10 @@ "update": 49, "deal_offset": 32, "games": 192, - "player_count": 6 + "player_count": 6, + "observed_stage": "SCHEDULING" } - ] + ], + "reports": {} } } From b48f3461debcfc7654fa2f2687f40f028b05cf4b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:43:54 +0200 Subject: [PATCH 150/184] Validate update59 export and launch paired multiplayer strength screens --- ai/strong/experiments.json | 87 +++++++++++++++++++++++++++++++++++--- 1 file changed, 80 insertions(+), 7 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index f4bbf04..eab6c32 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -149,7 +149,13 @@ "multiplayer-h200-u49-raw-search-geo-6p-d8": "6abdc7cefbc85ba68235e6ba", "multiplayer-h200-u49-raw-search-geo-6p-d16": "6abdc7ce404719ba376156a8", "multiplayer-h200-u49-raw-search-geo-6p-d24": "6abdc7cf404719ba376156aa", - "multiplayer-h200-u49-raw-search-geo-6p-d32": "6abdc7d0404719ba376156ac" + "multiplayer-h200-u49-raw-search-geo-6p-d32": "6abdc7d0404719ba376156ac", + "multiplayer-h200-u59-economic-2p": "6abdc8e1404719ba376156be", + "multiplayer-h200-u59-economic-3p": "6abdc8e2fbc85ba68235e6e4", + "multiplayer-h200-u59-economic-4p": "6abdc8e3404719ba376156c0", + "multiplayer-h200-u59-economic-5p": "6abdc8e4404719ba376156c2", + "multiplayer-h200-u59-economic-6p": "6abdc8e4404719ba376156c4", + "multiplayer-h200-u59-a260-3p": "6abdc8e5404719ba376156c6" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -22385,7 +22391,7 @@ "deal_offset": 24, "games": 192, "player_count": 6, - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-h200-u29-raw-search-geo-6p-d32", @@ -22394,7 +22400,7 @@ "deal_offset": 32, "games": 192, "player_count": 6, - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d8", @@ -22403,7 +22409,7 @@ "deal_offset": 8, "games": 192, "player_count": 6, - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d16", @@ -22412,7 +22418,7 @@ "deal_offset": 16, "games": 192, "player_count": 6, - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d24", @@ -22421,7 +22427,7 @@ "deal_offset": 24, "games": 192, "player_count": 6, - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d32", @@ -22430,9 +22436,76 @@ "deal_offset": 32, "games": 192, "player_count": 6, - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" } ], "reports": {} + }, + "multiplayer_h200_update59_screening": { + "candidate_revision": "053f0bc2f6d8604a8662c2df9a49e2c959b8f28a", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "training_games": 14400, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 3.3080577850341797e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-h200-u59-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abdc8e1404719ba376156be" + }, + { + "run": "multiplayer-h200-u59-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abdc8e2fbc85ba68235e6e4" + }, + { + "run": "multiplayer-h200-u59-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abdc8e3404719ba376156c0" + }, + { + "run": "multiplayer-h200-u59-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abdc8e4404719ba376156c2" + }, + { + "run": "multiplayer-h200-u59-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abdc8e4404719ba376156c4" + }, + { + "run": "multiplayer-h200-u59-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abdc8e5404719ba376156c6" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Await six complete paired screens; retain update29 until supported improvement. Internal best remains update39; screen new latest update59 explicitly." } } From ef2673555512d2ec85e8bc41c249939d7b5f89c5 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 04:47:34 +0200 Subject: [PATCH 151/184] Complete update59 screening and retain existing stronger-opponent candidates --- ai/strong/experiments.json | 684 ++++++++++++++++++++++++++++++++++++- 1 file changed, 676 insertions(+), 8 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index eab6c32..a3b10ec 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -22469,43 +22469,711 @@ "run": "multiplayer-h200-u59-economic-2p", "players": 2, "opponent": "economic", - "job_id": "6abdc8e1404719ba376156be" + "job_id": "6abdc8e1404719ba376156be", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u59-economic-3p", "players": 3, "opponent": "economic", - "job_id": "6abdc8e2fbc85ba68235e6e4" + "job_id": "6abdc8e2fbc85ba68235e6e4", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u59-economic-4p", "players": 4, "opponent": "economic", - "job_id": "6abdc8e3404719ba376156c0" + "job_id": "6abdc8e3404719ba376156c0", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u59-economic-5p", "players": 5, "opponent": "economic", - "job_id": "6abdc8e4404719ba376156c2" + "job_id": "6abdc8e4404719ba376156c2", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u59-economic-6p", "players": 6, "opponent": "economic", - "job_id": "6abdc8e4404719ba376156c4" + "job_id": "6abdc8e4404719ba376156c4", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u59-a260-3p", "players": 3, "opponent": "a260", - "job_id": "6abdc8e5404719ba376156c6" + "job_id": "6abdc8e5404719ba376156c6", + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Await six complete paired screens; retain update29 until supported improvement. Internal best remains update39; screen new latest update59 explicitly." + "decision": "Completed3680-game paired development screen with40 independent deals/count, verified hashes and complete seats/rules, zero actual-game and reported search truncation. Economic2\u20136p win rates54.375%,59.375%,60.9375%,75.25%,75.208333%;A2603p32.291667%. Against update49 all six paired95% seed intervals include zero: no supported improvement and no promotion. Versus update29 supported6p economic gain6.979167pp CI[2.5,11.458333];4p gain4.53125pp interval[0,9.140625] does not strictly exclude zero. A260 original sealed20.833333% CI[13.333333,29.166667] is below chance1/3; overall A260 fails40% point floor. Preserve update29/update49 strong-opponent extension and current80-update training horizons; do not launch redundant update59 search screen based only on uncertain economic gains. Await next checkpoints or substantively different training after current horizons.", + "reports": { + "multiplayer-h200-u59-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/053f0bc2f6d8604a8662c2df9a49e2c959b8f28a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.54375, + "truncated": 0, + "seconds": 23.727942119999994, + "inference_p95_ms": 0.3604804000019612, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.6 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5875, + 0.7375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.65 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.490625, + 0.59375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "9b806a156f3e571126899cc14fc3e60637aef997" + }, + "multiplayer-h200-u59-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/053f0bc2f6d8604a8662c2df9a49e2c959b8f28a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.59375, + "truncated": 0, + "seconds": 29.398077493000002, + "inference_p95_ms": 0.3909260000007465, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 0.6666666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.39166666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.48333333333333334 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.675, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.575, + 0.7666666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.725, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6416666666666667, + 0.8 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5479166666666667, + 0.6416666666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "9b806a156f3e571126899cc14fc3e60637aef997" + }, + "multiplayer-h200-u59-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/053f0bc2f6d8604a8662c2df9a49e2c959b8f28a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.609375, + "truncated": 0, + "seconds": 39.894202022, + "inference_p95_ms": 0.4153489999936255, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.46875, + 0.61875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.48125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.58125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.71875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6375, + 0.79375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.69375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6060937500000001, + 0.775 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5578125, + 0.6578125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "9b806a156f3e571126899cc14fc3e60637aef997" + }, + "multiplayer-h200-u59-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/053f0bc2f6d8604a8662c2df9a49e2c959b8f28a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.7525, + "truncated": 0, + "seconds": 44.636666602999995, + "inference_p95_ms": 0.41744499999225587, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.7, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.63, + 0.765 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.67, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.735 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.885, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.83, + 0.93 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.755, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.695, + 0.81 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.72, + 0.78375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "9b806a156f3e571126899cc14fc3e60637aef997" + }, + "multiplayer-h200-u59-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/053f0bc2f6d8604a8662c2df9a49e2c959b8f28a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.7520833333333333, + "truncated": 0, + "seconds": 51.696382721000006, + "inference_p95_ms": 0.4211509999976215, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.7166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6458333333333334, + 0.7833333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6791666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6125, + 0.7458333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.8625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7958333333333333, + 0.9166666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.75, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6875, + 0.8083333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7125, + 0.7895833333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "9b806a156f3e571126899cc14fc3e60637aef997" + }, + "multiplayer-h200-u59-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/053f0bc2f6d8604a8662c2df9a49e2c959b8f28a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "139167d592d01db43e2e5f2d18569b751c6c751e65acd4197fe37a3dc0f44d1c", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.3229166666666667, + "truncated": 0, + "seconds": 70.18460759799999, + "inference_p95_ms": 0.3995569999958093, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.2833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19166666666666668, + 0.375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.20833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.13333333333333333, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.4583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.36666666666666664, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.3416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.43333333333333335 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.275, + 0.37083333333333335 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "9b806a156f3e571126899cc14fc3e60637aef997" + } + }, + "paired_against_h200_u29": { + "multiplayer-h200-u59-economic-2p": { + "independent_deals": 40, + "difference": 0.009375, + "paired_seed_bootstrap_95_interval": [ + -0.059375, + 0.075 + ] + }, + "multiplayer-h200-u59-economic-3p": { + "independent_deals": 40, + "difference": -0.009375000000000005, + "paired_seed_bootstrap_95_interval": [ + -0.071875, + 0.054166666666666655 + ] + }, + "multiplayer-h200-u59-economic-4p": { + "independent_deals": 40, + "difference": 0.0453125, + "paired_seed_bootstrap_95_interval": [ + 0.0, + 0.09140625 + ] + }, + "multiplayer-h200-u59-economic-5p": { + "independent_deals": 40, + "difference": -0.010624999999999999, + "paired_seed_bootstrap_95_interval": [ + -0.049374999999999995, + 0.026875000000000003 + ] + }, + "multiplayer-h200-u59-economic-6p": { + "independent_deals": 40, + "difference": 0.06979166666666667, + "paired_seed_bootstrap_95_interval": [ + 0.025, + 0.11458333333333333 + ] + }, + "multiplayer-h200-u59-a260-3p": { + "independent_deals": 40, + "difference": -0.03229166666666667, + "paired_seed_bootstrap_95_interval": [ + -0.090625, + 0.025 + ] + } + }, + "paired_against_h200_u39": { + "multiplayer-h200-u59-economic-2p": { + "independent_deals": 40, + "difference": -0.0046875, + "paired_seed_bootstrap_95_interval": [ + -0.0859375, + 0.08125 + ] + }, + "multiplayer-h200-u59-economic-3p": { + "independent_deals": 40, + "difference": -0.003125, + "paired_seed_bootstrap_95_interval": [ + -0.05520833333333334, + 0.053125 + ] + }, + "multiplayer-h200-u59-economic-4p": { + "independent_deals": 40, + "difference": 0.040625, + "paired_seed_bootstrap_95_interval": [ + -0.009375, + 0.0890625 + ] + }, + "multiplayer-h200-u59-economic-5p": { + "independent_deals": 40, + "difference": 0.01, + "paired_seed_bootstrap_95_interval": [ + -0.030000000000000006, + 0.05 + ] + }, + "multiplayer-h200-u59-economic-6p": { + "independent_deals": 40, + "difference": 0.05833333333333333, + "paired_seed_bootstrap_95_interval": [ + 0.018749999999999996, + 0.09583333333333334 + ] + }, + "multiplayer-h200-u59-a260-3p": { + "independent_deals": 40, + "difference": 0.00625, + "paired_seed_bootstrap_95_interval": [ + -0.05833333333333333, + 0.07291666666666667 + ] + } + }, + "paired_against_h200_u49": { + "multiplayer-h200-u59-economic-2p": { + "independent_deals": 40, + "difference": 0.025, + "paired_seed_bootstrap_95_interval": [ + -0.040625, + 0.0875 + ] + }, + "multiplayer-h200-u59-economic-3p": { + "independent_deals": 40, + "difference": 0.019791666666666662, + "paired_seed_bootstrap_95_interval": [ + -0.041666666666666664, + 0.08020833333333333 + ] + }, + "multiplayer-h200-u59-economic-4p": { + "independent_deals": 40, + "difference": 0.0375, + "paired_seed_bootstrap_95_interval": [ + -0.0046875, + 0.08125 + ] + }, + "multiplayer-h200-u59-economic-5p": { + "independent_deals": 40, + "difference": -0.012500000000000002, + "paired_seed_bootstrap_95_interval": [ + -0.04625, + 0.02375 + ] + }, + "multiplayer-h200-u59-economic-6p": { + "independent_deals": 40, + "difference": 0.014583333333333337, + "paired_seed_bootstrap_95_interval": [ + -0.02708333333333333, + 0.055208333333333325 + ] + }, + "multiplayer-h200-u59-a260-3p": { + "independent_deals": 40, + "difference": -0.05833333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.12083333333333335, + 0.004166666666666664 + ] + } + }, + "completion_audit": { + "reports": 6, + "games": 3680, + "truncated": 0, + "qualified": false + } } } From 1c7502d884988220bc65f470194d62c949691d5c Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 05:26:46 +0200 Subject: [PATCH 152/184] Diagnose geographic update49 export and launch research-only screens --- ai/strong/experiments.json | 103 ++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a3b10ec..730ce68 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -155,7 +155,13 @@ "multiplayer-h200-u59-economic-4p": "6abdc8e3404719ba376156c0", "multiplayer-h200-u59-economic-5p": "6abdc8e4404719ba376156c2", "multiplayer-h200-u59-economic-6p": "6abdc8e4404719ba376156c4", - "multiplayer-h200-u59-a260-3p": "6abdc8e5404719ba376156c6" + "multiplayer-h200-u59-a260-3p": "6abdc8e5404719ba376156c6", + "multiplayer-geoleague-u49-economic-2p": "6abdd2e6fbc85ba68235e907", + "multiplayer-geoleague-u49-economic-3p": "6abdd2e6fbc85ba68235e909", + "multiplayer-geoleague-u49-economic-4p": "6abdd2e7404719ba376157dd", + "multiplayer-geoleague-u49-economic-5p": "6abdd2e8404719ba376157df", + "multiplayer-geoleague-u49-economic-6p": "6abdd2e8fbc85ba68235e90b", + "multiplayer-geoleague-u49-a260-3p": "6abdd2e9404719ba376157e1" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -23175,5 +23181,100 @@ "truncated": 0, "qualified": false } + }, + "multiplayer_geoleague_update49_screening": { + "candidate_revision": "d3bd8ead55d15b4ebf53e333d617c244203ba76a", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "training_games": 12000, + "training_truncated": 0, + "export_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 2270, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 34 + ], + "torch32": 0.007925033569335938, + "onnx32": 0.007944107055664062, + "reference64": 0.007925065066011427 + } + ], + "torch_max_error": 3.7336480183114418e-06, + "onnx_max_error": 1.904198965263504e-05, + "winning_margin": 2.547398677808662 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "max_logit_error": 6.866455078125e-05, + "max_value_error": 3.039836883544922e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "strict_export_parity_passed": false, + "qualification_eligible": false, + "jobs": [ + { + "run": "multiplayer-geoleague-u49-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abdd2e6fbc85ba68235e907" + }, + { + "run": "multiplayer-geoleague-u49-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abdd2e6fbc85ba68235e909" + }, + { + "run": "multiplayer-geoleague-u49-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abdd2e7404719ba376157dd" + }, + { + "run": "multiplayer-geoleague-u49-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abdd2e8404719ba376157df" + }, + { + "run": "multiplayer-geoleague-u49-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abdd2e8fbc85ba68235e90b" + }, + { + "run": "multiplayer-geoleague-u49-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abdd2e9404719ba376157e1" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Latest and internal best now share the update49 ONNX hash; screen this new immutable candidate explicitly." } } From f96638530acb380ea135a447ebec99963c2b6f49 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 05:31:16 +0200 Subject: [PATCH 153/184] Complete geographic update49 research screening without promotion --- ai/strong/experiments.json | 784 ++++++++++++++++++++++++++++++++++++- 1 file changed, 776 insertions(+), 8 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 730ce68..8ca9a0a 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -23238,43 +23238,811 @@ "run": "multiplayer-geoleague-u49-economic-2p", "players": 2, "opponent": "economic", - "job_id": "6abdd2e6fbc85ba68235e907" + "job_id": "6abdd2e6fbc85ba68235e907", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u49-economic-3p", "players": 3, "opponent": "economic", - "job_id": "6abdd2e6fbc85ba68235e909" + "job_id": "6abdd2e6fbc85ba68235e909", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u49-economic-4p", "players": 4, "opponent": "economic", - "job_id": "6abdd2e7404719ba376157dd" + "job_id": "6abdd2e7404719ba376157dd", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u49-economic-5p", "players": 5, "opponent": "economic", - "job_id": "6abdd2e8404719ba376157df" + "job_id": "6abdd2e8404719ba376157df", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u49-economic-6p", "players": 6, "opponent": "economic", - "job_id": "6abdd2e8fbc85ba68235e90b" + "job_id": "6abdd2e8fbc85ba68235e90b", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u49-a260-3p", "players": 3, "opponent": "a260", - "job_id": "6abdd2e9404719ba376157e1" + "job_id": "6abdd2e9404719ba376157e1", + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Latest and internal best now share the update49 ONNX hash; screen this new immutable candidate explicitly." + "decision": "Completed research-only3680-game screen,40 independent deals/count, verified hashes and exact seat/rule pairs, zero actual-game and reported search truncation. Economic2\u20136p win rates51.5625%,57.5%,57.96875%,68.625%,59.895833%;A2603p36.875%. All six paired intervals against geographic update19 include zero: no supported advance over that retained checkpoint. Versus geographic update39, supported recovery in4p(+5.625pp),5p(+4.75pp),A260(+7.291667pp); this does not establish progress beyond update19. Versus H200 update49, supported deficits in5p(-7.875pp CI[-11.625,-4.125]) and6p(-13.854167pp CI[-18.229167,-9.583333]); other comparisons uncertain. A260 overall fails40% floor; original sealed26.666667% CI[18.333333,35.833333] does not exclude chance. No promotion or new stronger-opponent screen justified. Qualification remains ineligible owing to one strict numerical export violation despite2553 matching actions. Preserve current80-update horizons and reserved final seeds.", + "reports": { + "multiplayer-geoleague-u49-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d3bd8ead55d15b4ebf53e333d617c244203ba76a/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.515625, + "truncated": 0, + "seconds": 23.86610699299999, + "inference_p95_ms": 0.3579079999980195, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.7125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.5125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.7125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.55 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.46875, + 0.5625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "6dfcb82d1d6faa63597c3b5ae9a076b7d392acf6" + }, + "multiplayer-geoleague-u49-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d3bd8ead55d15b4ebf53e333d617c244203ba76a/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.575, + "truncated": 0, + "seconds": 28.986017392999983, + "inference_p95_ms": 0.3996755000038376, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.38333333333333336, + 0.5666666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.48333333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.39166666666666666, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7, + 0.8583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.5583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4666666666666667, + 0.65 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5270833333333333, + 0.625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7d14cf1ea57c6c856d73b76e528068bd11b84752" + }, + "multiplayer-geoleague-u49-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d3bd8ead55d15b4ebf53e333d617c244203ba76a/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5796875, + "truncated": 0, + "seconds": 39.328809664999994, + "inference_p95_ms": 0.4054614999944306, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.50625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.5875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.38125, + 0.54375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.70625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6375, + 0.78125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.64375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55625, + 0.725 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5421875, + 0.6140625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7d14cf1ea57c6c856d73b76e528068bd11b84752" + }, + "multiplayer-geoleague-u49-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d3bd8ead55d15b4ebf53e333d617c244203ba76a/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.68625, + "truncated": 0, + "seconds": 45.035679228000006, + "inference_p95_ms": 0.41600849999667844, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.565, + 0.685 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.615, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.555, + 0.67 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.795, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.735, + 0.85 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.71, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.66, + 0.765 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.65625, + 0.7175 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7d14cf1ea57c6c856d73b76e528068bd11b84752" + }, + "multiplayer-geoleague-u49-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d3bd8ead55d15b4ebf53e333d617c244203ba76a/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.5989583333333334, + "truncated": 0, + "seconds": 50.735918946, + "inference_p95_ms": 0.41776899999490524, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.44583333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.38333333333333336, + 0.5083333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.5666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5083333333333333, + 0.6291666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.69375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6333333333333333, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6895833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6375, + 0.7416666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.565625, + 0.6307291666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7d14cf1ea57c6c856d73b76e528068bd11b84752" + }, + "multiplayer-geoleague-u49-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d3bd8ead55d15b4ebf53e333d617c244203ba76a/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "633cbc67bb3162e0e34a666cfab58fe95390e8b5a9630bc5cdb75b86954bd3ed", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.36875, + "truncated": 0, + "seconds": 70.68671331799999, + "inference_p95_ms": 0.41153899999812893, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.31666666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.425 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.26666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.18333333333333332, + 0.35833333333333334 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.36666666666666664, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.4583333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.325, + 0.41458333333333336 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7d14cf1ea57c6c856d73b76e528068bd11b84752" + } + }, + "paired_against_geoleague_u19": { + "multiplayer-geoleague-u49-economic-2p": { + "independent_deals": 40, + "difference": -0.003125, + "paired_seed_bootstrap_95_interval": [ + -0.071875, + 0.0671875 + ] + }, + "multiplayer-geoleague-u49-economic-3p": { + "independent_deals": 40, + "difference": 0.034375, + "paired_seed_bootstrap_95_interval": [ + -0.029166666666666667, + 0.09895833333333334 + ] + }, + "multiplayer-geoleague-u49-economic-4p": { + "independent_deals": 40, + "difference": 0.015625, + "paired_seed_bootstrap_95_interval": [ + -0.028125, + 0.0609375 + ] + }, + "multiplayer-geoleague-u49-economic-5p": { + "independent_deals": 40, + "difference": 0.002500000000000001, + "paired_seed_bootstrap_95_interval": [ + -0.036250000000000004, + 0.042499999999999996 + ] + }, + "multiplayer-geoleague-u49-economic-6p": { + "independent_deals": 40, + "difference": -0.0203125, + "paired_seed_bootstrap_95_interval": [ + -0.0625, + 0.02291666666666667 + ] + }, + "multiplayer-geoleague-u49-a260-3p": { + "independent_deals": 40, + "difference": 0.04375, + "paired_seed_bootstrap_95_interval": [ + -0.025000000000000005, + 0.11458333333333333 + ] + } + }, + "paired_against_geoleague_u29": { + "multiplayer-geoleague-u49-economic-2p": { + "independent_deals": 40, + "difference": -0.00625, + "paired_seed_bootstrap_95_interval": [ + -0.08125, + 0.065625 + ] + }, + "multiplayer-geoleague-u49-economic-3p": { + "independent_deals": 40, + "difference": 0.024999999999999998, + "paired_seed_bootstrap_95_interval": [ + -0.03125, + 0.07916666666666666 + ] + }, + "multiplayer-geoleague-u49-economic-4p": { + "independent_deals": 40, + "difference": -0.0046875, + "paired_seed_bootstrap_95_interval": [ + -0.0546875, + 0.046875 + ] + }, + "multiplayer-geoleague-u49-economic-5p": { + "independent_deals": 40, + "difference": 0.0325, + "paired_seed_bootstrap_95_interval": [ + -0.0024999999999999996, + 0.06625 + ] + }, + "multiplayer-geoleague-u49-economic-6p": { + "independent_deals": 40, + "difference": 0.003645833333333331, + "paired_seed_bootstrap_95_interval": [ + -0.030208333333333337, + 0.0375 + ] + }, + "multiplayer-geoleague-u49-a260-3p": { + "independent_deals": 40, + "difference": 0.06666666666666667, + "paired_seed_bootstrap_95_interval": [ + 0.004166666666666663, + 0.13125 + ] + } + }, + "paired_against_geoleague_u39": { + "multiplayer-geoleague-u49-economic-2p": { + "independent_deals": 40, + "difference": -0.0421875, + "paired_seed_bootstrap_95_interval": [ + -0.1046875, + 0.0234375 + ] + }, + "multiplayer-geoleague-u49-economic-3p": { + "independent_deals": 40, + "difference": 0.020833333333333332, + "paired_seed_bootstrap_95_interval": [ + -0.022916666666666665, + 0.0625 + ] + }, + "multiplayer-geoleague-u49-economic-4p": { + "independent_deals": 40, + "difference": 0.05625, + "paired_seed_bootstrap_95_interval": [ + 0.0109375, + 0.1015625 + ] + }, + "multiplayer-geoleague-u49-economic-5p": { + "independent_deals": 40, + "difference": 0.0475, + "paired_seed_bootstrap_95_interval": [ + 0.002500000000000005, + 0.09375 + ] + }, + "multiplayer-geoleague-u49-economic-6p": { + "independent_deals": 40, + "difference": 0.019791666666666673, + "paired_seed_bootstrap_95_interval": [ + -0.0203125, + 0.05886718749999887 + ] + }, + "multiplayer-geoleague-u49-a260-3p": { + "independent_deals": 40, + "difference": 0.07291666666666667, + "paired_seed_bootstrap_95_interval": [ + 0.008333333333333337, + 0.13541666666666669 + ] + } + }, + "paired_against_h200_u49": { + "multiplayer-geoleague-u49-economic-2p": { + "independent_deals": 40, + "difference": -0.003125, + "paired_seed_bootstrap_95_interval": [ + -0.07195312499999992, + 0.06875 + ] + }, + "multiplayer-geoleague-u49-economic-3p": { + "independent_deals": 40, + "difference": 0.0010416666666666658, + "paired_seed_bootstrap_95_interval": [ + -0.0625, + 0.06458333333333334 + ] + }, + "multiplayer-geoleague-u49-economic-4p": { + "independent_deals": 40, + "difference": 0.0078125, + "paired_seed_bootstrap_95_interval": [ + -0.048476562499999966, + 0.065625 + ] + }, + "multiplayer-geoleague-u49-economic-5p": { + "independent_deals": 40, + "difference": -0.07875000000000001, + "paired_seed_bootstrap_95_interval": [ + -0.11625, + -0.04125000000000001 + ] + }, + "multiplayer-geoleague-u49-economic-6p": { + "independent_deals": 40, + "difference": -0.13854166666666665, + "paired_seed_bootstrap_95_interval": [ + -0.18229166666666666, + -0.09583333333333334 + ] + }, + "multiplayer-geoleague-u49-a260-3p": { + "independent_deals": 40, + "difference": -0.012499999999999999, + "paired_seed_bootstrap_95_interval": [ + -0.08124999999999999, + 0.05625 + ] + } + }, + "paired_against_h200_u59": { + "multiplayer-geoleague-u49-economic-2p": { + "independent_deals": 40, + "difference": -0.028125, + "paired_seed_bootstrap_95_interval": [ + -0.090625, + 0.0375 + ] + }, + "multiplayer-geoleague-u49-economic-3p": { + "independent_deals": 40, + "difference": -0.018749999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.0875, + 0.05208333333333333 + ] + }, + "multiplayer-geoleague-u49-economic-4p": { + "independent_deals": 40, + "difference": -0.0296875, + "paired_seed_bootstrap_95_interval": [ + -0.090625, + 0.034375 + ] + }, + "multiplayer-geoleague-u49-economic-5p": { + "independent_deals": 40, + "difference": -0.06625, + "paired_seed_bootstrap_95_interval": [ + -0.0975, + -0.034999999999999996 + ] + }, + "multiplayer-geoleague-u49-economic-6p": { + "independent_deals": 40, + "difference": -0.153125, + "paired_seed_bootstrap_95_interval": [ + -0.19166666666666665, + -0.11458333333333334 + ] + }, + "multiplayer-geoleague-u49-a260-3p": { + "independent_deals": 40, + "difference": 0.04583333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.01666666666666667, + 0.11041666666666669 + ] + } + }, + "completion_audit": { + "reports": 6, + "games": 3680, + "truncated": 0, + "qualification_eligible": false + } } } From 580f93ab747594ba7e176ca57b3f643b3db5adbf Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 05:46:30 +0200 Subject: [PATCH 154/184] Record three validated six-player search extension shards --- ai/strong/experiments.json | 279 ++++++++++++++++++++++++++++++++++++- 1 file changed, 275 insertions(+), 4 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 8ca9a0a..7b0cd2a 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -22379,7 +22379,7 @@ "deal_offset": 8, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u29-raw-search-geo-6p-d16", @@ -22388,7 +22388,7 @@ "deal_offset": 16, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u29-raw-search-geo-6p-d24", @@ -22406,7 +22406,7 @@ "deal_offset": 32, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d8", @@ -22445,7 +22445,278 @@ "observed_stage": "RUNNING" } ], - "reports": {} + "reports": { + "multiplayer-h200-u29-raw-search-geo-6p-d16": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 16, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.2864583333333333, + "truncated": 0, + "seconds": 3898.22550399974, + "inference_p95_ms": 1.2521817348897457, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.5416666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.20833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.3541666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.4375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3541666666666667, + 0.5208333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.08333333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.020833333333333332, + 0.14583333333333334 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.234375, + 0.3385416666666667 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 43738, + "evaluations": 3561376, + "truncated": 0 + } + }, + "artifact_revision": "d6360f04fea1abb96a03f5e0eaed70155388f288" + }, + "multiplayer-h200-u29-raw-search-geo-6p-d8": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 8, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.3802083333333333, + "truncated": 0, + "seconds": 3992.586980608001, + "inference_p95_ms": 1.2947249997523613, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5416666666666666, + 0.7083333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.1875, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.3333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.5208333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.37447916666666714, + 0.6875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.1875, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.08333333333333333, + 0.3125 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3229166666666667, + 0.4427083333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 44303, + "evaluations": 3617056, + "truncated": 0 + } + }, + "artifact_revision": "09e023432a1a840cb489f5b027741cf0b5c1fe6a" + }, + "multiplayer-h200-u29-raw-search-geo-6p-d32": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 32, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.3854166666666667, + "truncated": 0, + "seconds": 3852.8742071449997, + "inference_p95_ms": 1.1835192000035022, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.5833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5208333333333334, + 0.6458333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.22916666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.3125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.4583333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.5833333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.2708333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.4166666666666667 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.328125, + 0.4427083333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 44126, + "evaluations": 3600832, + "truncated": 0 + } + }, + "artifact_revision": "09e023432a1a840cb489f5b027741cf0b5c1fe6a" + } + } }, "multiplayer_h200_update59_screening": { "candidate_revision": "053f0bc2f6d8604a8662c2df9a49e2c959b8f28a", From 89ec44100f3b12f1bf66edaa83a5854f77e97405 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 05:51:06 +0200 Subject: [PATCH 155/184] Complete paired six-player search comparison and record supported PPO gain --- ai/strong/experiments.json | 637 ++++++++++++++++++++++++++++++++++++- 1 file changed, 631 insertions(+), 6 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 7b0cd2a..d877e83 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -22356,7 +22356,7 @@ "training_performed": false }, "multiplayer_h200_u29_u49_six_player_search_extension": { - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired development extension to40 independent deals/model, including existing offsets0\u20137; not reserved final evaluation. Add32 deals/model at offsets8,16,24,32. Eight192-game jobs,1536 new games total. Freeze both candidates and use identical source32/search_geo16/opponent budget/horizon2400/raw policy settings.", "seed": "multiplayer-raw-search-transfer-v1-6p", "source_revision": "37465b08df007221665d796448aea57e6828257e", @@ -22397,7 +22397,7 @@ "deal_offset": 24, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u29-raw-search-geo-6p-d32", @@ -22415,7 +22415,7 @@ "deal_offset": 8, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d16", @@ -22424,7 +22424,7 @@ "deal_offset": 16, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d24", @@ -22433,7 +22433,7 @@ "deal_offset": 24, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u49-raw-search-geo-6p-d32", @@ -22442,7 +22442,7 @@ "deal_offset": 32, "games": 192, "player_count": 6, - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" } ], "reports": { @@ -22715,7 +22715,632 @@ } }, "artifact_revision": "09e023432a1a840cb489f5b027741cf0b5c1fe6a" + }, + "multiplayer-h200-u49-raw-search-geo-6p-d32": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 32, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.3932291666666667, + "truncated": 0, + "seconds": 3901.657215684, + "inference_p95_ms": 1.1774255999739578, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.5104166666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.34375, + 0.6875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.3333333333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.22916666666666666, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.4791666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3541666666666667, + 0.6041666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.25, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3125 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3203125, + 0.4765625 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 44659, + "evaluations": 3645568, + "truncated": 0 + } + }, + "artifact_revision": "3f6fd5fbedaf5a4aed8f88f1a5b61a4f1e983de8" + }, + "multiplayer-h200-u29-raw-search-geo-6p-d24": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 24, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "d3d2ee88a0940f079a4b38879c8154dbab55951abc7b295a7db17bdf22e52c5f", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.3177083333333333, + "truncated": 0, + "seconds": 3991.0263776939996, + "inference_p95_ms": 1.1682150000353886, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.4270833333333333, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.5625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.28125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16666666666666666, + 0.3854166666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.4166666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.5208333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.14583333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.25 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.25, + 0.3828125 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 45272, + "evaluations": 3702864, + "truncated": 0 + } + }, + "artifact_revision": "29a0e1cc8f6c587779590c4d072cd5b869bc18dd" + }, + "multiplayer-h200-u49-raw-search-geo-6p-d8": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 8, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.3854166666666667, + "truncated": 0, + "seconds": 4009.5329975470004, + "inference_p95_ms": 1.2803619999885996, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.5625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.6875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.1875, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.020833333333333332, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.5416666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3333333333333333, + 0.7291666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.25, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.3541666666666667 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.4739583333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 44426, + "evaluations": 3626176, + "truncated": 0 + } + }, + "artifact_revision": "29a0e1cc8f6c587779590c4d072cd5b869bc18dd" + }, + "multiplayer-h200-u49-raw-search-geo-6p-d16": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 16, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.4010416666666667, + "truncated": 0, + "seconds": 3936.530566764, + "inference_p95_ms": 1.3363409999556097, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.625, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5416666666666666, + 0.7083333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.125, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.041666666666666664, + 0.22916666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.6458333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5208333333333334, + 0.7708333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.20833333333333334, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.10416666666666667, + 0.2916666666666667 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.3489583333333333, + 0.4583333333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 44008, + "evaluations": 3587712, + "truncated": 0 + } + }, + "artifact_revision": "29a0e1cc8f6c587779590c4d072cd5b869bc18dd" + }, + "multiplayer-h200-u49-raw-search-geo-6p-d24": { + "async_rollout": true, + "engine_workers": 192, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 24, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/d6adef40b2b836108cd4c3d2e384eefb67a133a0/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "4191bfe42ccd9c0719e27a76f8f82d3d1289bb93702ba2d4f68873111cb1143e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "search_geo", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-raw-search-transfer-v1-6p", + "games": 192, + "win_rate": 0.4375, + "truncated": 0, + "seconds": 4112.373182898999, + "inference_p95_ms": 1.4759814000171894, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 48, + "win_rate": 0.4375, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2708333333333333, + 0.6041666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 48, + "win_rate": 0.3541666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.4166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 48, + "win_rate": 0.6666666666666666, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5833333333333334, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 48, + "win_rate": 0.2916666666666667, + "independent_seeds": 8, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.14583333333333334, + 0.4166666666666667 + ] + } + ], + "independent_seeds": 8, + "seed_bootstrap_95_interval": [ + 0.390625, + 0.4947916666666667 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 44731, + "evaluations": 3663936, + "truncated": 0 + } + }, + "artifact_revision": "eb6b687d0f9fa0a2b2b13a425920f896b98c9606" } + }, + "combined": { + "29": { + "games": 960, + "independent_seeds": 40, + "win_rate": 0.34791666666666665, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.31927083333333334, + 0.3770833333333333 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 221294, + "evaluations": 18057984, + "truncated": 0 + } + } + }, + "49": { + "games": 960, + "independent_seeds": 40, + "win_rate": 0.4046875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3734375, + 0.4375 + ], + "search_rollouts_reported": true, + "search_stats": { + "search_geo": { + "decisions": 221586, + "evaluations": 18086944, + "truncated": 0 + } + } + } + }, + "paired_u49_minus_u29": { + "difference": 0.056770833333333326, + "paired_seed_bootstrap_95_interval": [ + 0.01666666666666667, + 0.0984375 + ], + "independent_deals": 40 + }, + "by_rules": { + "original/False": { + "29": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.5104166666666666, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.45625, + 0.5625 + ] + }, + "49": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.5354166666666667, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.47286458333333337, + 0.5979166666666667 + ] + }, + "paired_u49_minus_u29": { + "difference": 0.025, + "paired_seed_bootstrap_95_interval": [ + -0.054166666666666675, + 0.10208333333333333 + ], + "independent_deals": 40 + } + }, + "original/True": { + "29": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.21875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.16875, + 0.2708333333333333 + ] + }, + "49": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.26458333333333334, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19791666666666666, + 0.33125 + ] + }, + "paired_u49_minus_u29": { + "difference": 0.04583333333333332, + "paired_seed_bootstrap_95_interval": [ + -0.018750000000000006, + 0.1125 + ], + "independent_deals": 40 + } + }, + "recharged/False": { + "29": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.475, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.42083333333333334, + 0.5333333333333333 + ] + }, + "49": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.575, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5125, + 0.6375 + ] + }, + "paired_u49_minus_u29": { + "difference": 0.1, + "paired_seed_bootstrap_95_interval": [ + 0.012499999999999999, + 0.1875 + ], + "independent_deals": 40 + } + }, + "recharged/True": { + "29": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.1875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.13739583333333344, + 0.24166666666666667 + ] + }, + "49": { + "games": 240, + "independent_seeds": 40, + "win_rate": 0.24375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.19375, + 0.29375 + ] + }, + "paired_u49_minus_u29": { + "difference": 0.05625, + "paired_seed_bootstrap_95_interval": [ + -0.014583333333333337, + 0.12708333333333333 + ], + "independent_deals": 40 + } + } + }, + "interpretation": { + "scope": "Exploratory six-player Germany screening: raw policies against search_geo16, 40 matched deals, all seats and four rule combinations; reserved final seeds untouched.", + "overall": "Update49 improves over update29 by 5.677083 percentage points (paired deal-bootstrap 95% interval +1.666667 to +9.84375); win rates 40.46875% versus 34.791667%. This supports update49 as the stronger six-player raw-policy research candidate.", + "rules": "Update49 rates: original open 53.541667%, original sealed 26.458333%, Recharged open 57.5%, Recharged sealed 24.375%. All four update49 marginal win-rate intervals exceed 1/6 chance; Recharged sealed still misses the 25% point-estimate floor. Only Recharged open has a positive per-rule improvement interval; subgroup intervals are exploratory and not multiplicity-adjusted.", + "decision": "No qualification or universal promotion. Retain update49 for six-player comparison, preserve existing 80-update training horizons, and evaluate genuinely new checkpoints before further expensive screening. These results do not establish strength at other player counts.", + "integrity": "1920 complete games; 36144928 reported opponent search evaluations; zero actual-game or search-rollout truncations. Frozen model hashes, matched seeds, rule-seat coverage and metadata validated by collector." } }, "multiplayer_h200_update59_screening": { From 8f1ffe0a4aa6ddf873873b1ec5241ba57767b418 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 05:58:11 +0200 Subject: [PATCH 156/184] Pin H200 update69 export diagnosis and launch research screening --- ai/strong/experiments.json | 110 ++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index d877e83..95ce97d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -161,7 +161,13 @@ "multiplayer-geoleague-u49-economic-4p": "6abdd2e7404719ba376157dd", "multiplayer-geoleague-u49-economic-5p": "6abdd2e8404719ba376157df", "multiplayer-geoleague-u49-economic-6p": "6abdd2e8fbc85ba68235e90b", - "multiplayer-geoleague-u49-a260-3p": "6abdd2e9404719ba376157e1" + "multiplayer-geoleague-u49-a260-3p": "6abdd2e9404719ba376157e1", + "multiplayer-h200-u69-economic-2p": "6abdda3d404719ba37615a07", + "multiplayer-h200-u69-economic-3p": "6abdda3e404719ba37615a09", + "multiplayer-h200-u69-economic-4p": "6abdda3f404719ba37615a0b", + "multiplayer-h200-u69-economic-5p": "6abdda3f404719ba37615a0d", + "multiplayer-h200-u69-economic-6p": "6abdda40fbc85ba68235ec1c", + "multiplayer-h200-u69-a260-3p": "6abdda41404719ba37615a0f" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -24940,5 +24946,107 @@ "truncated": 0, "qualification_eligible": false } + }, + "multiplayer_h200_update69_screening": { + "candidate_revision": "1e81a160989c529ce6eaf3bba5b9e955dd07b113", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "training_games": 16800, + "training_truncated": 0, + "export_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 2115, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 37 + ], + "torch32": -0.0003528594970703125, + "onnx32": -0.0003643035888671875, + "reference64": -0.0003580369047426757 + } + ], + "torch_max_error": 6.727506551840179e-06, + "onnx_max_error": 1.3391253787631285e-05, + "winning_margin": 7.573301454443381 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 3.3676624298095703e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "strict_export_parity_passed": false, + "qualification_eligible": false, + "jobs": [ + { + "run": "multiplayer-h200-u69-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abdda3d404719ba37615a07", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-h200-u69-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abdda3e404719ba37615a09", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-h200-u69-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abdda3f404719ba37615a0b", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-h200-u69-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abdda3f404719ba37615a0d", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-h200-u69-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abdda40fbc85ba68235ec1c", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u69-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abdda41404719ba37615a0f", + "observed_stage": "SCHEDULING" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Latest update69 is distinct from internal best update39; compare with updates29,49,59.", + "reports": {} } } From dae1f150784347686bf853812530d9b993780d7e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 06:00:01 +0200 Subject: [PATCH 157/184] Record four completed update69 economic screens --- ai/strong/experiments.json | 450 ++++++++++++++++++++++++++++++++++++- 1 file changed, 445 insertions(+), 5 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 95ce97d..859688d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -25004,28 +25004,28 @@ "players": 2, "opponent": "economic", "job_id": "6abdda3d404719ba37615a07", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u69-economic-3p", "players": 3, "opponent": "economic", "job_id": "6abdda3e404719ba37615a09", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u69-economic-4p", "players": 4, "opponent": "economic", "job_id": "6abdda3f404719ba37615a0b", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u69-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abdda3f404719ba37615a0d", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u69-economic-6p", @@ -25047,6 +25047,446 @@ "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Latest update69 is distinct from internal best update39; compare with updates29,49,59.", - "reports": {} + "reports": { + "multiplayer-h200-u69-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/1e81a160989c529ce6eaf3bba5b9e955dd07b113/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.590625, + "truncated": 0, + "seconds": 23.929269987000225, + "inference_p95_ms": 0.3711642998496245, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.6875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5875, + 0.7875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.65, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.7625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4375, + 0.6875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.546875, + 0.6375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "54ef8b50c95c7605824e0b8258531d4e72edf12f" + }, + "multiplayer-h200-u69-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/1e81a160989c529ce6eaf3bba5b9e955dd07b113/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.6208333333333333, + "truncated": 0, + "seconds": 28.99925863899989, + "inference_p95_ms": 0.3944720001527457, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44166666666666665, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4083333333333333, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6416666666666667, + 0.8166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.7166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6416666666666667, + 0.7916666666666666 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5791666666666667, + 0.6625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "fa4406e03697c50ce365cc121be69d21ba66ac98" + }, + "multiplayer-h200-u69-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/1e81a160989c529ce6eaf3bba5b9e955dd07b113/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.6234375, + "truncated": 0, + "seconds": 39.660544398240745, + "inference_p95_ms": 0.4137270152568817, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.528125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.45, + 0.60625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.40625, + 0.56875 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.765625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.703125, + 0.828125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.7125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.64375, + 0.78125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.58828125, + 0.6578125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "fa4406e03697c50ce365cc121be69d21ba66ac98" + }, + "multiplayer-h200-u69-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/1e81a160989c529ce6eaf3bba5b9e955dd07b113/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.79875, + "truncated": 0, + "seconds": 45.606236663000345, + "inference_p95_ms": 0.41968059977079974, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.71, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.66, + 0.7601249999999982 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.735, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.66, + 0.805 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.93, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.895, + 0.96 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.82, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.755, + 0.88 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7675, + 0.83 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "fa4406e03697c50ce365cc121be69d21ba66ac98" + } + }, + "paired_against_h200_u29": { + "multiplayer-h200-u69-economic-2p": { + "independent_deals": 40, + "difference": 0.05625, + "paired_seed_bootstrap_95_interval": [ + -0.009375, + 0.125 + ] + }, + "multiplayer-h200-u69-economic-3p": { + "independent_deals": 40, + "difference": 0.017708333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.03854166666666666, + 0.071875 + ] + }, + "multiplayer-h200-u69-economic-4p": { + "independent_deals": 40, + "difference": 0.059375, + "paired_seed_bootstrap_95_interval": [ + 0.009375, + 0.10859375 + ] + }, + "multiplayer-h200-u69-economic-5p": { + "independent_deals": 40, + "difference": 0.035625000000000004, + "paired_seed_bootstrap_95_interval": [ + 0.0012499999999999998, + 0.07062500000000001 + ] + } + }, + "paired_against_h200_u49": { + "multiplayer-h200-u69-economic-2p": { + "independent_deals": 40, + "difference": 0.071875, + "paired_seed_bootstrap_95_interval": [ + 0.003125, + 0.14375 + ] + }, + "multiplayer-h200-u69-economic-3p": { + "independent_deals": 40, + "difference": 0.046875, + "paired_seed_bootstrap_95_interval": [ + -0.015624999999999991, + 0.109375 + ] + }, + "multiplayer-h200-u69-economic-4p": { + "independent_deals": 40, + "difference": 0.0515625, + "paired_seed_bootstrap_95_interval": [ + 0.003125, + 0.1015625 + ] + }, + "multiplayer-h200-u69-economic-5p": { + "independent_deals": 40, + "difference": 0.03375, + "paired_seed_bootstrap_95_interval": [ + -0.004999999999999999, + 0.07250000000000001 + ] + } + }, + "paired_against_h200_u59": { + "multiplayer-h200-u69-economic-2p": { + "independent_deals": 40, + "difference": 0.046875, + "paired_seed_bootstrap_95_interval": [ + -0.021875, + 0.11875 + ] + }, + "multiplayer-h200-u69-economic-3p": { + "independent_deals": 40, + "difference": 0.027083333333333327, + "paired_seed_bootstrap_95_interval": [ + -0.02291666666666666, + 0.07916666666666665 + ] + }, + "multiplayer-h200-u69-economic-4p": { + "independent_deals": 40, + "difference": 0.0140625, + "paired_seed_bootstrap_95_interval": [ + -0.03671875, + 0.06640625 + ] + }, + "multiplayer-h200-u69-economic-5p": { + "independent_deals": 40, + "difference": 0.046250000000000006, + "paired_seed_bootstrap_95_interval": [ + 0.012499999999999999, + 0.08 + ] + } + }, + "interim_interpretation": "Four economic screens complete (2\u20135 players), zero truncations. Update69 versus update29 has positive marginal paired 95% intervals at 4p and 5p; 2p and 3p remain uncertain. Await 6p and frozen A260 results before selection; numerical export failure still prevents qualification." } } From 9104e9ddbe217630fe55a167f690a6c85794a087 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 06:02:08 +0200 Subject: [PATCH 158/184] Complete update69 screening and retain qualification failures --- ai/strong/experiments.json | 266 ++++++++++++++++++++++++++++++++++++- 1 file changed, 262 insertions(+), 4 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 859688d..f152701 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -25032,17 +25032,17 @@ "players": 6, "opponent": "economic", "job_id": "6abdda40fbc85ba68235ec1c", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u69-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abdda41404719ba37615a0f", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, @@ -25383,6 +25383,174 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "fa4406e03697c50ce365cc121be69d21ba66ac98" + }, + "multiplayer-h200-u69-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/1e81a160989c529ce6eaf3bba5b9e955dd07b113/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.7598958333333333, + "truncated": 0, + "seconds": 53.243676392, + "inference_p95_ms": 0.4161089999996648, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.7520833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7020833333333333, + 0.8041666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5791666666666667, + 0.6958333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.825, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7708333333333334, + 0.875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.825, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7791666666666667, + 0.8666666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7380208333333333, + 0.7822916666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "cba1eb83c5a25e6d5b7062c59230e6c5f39b877b" + }, + "multiplayer-h200-u69-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/1e81a160989c529ce6eaf3bba5b9e955dd07b113/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.39791666666666664, + "truncated": 0, + "seconds": 79.17347744599999, + "inference_p95_ms": 0.3958130000000892, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.26666666666666666, + 0.48333333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.3333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.4083333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.38333333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.30833333333333335, + 0.4666666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.36041666666666666, + 0.4354166666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "cba1eb83c5a25e6d5b7062c59230e6c5f39b877b" } }, "paired_against_h200_u29": { @@ -25417,6 +25585,22 @@ 0.0012499999999999998, 0.07062500000000001 ] + }, + "multiplayer-h200-u69-economic-6p": { + "independent_deals": 40, + "difference": 0.07760416666666667, + "paired_seed_bootstrap_95_interval": [ + 0.04114583333333333, + 0.11458333333333334 + ] + }, + "multiplayer-h200-u69-a260-3p": { + "independent_deals": 40, + "difference": 0.042708333333333334, + "paired_seed_bootstrap_95_interval": [ + -0.002083333333333332, + 0.08645833333333333 + ] } }, "paired_against_h200_u49": { @@ -25451,6 +25635,22 @@ -0.004999999999999999, 0.07250000000000001 ] + }, + "multiplayer-h200-u69-economic-6p": { + "independent_deals": 40, + "difference": 0.022395833333333334, + "paired_seed_bootstrap_95_interval": [ + -0.013033854166666655, + 0.055221354166665536 + ] + }, + "multiplayer-h200-u69-a260-3p": { + "independent_deals": 40, + "difference": 0.016666666666666663, + "paired_seed_bootstrap_95_interval": [ + -0.03333333333333333, + 0.06458333333333333 + ] } }, "paired_against_h200_u59": { @@ -25485,8 +25685,66 @@ 0.012499999999999999, 0.08 ] + }, + "multiplayer-h200-u69-economic-6p": { + "independent_deals": 40, + "difference": 0.0078125, + "paired_seed_bootstrap_95_interval": [ + -0.02395833333333333, + 0.04166666666666667 + ] + }, + "multiplayer-h200-u69-a260-3p": { + "independent_deals": 40, + "difference": 0.075, + "paired_seed_bootstrap_95_interval": [ + 0.014583333333333337, + 0.13541666666666666 + ] } }, - "interim_interpretation": "Four economic screens complete (2\u20135 players), zero truncations. Update69 versus update29 has positive marginal paired 95% intervals at 4p and 5p; 2p and 3p remain uncertain. Await 6p and frozen A260 results before selection; numerical export failure still prevents qualification." + "a260_rule_summary": { + "original/False": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.375, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.26666666666666666, + 0.48333333333333334 + ] + }, + "original/True": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.3333333333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.4083333333333333 + ] + }, + "recharged/False": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.5, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.575 + ] + }, + "recharged/True": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.38333333333333336, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.30833333333333335, + 0.4666666666666667 + ] + } + }, + "interpretation": "All 3680 screening games completed with zero truncations. Economic 2\u20136p win rates: 59.0625%,62.083333%,62.34375%,79.875%,75.989583%. Frozen A260 3p:39.791667%, below40% floor. Paired improvement versus update49 is supported only at2p and4p; versus update59 only5p and A260 (marginal exploratory intervals). No universal promotion: A260 floor and strict export gate fail. Preserve current80-update horizons; await final H200 checkpoint before additional expensive search comparisons. Existing update49 six-player search result remains the supported raw-policy reference." } } From 83ec009ed891da7634b8646e66ceed0f097bf3d6 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 06:14:41 +0200 Subject: [PATCH 159/184] Verify higher-precision export resolves update69 numeric mismatch --- ai/strong/experiments.json | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index f152701..018bd7d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -25746,5 +25746,92 @@ } }, "interpretation": "All 3680 screening games completed with zero truncations. Economic 2\u20136p win rates: 59.0625%,62.083333%,62.34375%,79.875%,75.989583%. Frozen A260 3p:39.791667%, below40% floor. Paired improvement versus update49 is supported only at2p and4p; versus update59 only5p and A260 (marginal exploratory intervals). No universal promotion: A260 floor and strict export gate fail. Preserve current80-update horizons; await final H200 checkpoint before additional expensive search comparisons. Existing update49 six-player search result remains the supported raw-policy reference." + }, + "multiplayer_h200_update69_precise_export_probe": { + "status": "COMPLETED", + "source_checkpoint": { + "revision": "1e81a160989c529ce6eaf3bba5b9e955dd07b113", + "run": "multiplayer-refine-hard-v1", + "update": 69, + "hashes": { + "latest.onnx": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "latest.pt": "703f1a302a0a9f1df8d4be375087b54f8e64037a3021aa8d7ac0e0520db0f0f9", + "best.onnx": "5645ba36ee0aea48f0fd2c00b3499fac13c8df2ecf1270e70b98b24c14e3dcfb", + "best.pt": "4f3b589441f24939b52b68ed0fca2688a73adf6b662083ae13d9db04d5cd203c", + "metrics.json": "b3402eb5f42fdcbe154d596b5dfe1152fbae0c7d69a338236e00486be839512e", + "schema.json": "d3eb65a65cd3bbdfb2e09fc6caff0dc6e0953c1a939dc8ceeeb5c800c491eff6" + } + }, + "scope": "Local CPU-only conversion and inference; no gradient training or production changes.", + "unoptimized_float32_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 2115, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 37 + ], + "torch32": -0.0003528594970703125, + "onnx32": -0.0003643035888671875, + "reference64": -0.0003580369047426757 + } + ], + "torch_max_error": 6.727506551840179e-06, + "onnx_max_error": 1.3391253787631285e-05, + "winning_margin": 7.573301454443381 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 3.3676624298095703e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "precise_export_parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "1a895ef99ca3a9e66a1c887b97ac185dabf4feac27944874393a74d736725403", + "max_logit_error": 3.0517578125e-05, + "max_value_error": 1.430511474609375e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "onnx_graph_optimization": "ORT_DISABLE_ALL", + "internal_dtype": "float64", + "interface_dtype": "float32", + "default_runtime_result": "Default ORT optimization produces unsupported double QuickGelu CPU fusion; cannot load with the current default serving settings.", + "interpretation": "Higher-precision internal arithmetic with graph optimizations disabled passes the unchanged strict tolerance on all2553 fixtures and preserves every action. This is a distinct export hash, not retroactive qualification of the screened float32 artifact. Requires full serving configuration integration, AMD latency/compatibility validation, and strength qualification before use. Current screened candidate remains unqualified.", + "prototype_hashes": { + "export-double.py": "1faf4b2fb70fbdb8aee7355e342eef5b8b576fd999cba56b533b392f7629338f", + "check-unoptimized.py": "79959c238dd279a0c49c32df3e0e0d3c18eb0dfb9803ceb1ba0dcc6f2f252e48", + "precise.onnx": "1a895ef99ca3a9e66a1c887b97ac185dabf4feac27944874393a74d736725403" + } } } From 2c953b5b1d4a815b45bd1edfec2e2a6df43b43e0 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 06:16:38 +0200 Subject: [PATCH 160/184] Benchmark precise export on AMD8840U with matched inference fixtures --- ai/strong/experiments.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 018bd7d..70657f0 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -25832,6 +25832,31 @@ "export-double.py": "1faf4b2fb70fbdb8aee7355e342eef5b8b576fd999cba56b533b392f7629338f", "check-unoptimized.py": "79959c238dd279a0c49c32df3e0e0d3c18eb0dfb9803ceb1ba0dcc6f2f252e48", "precise.onnx": "1a895ef99ca3a9e66a1c887b97ac185dabf4feac27944874393a74d736725403" + }, + "amd_kernel_probe": { + "scope": "ONNX kernel inference only: excludes feature extraction, IPC and search", + "positions": 2553, + "cpu": "AMD Ryzen 7 8840U w/ Radeon 780M Graphics", + "onnxruntime": "1.30.0", + "models": { + "latest": { + "load_ms": 11.559786013094708, + "sha256": "a2602c3912d75ba3c6568666eb35bbf9d4a8b1e63fa323e4a1d16b4814c30ebb", + "optimization": "default", + "p50_ms": 0.10058397310785949, + "p95_ms": 0.18200099002569914 + }, + "precise": { + "load_ms": 8.723818988073617, + "sha256": "1a895ef99ca3a9e66a1c887b97ac185dabf4feac27944874393a74d736725403", + "optimization": "disabled", + "p50_ms": 0.40986001840792596, + "p95_ms": 0.6808546022512021 + } + }, + "action_mismatches": 0, + "script_sha256": "bd6a6eb4b5895bc7a6b835d41bf8c14ad93f6f1528ce0470d943f0080d6664fc", + "interpretation": "Same-position alternating execution on actual8840U, oneCPUthread,25warmups/model. Higher-precision median0.410ms versus0.101ms float32; p95 0.681ms versus0.182ms. Compatible and sub-millisecond for this kernel workload; excludes feature encoding/IPC/search and is not an end-to-end serving or browser benchmark. Does not qualify model strength." } } } From f9b0e2b9f577269a91b083bf03780a21afabeb9d Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:02:28 +0200 Subject: [PATCH 161/184] Pin geographic update59 and launch cross-count research screens --- ai/strong/experiments.json | 110 ++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 70657f0..1687adc 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -167,7 +167,13 @@ "multiplayer-h200-u69-economic-4p": "6abdda3f404719ba37615a0b", "multiplayer-h200-u69-economic-5p": "6abdda3f404719ba37615a0d", "multiplayer-h200-u69-economic-6p": "6abdda40fbc85ba68235ec1c", - "multiplayer-h200-u69-a260-3p": "6abdda41404719ba37615a0f" + "multiplayer-h200-u69-a260-3p": "6abdda41404719ba37615a0f", + "multiplayer-geoleague-u59-economic-2p": "6abde94dfbc85ba68235f3cb", + "multiplayer-geoleague-u59-economic-3p": "6abde94d404719ba37615fc5", + "multiplayer-geoleague-u59-economic-4p": "6abde94efbc85ba68235f3cd", + "multiplayer-geoleague-u59-economic-5p": "6abde94ffbc85ba68235f3cf", + "multiplayer-geoleague-u59-economic-6p": "6abde94f404719ba37615fc7", + "multiplayer-geoleague-u59-a260-3p": "6abde950404719ba37615fc9" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -25858,5 +25864,107 @@ "script_sha256": "bd6a6eb4b5895bc7a6b835d41bf8c14ad93f6f1528ce0470d943f0080d6664fc", "interpretation": "Same-position alternating execution on actual8840U, oneCPUthread,25warmups/model. Higher-precision median0.410ms versus0.101ms float32; p95 0.681ms versus0.182ms. Compatible and sub-millisecond for this kernel workload; excludes feature encoding/IPC/search and is not an end-to-end serving or browser benchmark. Does not qualify model strength." } + }, + "multiplayer_geoleague_update59_screening": { + "candidate_revision": "4fa8935876c0b0c327877dba5b1d7090a600ec1d", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "training_games": 14400, + "training_truncated": 0, + "export_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 1204, + "output": 0, + "player_count": 4, + "mismatches": [ + { + "index": [ + 0, + 13 + ], + "torch32": -0.026157379150390625, + "onnx32": -0.026170730590820312, + "reference64": -0.026163796804880235 + } + ], + "torch_max_error": 6.4176544896099585e-06, + "onnx_max_error": 1.0946535489608777e-05, + "winning_margin": 1.4176275627726511 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 3.546476364135742e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "strict_export_parity_passed": false, + "qualification_eligible": false, + "jobs": [ + { + "run": "multiplayer-geoleague-u59-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abde94dfbc85ba68235f3cb", + "observed_stage": "RUNNING" + }, + { + "run": "multiplayer-geoleague-u59-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abde94d404719ba37615fc5", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u59-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abde94efbc85ba68235f3cd", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u59-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abde94ffbc85ba68235f3cf", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u59-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abde94f404719ba37615fc7", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u59-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abde950404719ba37615fc9", + "observed_stage": "SCHEDULING" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Latest update59 is distinct from internal best update49; screen this immutable candidate explicitly.", + "reports": {} } } From 16b75dea2ee973ac2fe5ba9e76b66fece0de9be0 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:04:11 +0200 Subject: [PATCH 162/184] Record first geographic update59 screening results --- ai/strong/experiments.json | 271 ++++++++++++++++++++++++++++++++++++- 1 file changed, 265 insertions(+), 6 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 1687adc..ec52af5 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -25922,28 +25922,28 @@ "players": 2, "opponent": "economic", "job_id": "6abde94dfbc85ba68235f3cb", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u59-economic-3p", "players": 3, "opponent": "economic", "job_id": "6abde94d404719ba37615fc5", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u59-economic-4p", "players": 4, "opponent": "economic", "job_id": "6abde94efbc85ba68235f3cd", - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-geoleague-u59-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abde94ffbc85ba68235f3cf", - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" }, { "run": "multiplayer-geoleague-u59-economic-6p", @@ -25957,7 +25957,7 @@ "players": 3, "opponent": "a260", "job_id": "6abde950404719ba37615fc9", - "observed_stage": "SCHEDULING" + "observed_stage": "RUNNING" } ], "status": "RUNNING", @@ -25965,6 +25965,265 @@ "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, "decision": "Research-only screening of immutable export: all2553 actions match, but strict numerical parity fails one near-zero logit. Not eligible for qualification. Latest update59 is distinct from internal best update49; screen this immutable candidate explicitly.", - "reports": {} + "reports": { + "multiplayer-geoleague-u59-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/4fa8935876c0b0c327877dba5b1d7090a600ec1d/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.5703125, + "truncated": 0, + "seconds": 23.52241356484592, + "inference_p95_ms": 0.35430719144642253, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.59375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5, + 0.6875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.5125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3875, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.675, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5625, + 0.775 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.6125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.515625, + 0.625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "719e476f6012c71b6fd1250f0c807da7eff397b0" + }, + "multiplayer-geoleague-u59-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/4fa8935876c0b0c327877dba5b1d7090a600ec1d/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.56875, + "truncated": 0, + "seconds": 28.389926979999927, + "inference_p95_ms": 0.37617199993746897, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.44166666666666665, + 0.6333333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.525 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.7666666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5083333333333333, + 0.7 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5229166666666667, + 0.6145833333333334 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "cff704925861acbe373510e553f5f577c0cc302a" + } + }, + "paired_against_geoleague_u19": { + "multiplayer-geoleague-u59-economic-2p": { + "independent_deals": 40, + "difference": 0.0515625, + "paired_seed_bootstrap_95_interval": [ + -0.03125, + 0.134375 + ] + }, + "multiplayer-geoleague-u59-economic-3p": { + "independent_deals": 40, + "difference": 0.028125, + "paired_seed_bootstrap_95_interval": [ + -0.029166666666666664, + 0.08541666666666667 + ] + } + }, + "paired_against_geoleague_u29": { + "multiplayer-geoleague-u59-economic-2p": { + "independent_deals": 40, + "difference": 0.0484375, + "paired_seed_bootstrap_95_interval": [ + -0.0421875, + 0.140625 + ] + }, + "multiplayer-geoleague-u59-economic-3p": { + "independent_deals": 40, + "difference": 0.018749999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.04375000000000001, + 0.08125 + ] + } + }, + "paired_against_geoleague_u49": { + "multiplayer-geoleague-u59-economic-2p": { + "independent_deals": 40, + "difference": 0.0546875, + "paired_seed_bootstrap_95_interval": [ + -0.0125, + 0.121875 + ] + }, + "multiplayer-geoleague-u59-economic-3p": { + "independent_deals": 40, + "difference": -0.00625, + "paired_seed_bootstrap_95_interval": [ + -0.05625, + 0.04375 + ] + } + }, + "paired_against_h200_u49": { + "multiplayer-geoleague-u59-economic-2p": { + "independent_deals": 40, + "difference": 0.0515625, + "paired_seed_bootstrap_95_interval": [ + -0.0265625, + 0.1296875 + ] + }, + "multiplayer-geoleague-u59-economic-3p": { + "independent_deals": 40, + "difference": -0.00520833333333334, + "paired_seed_bootstrap_95_interval": [ + -0.065625, + 0.05208333333333333 + ] + } + }, + "paired_against_h200_u69": { + "multiplayer-geoleague-u59-economic-2p": { + "independent_deals": 40, + "difference": -0.0203125, + "paired_seed_bootstrap_95_interval": [ + -0.0859375, + 0.0484375 + ] + }, + "multiplayer-geoleague-u59-economic-3p": { + "independent_deals": 40, + "difference": -0.052083333333333336, + "paired_seed_bootstrap_95_interval": [ + -0.10833333333333335, + 0.004166666666666663 + ] + } + } } } From 5015675a97b720935ea46e4026f5dc9402da616e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:06:00 +0200 Subject: [PATCH 163/184] Complete geographic update59 screening and document regressions --- ai/strong/experiments.json | 551 ++++++++++++++++++++++++++++++++++++- 1 file changed, 545 insertions(+), 6 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ec52af5..a4e6242 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -25936,31 +25936,31 @@ "players": 4, "opponent": "economic", "job_id": "6abde94efbc85ba68235f3cd", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u59-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abde94ffbc85ba68235f3cf", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u59-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abde94f404719ba37615fc7", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u59-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abde950404719ba37615fc9", - "observed_stage": "RUNNING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, @@ -26133,6 +26133,342 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "cff704925861acbe373510e553f5f577c0cc302a" + }, + "multiplayer-geoleague-u59-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/4fa8935876c0b0c327877dba5b1d7090a600ec1d/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.34479166666666666, + "truncated": 0, + "seconds": 69.83023151475936, + "inference_p95_ms": 0.39826296269893646, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.25833333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.32916666666666666 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.225, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15833333333333333, + 0.2916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.5083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.6166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.3875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.475 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.3, + 0.38958333333333334 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "c9f213c7d262f2f07ac44ed57565a2a1dc2e6297" + }, + "multiplayer-geoleague-u59-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/4fa8935876c0b0c327877dba5b1d7090a600ec1d/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.440625, + "truncated": 0, + "seconds": 37.63732778800001, + "inference_p95_ms": 0.39796195000434414, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.35625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.28125, + 0.4375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.44375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.56875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.6625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.54375 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.39375, + 0.4859375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "e4e8e40f75da1c48c3d0c6bf0cec8ffe983b5299" + }, + "multiplayer-geoleague-u59-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/4fa8935876c0b0c327877dba5b1d7090a600ec1d/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.628125, + "truncated": 0, + "seconds": 43.38755807300001, + "inference_p95_ms": 0.41190274999891585, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.505, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.445, + 0.56 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.62, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.555, + 0.68 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.6925, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6225, + 0.76 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.695, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6175, + 0.7675 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.588109375, + 0.666875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "e4e8e40f75da1c48c3d0c6bf0cec8ffe983b5299" + }, + "multiplayer-geoleague-u59-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/4fa8935876c0b0c327877dba5b1d7090a600ec1d/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "75e0b4698b675d5d063c42f97c0b84b97eed5578d808048ac3d4da97cc4d4797", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.5619791666666667, + "truncated": 0, + "seconds": 48.703642769, + "inference_p95_ms": 0.40798545000910724, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.42291666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.48125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.5541666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.48333333333333334, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.6041666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5333333333333333, + 0.675 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5916666666666667, + 0.7375 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5239583333333333, + 0.6020833333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "e4e8e40f75da1c48c3d0c6bf0cec8ffe983b5299" } }, "paired_against_geoleague_u19": { @@ -26151,6 +26487,38 @@ -0.029166666666666664, 0.08541666666666667 ] + }, + "multiplayer-geoleague-u59-a260-3p": { + "independent_deals": 40, + "difference": 0.01979166666666667, + "paired_seed_bootstrap_95_interval": [ + -0.040625, + 0.07916666666666668 + ] + }, + "multiplayer-geoleague-u59-economic-4p": { + "independent_deals": 40, + "difference": -0.1234375, + "paired_seed_bootstrap_95_interval": [ + -0.1734375, + -0.0734375 + ] + }, + "multiplayer-geoleague-u59-economic-5p": { + "independent_deals": 40, + "difference": -0.055624999999999994, + "paired_seed_bootstrap_95_interval": [ + -0.10375000000000001, + -0.01 + ] + }, + "multiplayer-geoleague-u59-economic-6p": { + "independent_deals": 40, + "difference": -0.05729166666666667, + "paired_seed_bootstrap_95_interval": [ + -0.10416666666666667, + -0.009374999999999998 + ] } }, "paired_against_geoleague_u29": { @@ -26169,6 +26537,38 @@ -0.04375000000000001, 0.08125 ] + }, + "multiplayer-geoleague-u59-a260-3p": { + "independent_deals": 40, + "difference": 0.042708333333333334, + "paired_seed_bootstrap_95_interval": [ + -0.010416666666666668, + 0.09791666666666665 + ] + }, + "multiplayer-geoleague-u59-economic-4p": { + "independent_deals": 40, + "difference": -0.14375, + "paired_seed_bootstrap_95_interval": [ + -0.2015625, + -0.084375 + ] + }, + "multiplayer-geoleague-u59-economic-5p": { + "independent_deals": 40, + "difference": -0.025625, + "paired_seed_bootstrap_95_interval": [ + -0.06999999999999999, + 0.015625000000000003 + ] + }, + "multiplayer-geoleague-u59-economic-6p": { + "independent_deals": 40, + "difference": -0.033333333333333326, + "paired_seed_bootstrap_95_interval": [ + -0.0734375, + 0.00625 + ] } }, "paired_against_geoleague_u49": { @@ -26187,6 +26587,38 @@ -0.05625, 0.04375 ] + }, + "multiplayer-geoleague-u59-a260-3p": { + "independent_deals": 40, + "difference": -0.02395833333333334, + "paired_seed_bootstrap_95_interval": [ + -0.08854166666666667, + 0.038541666666666655 + ] + }, + "multiplayer-geoleague-u59-economic-4p": { + "independent_deals": 40, + "difference": -0.1390625, + "paired_seed_bootstrap_95_interval": [ + -0.1875, + -0.0921875 + ] + }, + "multiplayer-geoleague-u59-economic-5p": { + "independent_deals": 40, + "difference": -0.058125, + "paired_seed_bootstrap_95_interval": [ + -0.095625, + -0.021875 + ] + }, + "multiplayer-geoleague-u59-economic-6p": { + "independent_deals": 40, + "difference": -0.03697916666666666, + "paired_seed_bootstrap_95_interval": [ + -0.07135416666666666, + -0.0015625 + ] } }, "paired_against_h200_u49": { @@ -26205,6 +26637,38 @@ -0.065625, 0.05208333333333333 ] + }, + "multiplayer-geoleague-u59-a260-3p": { + "independent_deals": 40, + "difference": -0.03645833333333333, + "paired_seed_bootstrap_95_interval": [ + -0.09270833333333332, + 0.020833333333333336 + ] + }, + "multiplayer-geoleague-u59-economic-4p": { + "independent_deals": 40, + "difference": -0.13125, + "paired_seed_bootstrap_95_interval": [ + -0.1875, + -0.0765625 + ] + }, + "multiplayer-geoleague-u59-economic-5p": { + "independent_deals": 40, + "difference": -0.136875, + "paired_seed_bootstrap_95_interval": [ + -0.18250000000000002, + -0.0925 + ] + }, + "multiplayer-geoleague-u59-economic-6p": { + "independent_deals": 40, + "difference": -0.17552083333333335, + "paired_seed_bootstrap_95_interval": [ + -0.2276171875, + -0.1234375 + ] } }, "paired_against_h200_u69": { @@ -26223,7 +26687,82 @@ -0.10833333333333335, 0.004166666666666663 ] + }, + "multiplayer-geoleague-u59-a260-3p": { + "independent_deals": 40, + "difference": -0.053125, + "paired_seed_bootstrap_95_interval": [ + -0.10416666666666666, + -0.0010416666666666712 + ] + }, + "multiplayer-geoleague-u59-economic-4p": { + "independent_deals": 40, + "difference": -0.1828125, + "paired_seed_bootstrap_95_interval": [ + -0.2296875, + -0.1359375 + ] + }, + "multiplayer-geoleague-u59-economic-5p": { + "independent_deals": 40, + "difference": -0.170625, + "paired_seed_bootstrap_95_interval": [ + -0.21437499999999998, + -0.12687500000000002 + ] + }, + "multiplayer-geoleague-u59-economic-6p": { + "independent_deals": 40, + "difference": -0.19791666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.2375, + -0.1578125 + ] } - } + }, + "a260_rule_summary": { + "original/False": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.25833333333333336, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.1875, + 0.32916666666666666 + ] + }, + "original/True": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.225, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.15833333333333333, + 0.2916666666666667 + ] + }, + "recharged/False": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.5083333333333333, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.6166666666666667 + ] + }, + "recharged/True": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.3875, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.475 + ] + } + }, + "interpretation": "All3680 screening games completed with zero actual/search truncations. Economic2\u20136p:57.03125%,56.875%,44.0625%,62.8125%,56.197917%; frozenA2603p34.479167%, below40% floor. Versus geographic19, supported regressions at4p(-12.34375pp,95% paired interval -17.34375 to -7.34375),5p(-5.5625pp,-10.375 to -1),6p(-5.729167pp,-10.416667 to -0.9375); other comparisons with geographic19 uncertain. No promotion or expensive search screening. Preserve existing80-update horizon; checkpoint59 fails strength and strict float32 export gates." } } From 8dc608a2b16058e53aa4429da3743a0c5c92ab00 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:20:47 +0200 Subject: [PATCH 164/184] Validate final H200 update79 export and launch strength screening --- ai/strong/experiments.json | 82 +++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a4e6242..a7466ad 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -173,7 +173,13 @@ "multiplayer-geoleague-u59-economic-4p": "6abde94efbc85ba68235f3cd", "multiplayer-geoleague-u59-economic-5p": "6abde94ffbc85ba68235f3cf", "multiplayer-geoleague-u59-economic-6p": "6abde94f404719ba37615fc7", - "multiplayer-geoleague-u59-a260-3p": "6abde950404719ba37615fc9" + "multiplayer-geoleague-u59-a260-3p": "6abde950404719ba37615fc9", + "multiplayer-h200-u79-economic-2p": "6abded98fbc85ba68235f5be", + "multiplayer-h200-u79-economic-3p": "6abded99fbc85ba68235f5c0", + "multiplayer-h200-u79-economic-4p": "6abded9afbc85ba68235f5c2", + "multiplayer-h200-u79-economic-5p": "6abded9b404719ba3761615b", + "multiplayer-h200-u79-economic-6p": "6abded9bfbc85ba68235f5c4", + "multiplayer-h200-u79-a260-3p": "6abded9c404719ba3761615d" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -26764,5 +26770,79 @@ } }, "interpretation": "All3680 screening games completed with zero actual/search truncations. Economic2\u20136p:57.03125%,56.875%,44.0625%,62.8125%,56.197917%; frozenA2603p34.479167%, below40% floor. Versus geographic19, supported regressions at4p(-12.34375pp,95% paired interval -17.34375 to -7.34375),5p(-5.5625pp,-10.375 to -1),6p(-5.729167pp,-10.416667 to -0.9375); other comparisons with geographic19 uncertain. No promotion or expensive search screening. Preserve existing80-update horizon; checkpoint59 fails strength and strict float32 export gates." + }, + "multiplayer_h200_update79_screening": { + "candidate_revision": "0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a", + "model_path": "runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "training_games": 19200, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "max_logit_error": 6.103515625e-05, + "max_value_error": 3.1888484954833984e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-h200-u79-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abded98fbc85ba68235f5be", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u79-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abded99fbc85ba68235f5c0", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u79-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abded9afbc85ba68235f5c2", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u79-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abded9b404719ba3761615b", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u79-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abded9bfbc85ba68235f5c4", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-h200-u79-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abded9c404719ba3761615d", + "observed_stage": "SCHEDULING" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Await six complete paired screens. Latest and internal best both update79; internal selection does not establish external strength.", + "reports": {} } } From 70d0bcc4463b2c2e82218161762b12558b7caef8 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:22:27 +0200 Subject: [PATCH 165/184] Record successful completion of H200 training horizon --- ai/strong/experiments.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index a7466ad..8500f45 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -26843,6 +26843,15 @@ "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, "decision": "Await six complete paired screens. Latest and internal best both update79; internal selection does not establish external strength.", - "reports": {} + "reports": {}, + "training_job_completion": { + "job_id": "6abd57b1fbc85ba68235c5fb", + "observed_stage": "COMPLETED", + "updates": 80, + "training_games": 19200, + "training_truncated": 0, + "checkpoint_revision": "0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a", + "note": "Training endpoint complete; six external screens still scheduling. No strength qualification implied." + } } } From d41cf406145fee7d256f05ecc7476e38f9b85558 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:24:24 +0200 Subject: [PATCH 166/184] Complete final H200 screening and reject universal qualification --- ai/strong/experiments.json | 766 ++++++++++++++++++++++++++++++++++++- 1 file changed, 757 insertions(+), 9 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 8500f45..1d8bf77 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -26800,50 +26800,555 @@ "players": 2, "opponent": "economic", "job_id": "6abded98fbc85ba68235f5be", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u79-economic-3p", "players": 3, "opponent": "economic", "job_id": "6abded99fbc85ba68235f5c0", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u79-economic-4p", "players": 4, "opponent": "economic", "job_id": "6abded9afbc85ba68235f5c2", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u79-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abded9b404719ba3761615b", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u79-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abded9bfbc85ba68235f5c4", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-h200-u79-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abded9c404719ba3761615d", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, "decision": "Await six complete paired screens. Latest and internal best both update79; internal selection does not establish external strength.", - "reports": {}, + "reports": { + "multiplayer-h200-u79-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.634375, + "truncated": 0, + "seconds": 23.645317415000008, + "inference_p95_ms": 0.3664627999995671, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.725 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.6125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5125, + 0.7125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.6625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55, + 0.775 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.584375, + 0.684375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7520df3aba42a3af8dabe273b3a425ea763a5343" + }, + "multiplayer-h200-u79-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.6083333333333333, + "truncated": 0, + "seconds": 29.753998401999993, + "inference_p95_ms": 0.41583100000295303, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.45, + 0.6166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.5833333333333334 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6333333333333333, + 0.8 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6833333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.7666666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5666666666666667, + 0.6479687499999993 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7520df3aba42a3af8dabe273b3a425ea763a5343" + }, + "multiplayer-h200-u79-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.596875, + "truncated": 0, + "seconds": 39.95406749299998, + "inference_p95_ms": 0.41740000000061167, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.4875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.40625, + 0.56875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.4375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.5 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.76875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7, + 0.8375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.69375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6125, + 0.775 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.55625, + 0.6375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7520df3aba42a3af8dabe273b3a425ea763a5343" + }, + "multiplayer-h200-u79-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.776875, + "truncated": 0, + "seconds": 45.04826969000001, + "inference_p95_ms": 0.42543500000533624, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.68, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.61, + 0.745 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.77, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.71, + 0.825 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.835, + 0.915 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.7825, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.72, + 0.8425 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.743125, + 0.811875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7520df3aba42a3af8dabe273b3a425ea763a5343" + }, + "multiplayer-h200-u79-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.7328125, + "truncated": 0, + "seconds": 51.412174969999995, + "inference_p95_ms": 0.42684800000216666, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.675, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6125, + 0.7375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6895833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.625, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.8333333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7875, + 0.8791666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.7333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6625, + 0.8 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7020833333333333, + 0.7625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7520df3aba42a3af8dabe273b3a425ea763a5343" + }, + "multiplayer-h200-u79-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a/runs/multiplayer-refine-hard-v1/latest.onnx", + "model_sha256": "2f1dd42625ea86404155e63124e55d95d07016027a0ceda4e08164357b554927", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.33541666666666664, + "truncated": 0, + "seconds": 69.359705948, + "inference_p95_ms": 0.3961889499969116, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.30833333333333335, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.21666666666666667, + 0.4083333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.275, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.3416666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.44166666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3416666666666667, + 0.5416666666666666 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.31666666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.23333333333333334, + 0.4083333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.2875, + 0.38125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "7520df3aba42a3af8dabe273b3a425ea763a5343" + } + }, "training_job_completion": { "job_id": "6abd57b1fbc85ba68235c5fb", "observed_stage": "COMPLETED", @@ -26852,6 +27357,249 @@ "training_truncated": 0, "checkpoint_revision": "0aeacd5b8e36ece36ba06a77ddfd7b86110d4f3a", "note": "Training endpoint complete; six external screens still scheduling. No strength qualification implied." - } + }, + "paired_against_h200_u29": { + "multiplayer-h200-u79-economic-2p": { + "independent_deals": 40, + "difference": 0.1, + "paired_seed_bootstrap_95_interval": [ + 0.01875, + 0.18125 + ] + }, + "multiplayer-h200-u79-economic-3p": { + "independent_deals": 40, + "difference": 0.005208333333333336, + "paired_seed_bootstrap_95_interval": [ + -0.04270833333333333, + 0.052083333333333336 + ] + }, + "multiplayer-h200-u79-economic-4p": { + "independent_deals": 40, + "difference": 0.0328125, + "paired_seed_bootstrap_95_interval": [ + -0.02421875, + 0.09140625 + ] + }, + "multiplayer-h200-u79-economic-5p": { + "independent_deals": 40, + "difference": 0.013749999999999998, + "paired_seed_bootstrap_95_interval": [ + -0.026875000000000003, + 0.05500000000000001 + ] + }, + "multiplayer-h200-u79-economic-6p": { + "independent_deals": 40, + "difference": 0.05052083333333333, + "paired_seed_bootstrap_95_interval": [ + 0.0140625, + 0.08645833333333333 + ] + }, + "multiplayer-h200-u79-a260-3p": { + "independent_deals": 40, + "difference": -0.019791666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.08020833333333333, + 0.040625 + ] + } + }, + "paired_against_h200_u49": { + "multiplayer-h200-u79-economic-2p": { + "independent_deals": 40, + "difference": 0.115625, + "paired_seed_bootstrap_95_interval": [ + 0.04375, + 0.190625 + ] + }, + "multiplayer-h200-u79-economic-3p": { + "independent_deals": 40, + "difference": 0.034375, + "paired_seed_bootstrap_95_interval": [ + -0.012500000000000002, + 0.08125 + ] + }, + "multiplayer-h200-u79-economic-4p": { + "independent_deals": 40, + "difference": 0.025, + "paired_seed_bootstrap_95_interval": [ + -0.0328125, + 0.084375 + ] + }, + "multiplayer-h200-u79-economic-5p": { + "independent_deals": 40, + "difference": 0.011875000000000004, + "paired_seed_bootstrap_95_interval": [ + -0.028125, + 0.053125 + ] + }, + "multiplayer-h200-u79-economic-6p": { + "independent_deals": 40, + "difference": -0.0046875, + "paired_seed_bootstrap_95_interval": [ + -0.041145833333333326, + 0.03125 + ] + }, + "multiplayer-h200-u79-a260-3p": { + "independent_deals": 40, + "difference": -0.04583333333333332, + "paired_seed_bootstrap_95_interval": [ + -0.11041666666666665, + 0.016666666666666673 + ] + } + }, + "paired_against_h200_u59": { + "multiplayer-h200-u79-economic-2p": { + "independent_deals": 40, + "difference": 0.090625, + "paired_seed_bootstrap_95_interval": [ + 0.021875, + 0.1625 + ] + }, + "multiplayer-h200-u79-economic-3p": { + "independent_deals": 40, + "difference": 0.014583333333333334, + "paired_seed_bootstrap_95_interval": [ + -0.04583333333333332, + 0.07708333333333332 + ] + }, + "multiplayer-h200-u79-economic-4p": { + "independent_deals": 40, + "difference": -0.0125, + "paired_seed_bootstrap_95_interval": [ + -0.0703125, + 0.0453125 + ] + }, + "multiplayer-h200-u79-economic-5p": { + "independent_deals": 40, + "difference": 0.024375, + "paired_seed_bootstrap_95_interval": [ + -0.011250000000000001, + 0.058750000000000004 + ] + }, + "multiplayer-h200-u79-economic-6p": { + "independent_deals": 40, + "difference": -0.019270833333333334, + "paired_seed_bootstrap_95_interval": [ + -0.0484375, + 0.011458333333333334 + ] + }, + "multiplayer-h200-u79-a260-3p": { + "independent_deals": 40, + "difference": 0.012499999999999994, + "paired_seed_bootstrap_95_interval": [ + -0.05, + 0.075 + ] + } + }, + "paired_against_h200_u69": { + "multiplayer-h200-u79-economic-2p": { + "independent_deals": 40, + "difference": 0.04375, + "paired_seed_bootstrap_95_interval": [ + -0.01875, + 0.10625 + ] + }, + "multiplayer-h200-u79-economic-3p": { + "independent_deals": 40, + "difference": -0.012499999999999994, + "paired_seed_bootstrap_95_interval": [ + -0.06666666666666667, + 0.04375 + ] + }, + "multiplayer-h200-u79-economic-4p": { + "independent_deals": 40, + "difference": -0.0265625, + "paired_seed_bootstrap_95_interval": [ + -0.06640625, + 0.01796875 + ] + }, + "multiplayer-h200-u79-economic-5p": { + "independent_deals": 40, + "difference": -0.021875, + "paired_seed_bootstrap_95_interval": [ + -0.048124999999999994, + 0.0037500000000000025 + ] + }, + "multiplayer-h200-u79-economic-6p": { + "independent_deals": 40, + "difference": -0.02708333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.05625, + 0.0015625 + ] + }, + "multiplayer-h200-u79-a260-3p": { + "independent_deals": 40, + "difference": -0.0625, + "paired_seed_bootstrap_95_interval": [ + -0.11666666666666667, + -0.00833333333333333 + ] + } + }, + "a260_rule_summary": { + "original/False": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.30833333333333335, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.21666666666666667, + 0.4083333333333333 + ] + }, + "original/True": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.275, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.3416666666666667 + ] + }, + "recharged/False": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.44166666666666665, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3416666666666667, + 0.5416666666666666 + ] + }, + "recharged/True": { + "games": 120, + "independent_seeds": 40, + "win_rate": 0.31666666666666665, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.23333333333333334, + 0.4083333333333333 + ] + } + }, + "interpretation": "All3680 held-out development screening games completed with zero actual/search truncations. Economic2\u20136p win rates63.4375%,60.833333%,59.6875%,77.6875%,73.28125%; frozenA2603p33.541667%, below40% floor. Final80-update training endpoint and strict export success do not qualify this model. Internal-best selection did not deliver universal external strength. Preserve earlier candidates and reserved final seeds; do not extend the same H200 recipe solely because training finished. Further work should change training/opponent coverage based on the observed sealed-auction and frozen-opponent weaknesses, while the geographic80-update run completes." } } From dabc9e27030cc9fe800048ff6f0e1c224bdc8fc2 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:26:20 +0200 Subject: [PATCH 167/184] Decouple optional league admission from heuristic checkpoint selection --- ai/strong/snapshot_league.py | 32 ++++++++++++++++++++++++++ ai/strong/test_snapshot_league.py | 37 +++++++++++++++++++++++++++++++ ai/strong/train.py | 19 ++++++++++++---- 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 ai/strong/snapshot_league.py create mode 100644 ai/strong/test_snapshot_league.py diff --git a/ai/strong/snapshot_league.py b/ai/strong/snapshot_league.py new file mode 100644 index 0000000..176bdd1 --- /dev/null +++ b/ai/strong/snapshot_league.py @@ -0,0 +1,32 @@ +"""Frozen PPO opponents, with admission independent of model selection when requested.""" +import copy + + +class SnapshotLeague: + def __init__(self, net, admission="best", interval=10): + if admission not in {"best", "periodic_anchor"}: + raise ValueError("Unknown snapshot admission policy") + if interval < 1: + raise ValueError("Snapshot interval must be positive") + self.admission = admission + self.interval = interval + self.actors = [self._freeze(net)] + self.updates = [-1] + + @staticmethod + def _freeze(net): + actor = copy.deepcopy(net).eval() + actor.requires_grad_(False) + return actor + + def admit(self, net, update, improved=False): + due = improved if self.admission == "best" else (update + 1) % self.interval == 0 + if not due or update in self.updates: + return False + self.actors.append(self._freeze(net)) + self.updates.append(update) + if len(self.actors) > 3: + indices = [-3, -2, -1] if self.admission == "best" else [0, -2, -1] + self.actors = [self.actors[i] for i in indices] + self.updates = [self.updates[i] for i in indices] + return True diff --git a/ai/strong/test_snapshot_league.py b/ai/strong/test_snapshot_league.py new file mode 100644 index 0000000..e705a0f --- /dev/null +++ b/ai/strong/test_snapshot_league.py @@ -0,0 +1,37 @@ +import unittest +import torch +from snapshot_league import SnapshotLeague + + +class LeagueTests(unittest.TestCase): + def test_periodic_admission_survives_flat_selection_and_preserves_anchor(self): + net = torch.nn.Linear(1, 1) + league = SnapshotLeague(net, "periodic_anchor", 2) + original = net.weight.detach().clone() + for update in range(8): + with torch.no_grad(): + net.weight.add_(1) + league.admit(net, update, improved=False) + self.assertEqual(league.updates, [-1, 5, 7]) + torch.testing.assert_close(league.actors[0].weight, original) + torch.testing.assert_close(league.actors[1].weight, original + 6) + torch.testing.assert_close(league.actors[2].weight, original + 8) + self.assertFalse(league.admit(net, 7)) + self.assertTrue(all(not a.training and not a.weight.requires_grad for a in league.actors)) + + def test_legacy_admission_keeps_last_three_improvements(self): + net = torch.nn.Linear(1, 1) + league = SnapshotLeague(net) + self.assertFalse(league.admit(net, 0, improved=False)) + for u in [9, 19, 29]: + self.assertTrue(league.admit(net, u, improved=True)) + self.assertEqual(league.updates, [9, 19, 29]) + + def test_invalid_configuration_is_rejected(self): + for mode, interval in [('unknown', 10), ('best', 0)]: + with self.assertRaises(ValueError): + SnapshotLeague(torch.nn.Linear(1, 1), mode, interval) + + +if __name__ == '__main__': + unittest.main() diff --git a/ai/strong/train.py b/ai/strong/train.py index 154e99d..e75ea7c 100644 --- a/ai/strong/train.py +++ b/ai/strong/train.py @@ -14,6 +14,7 @@ from model_v4 import MultiplayerPolicy from multiplayer import ROLE_REVISIONS, rotate_outcome, balance_training_rows from pool import EnginePool from arena_statistics import search_summary +from snapshot_league import SnapshotLeague from huggingface_hub import HfApi, hf_hub_download from feature_contract import FEATURE_REVISION, embed_revision @@ -106,10 +107,14 @@ if async_rollout: if workers != nenv: raise ValueError("Async rollout requires WORKERS == ENVS") rollout_class = AsyncEnginePool +league = SnapshotLeague( + net, + os.getenv("SNAPSHOT_ADMISSION", "best"), + int(os.getenv("SNAPSHOT_INTERVAL", "10")), +) rollout = rollout_class( workers, seed=f"strong-train-{seed}", script="ai/strong/bridge.cjs" ) -snapshots = [copy.deepcopy(net).eval()] metrics = [] best = -1 update = -1 @@ -128,6 +133,9 @@ def save(name, export=False): "mixed_player_counts": mix_player_counts, "training_device": device, "async_rollout": async_rollout, + "snapshot_admission": league.admission, + "snapshot_interval": league.interval, + "snapshot_updates": league.updates, "initial_checkpoint": initial_checkpoint, "initial_revision": initial_revision, "initial_feature_revision": checkpoint.get("feature_revision", "3.0") @@ -349,7 +357,7 @@ try: actor = ( net if role == "learner" - else snapshots[int(role[-1]) % len(snapshots)] + else league.actors[int(role[-1]) % len(league.actors)] ) with torch.no_grad(): logits, vs = actor(*tensors([rows[j] for j in indices], device)) @@ -536,6 +544,9 @@ try: group["wins"] += ending["value"][ending["roles"].index("learner")] group["truncated"] += ending["truncated"] metric["training_opponents"] = opponent_outcomes + metric["snapshot_updates"] = list(league.updates) + if league.admission == "periodic_anchor": + league.admit(net, update) metric.update(search_summary(endings)) metrics.append(metric) print(json.dumps(metric), flush=True) @@ -548,8 +559,8 @@ try: score = selection_score(evaluation) if score > best: best = score - snapshots.append(copy.deepcopy(net).eval()) - snapshots = snapshots[-3:] + if league.admission == "best": + league.admit(net, update, improved=True) save("best", export=True) save("latest", export=True) finally: From be7d4015b8db0c1dc3181acea024cb42c87b0a9b Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:34:03 +0200 Subject: [PATCH 168/184] Launch matched league admission pilot on HF Jobs --- ai/strong/experiments.json | 62 ++++++++++++++++++++++++- ai/strong/launch-league-admission-v1.sh | 39 ++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 ai/strong/launch-league-admission-v1.sh diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 1d8bf77..ca843f1 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -179,7 +179,9 @@ "multiplayer-h200-u79-economic-4p": "6abded9afbc85ba68235f5c2", "multiplayer-h200-u79-economic-5p": "6abded9b404719ba3761615b", "multiplayer-h200-u79-economic-6p": "6abded9bfbc85ba68235f5c4", - "multiplayer-h200-u79-a260-3p": "6abded9c404719ba3761615d" + "multiplayer-h200-u79-a260-3p": "6abded9c404719ba3761615d", + "multiplayer-league-admission-v1-best": "6abdef75404719ba37616230", + "multiplayer-league-admission-v1-periodic-anchor": "6abdef76fbc85ba68235f6a0" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -27601,5 +27603,63 @@ } }, "interpretation": "All3680 held-out development screening games completed with zero actual/search truncations. Economic2\u20136p win rates63.4375%,60.833333%,59.6875%,77.6875%,73.28125%; frozenA2603p33.541667%, below40% floor. Final80-update training endpoint and strict export success do not qualify this model. Internal-best selection did not deliver universal external strength. Preserve earlier candidates and reserved final seeds; do not extend the same H200 recipe solely because training finished. Further work should change training/opponent coverage based on the observed sealed-auction and frozen-opponent weaknesses, while the geographic80-update run completes." + }, + "multiplayer_league_admission_v1": { + "status": "RUNNING", + "source": { + "archive": "strong-source-v34.tgz", + "revision": "2c273f96562d0cc2f8c05a2735d8c0492ab77fd8", + "base_revision": "be9262485a29f38dd5c7f0f8442909d70bb98b94", + "changed_files": [ + "ai/strong/train.py", + "ai/strong/snapshot_league.py", + "ai/strong/test_snapshot_league.py" + ], + "archive_sha256": "d79a5dd588c746e1c0036c108b828bbe9fcf42974b3b720f53c59b003be5e5ba" + }, + "initial_checkpoint": "runs/multiplayer-refine-hard-v1/best.pt", + "initial_revision": "fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b", + "initial_update": 29, + "seed": 9021, + "updates": 20, + "games_per_update": 240, + "player_counts": [ + 2, + 3, + 4, + 5, + 6 + ], + "opponent_mode": "mixed_search_geo", + "snapshot_interval": 5, + "jobs": [ + { + "run": "multiplayer-league-admission-v1-best", + "job_id": "6abdef75404719ba37616230", + "admission": "best" + }, + { + "run": "multiplayer-league-admission-v1-periodic-anchor", + "job_id": "6abdef76fbc85ba68235f6a0", + "admission": "periodic_anchor" + } + ], + "hypothesis": "Periodic admission with retained starting policy improves robustness versus score-gated last-three admission. Both arms share source, initial checkpoint, seed, geography-aware search opponent mix and optimizer settings.", + "limitations": "Single training seed pilot. Async scheduling may change stochastic trajectories; configuration matching does not imply identical rollout RNG. Need paired held-out external screens before strength claims; final reserved seeds remain unused.", + "evaluation_plan": "Evaluate published updates9 and19 versus economic across2\u20136 and frozenA2603p, then select additional search screens only if supported. Neither arm trains against frozenA260.", + "training_location": "HF Jobs only", + "startup_verified": { + "checked_at": "2026-10-01T05:33:52.157124+00:00", + "both_jobs_running": true, + "startup_checks_passed": true, + "initial_evaluation_completed": true, + "first_rollout_started": true, + "observed_completed_games": { + "best": 225, + "periodic_anchor": 224 + }, + "requested_games_per_arm": 240, + "duplicate_jobs_created": false + } } } diff --git a/ai/strong/launch-league-admission-v1.sh b/ai/strong/launch-league-admission-v1.sh new file mode 100644 index 0000000..947a027 --- /dev/null +++ b/ai/strong/launch-league-admission-v1.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Controlled league-admission comparison; optimization runs only on HF Jobs. +set -euo pipefail +checkpoint=${1:?Supply selected ordered-model checkpoint path} +revision=${2:?Pin its immutable model repository commit} +run=${3:?Supply a unique refinement run name} +[[ "$revision" =~ ^[0-9a-f]{40}$ ]] +[[ "$checkpoint" == runs/*/best.pt ]] +[[ "$run" =~ ^[a-zA-Z0-9_-]+$ ]] +admission=${SNAPSHOT_ADMISSION:?Choose best or periodic_anchor} +[[ "$admission" == best || "$admission" == periodic_anchor ]] +hf jobs run --detach --flavor "${HF_FLAVOR:-cpu-performance}" --timeout "${JOB_TIMEOUT:-8h}" \ + --secrets HF_TOKEN \ + --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --env INIT_CHECKPOINT="$checkpoint" --env INIT_REVISION="$revision" --env ANCHOR_POLICY=initial \ + --env ARCHITECTURE=multiplayer_ordered --env MIX_PLAYER_COUNTS=1 --env OPPONENT_MODE="${OPPONENT_MODE:-mixed_search_geo}" \ + --env RUN_NAME="$run" --env TRAIN_SEED="${TRAIN_SEED:-9021}" \ + --env ASYNC_ROLLOUT="${ASYNC_ROLLOUT:-1}" --env TRAIN_DEVICE="${TRAIN_DEVICE:-cpu}" --env TORCH_THREADS="${TORCH_THREADS:-4}" \ + --env SNAPSHOT_ADMISSION="$admission" --env SNAPSHOT_INTERVAL=5 \ + --env LR=.00005 --env ENTROPY=.005 --env ANCHOR=.03 \ + --env UPDATES="${UPDATES:-20}" --env EVAL_EVERY=10 \ + --env ENVS=240 --env WORKERS="${WORKERS:-240}" --env BATCH_SIZE=512 \ + --label project=powergrid-ai --label stage="$run" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 onnx==1.20.1 onnxruntime==1.30.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v34.tgz\",repo_type=\"dataset\",revision=\"2c273f96562d0cc2f8c05a2735d8c0492ab77fd8\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/test.cjs ai/strong/test.cjs +python ai/strong/test_teacher_contract.py +python ai/strong/test_model_v4.py +python ai/strong/test_snapshot_league.py +python ai/strong/test_multiplayer_bridge.py +python ai/strong/test_async_pool.py +python -u ai/strong/train.py +' From c904152f152dacebcde63c8c55014ef72d4de160 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:35:27 +0200 Subject: [PATCH 169/184] Fix paired evaluation protocol for league admission pilot --- ai/strong/experiments.json | 3 +- ai/strong/league-admission-protocol-v1.json | 154 ++++++++++++++++++++ 2 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 ai/strong/league-admission-protocol-v1.json diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index ca843f1..65f84d9 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -27660,6 +27660,7 @@ }, "requested_games_per_arm": 240, "duplicate_jobs_created": false - } + }, + "evaluation_protocol": "ai/strong/league-admission-protocol-v1.json" } } diff --git a/ai/strong/league-admission-protocol-v1.json b/ai/strong/league-admission-protocol-v1.json new file mode 100644 index 0000000..3623b8b --- /dev/null +++ b/ai/strong/league-admission-protocol-v1.json @@ -0,0 +1,154 @@ +{ + "purpose": "Development comparison of snapshot admission policies; not final qualification.", + "training_source_revision": "2c273f96562d0cc2f8c05a2735d8c0492ab77fd8", + "arms": { + "best": { + "run": "multiplayer-league-admission-v1-best", + "job_id": "6abdef75404719ba37616230" + }, + "periodic_anchor": { + "run": "multiplayer-league-admission-v1-periodic-anchor", + "job_id": "6abdef76fbc85ba68235f6a0" + } + }, + "checkpoint_updates": [ + 9, + 19 + ], + "primary_checkpoint_update": 19, + "checkpoint_selection": "Use latest at each scheduled update, never internal best. Pin the immutable repository revision and checkpoint/export hashes before launching each screen.", + "scope": { + "map": "Germany", + "players": [ + 2, + 3, + 4, + 5, + 6 + ], + "variants": [ + "original", + "recharged" + ], + "auctions": [ + "open", + "sealed" + ] + }, + "arena_source_revision": "37465b08df007221665d796448aea57e6828257e", + "candidate_search_samples": 0, + "candidate_geography": 0, + "search_max_steps": 2400, + "seed_template": "multiplayer-screening-paired-v1-{players}p", + "deal_offsets": [ + 0, + 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 + ], + "matches_per_deal": "All candidate seats and all four rule combinations.", + "screens": [ + { + "players": 2, + "opponent": "economic", + "games": 320 + }, + { + "players": 3, + "opponent": "economic", + "games": 480 + }, + { + "players": 4, + "opponent": "economic", + "games": 640 + }, + { + "players": 5, + "opponent": "economic", + "games": 800 + }, + { + "players": 6, + "opponent": "economic", + "games": 960 + }, + { + "players": 3, + "opponent": "a260", + "games": 480, + "model_path": "runs/strong-league-v2-a/best.onnx", + "revision": "b38515c29e57826de05b55b645c29591e4a886bf", + "sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd" + } + ], + "total_games": 14720, + "validation": [ + "2553-fixture checkpoint/export comparison, including strict numerical tolerances; record failures and do not qualify failing exports.", + "Exact candidate and opponent hashes, counts, seed sets, unique seat/rule/deal keys and paired completeness.", + "Zero actual-game truncations, illegal actions and search truncations; explicit search diagnostics.", + "Inspect training metrics for both arms: completed games, truncation, admission mode and actual snapshot updates." + ], + "comparisons": { + "primary": "periodic_anchor minus best at update19, separately for each opponent/player count; no pooled win rate across counts.", + "secondary": [ + "Same comparison at update9.", + "Each arm versus starting H200 update29 on the same held-out deals.", + "Separate original/open, original/sealed, recharged/open and recharged/sealed results for every count/opponent." + ], + "pairing_key": [ + "gameSeed", + "variant", + "sealed", + "seat" + ], + "bootstrap_unit": "gameSeed, retaining all seats and rule repeats", + "bootstrap_replicates": 20000, + "bootstrap_seed": 623, + "interval": 0.95 + }, + "interpretation": [ + "A single training seed is a pilot and cannot establish robustness across training randomness.", + "Async scheduling does not guarantee identical training trajectories despite matched configuration.", + "Intervals are marginal exploratory intervals, not simultaneous family-wide confidence bounds.", + "These development seeds have been used for previous checkpoint screening; they are not the reserved final test.", + "Report all scheduled checkpoints and comparisons, including regressions. Do not silently select the best subgroup.", + "No automatic promotion or deployment. Final strength, serving and export gates remain unchanged. Strong search-opponent follow-up requires evidence from these screens." + ] +} From 50c7f3f293338b8753ed7855c94821add65cf9bc Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:39:55 +0200 Subject: [PATCH 170/184] Verify first complete HF updates for league comparison --- ai/strong/experiments.json | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 65f84d9..b705303 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -27661,6 +27661,37 @@ "requested_games_per_arm": 240, "duplicate_jobs_created": false }, - "evaluation_protocol": "ai/strong/league-admission-protocol-v1.json" + "evaluation_protocol": "ai/strong/league-admission-protocol-v1.json", + "first_completed_update": { + "update": 0, + "evidence": "HF job train-stage logs for the recorded job IDs", + "episodes_per_arm": 240, + "episodes_per_player_count_per_arm": 48, + "player_counts": [ + 2, + 3, + 4, + 5, + 6 + ], + "actual_game_truncations": 0, + "search_truncations": 0, + "snapshot_updates": [ + -1 + ], + "best": { + "samples": 49106, + "seconds": 540.6222335770001, + "rollout_seconds": 464.76690957000005, + "search_evaluations": 348832 + }, + "periodic_anchor": { + "samples": 49176, + "seconds": 549.7875984519999, + "rollout_seconds": 475.584707041, + "search_evaluations": 337600 + }, + "interpretation": "End-to-end HF optimization verified for both arms; training outcomes are not held-out strength evidence. First planned external comparison is update9." + } } } From b8ec00a3c43f8770a639666e3b519d298a157053 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 07:42:47 +0200 Subject: [PATCH 171/184] Prepare immutable league checkpoints and paired screening plans --- ai/strong/prepare-league-screen.py | 106 +++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 ai/strong/prepare-league-screen.py diff --git a/ai/strong/prepare-league-screen.py b/ai/strong/prepare-league-screen.py new file mode 100644 index 0000000..601ca3a --- /dev/null +++ b/ai/strong/prepare-league-screen.py @@ -0,0 +1,106 @@ +"""Pin and validate one scheduled league checkpoint; never train or launch jobs.""" +import argparse +import hashlib +import json +from pathlib import Path +import re +import shutil +import subprocess +import sys + +import torch +from huggingface_hub import hf_hub_download + +ROOT = Path(__file__).resolve().parents[2] +REPO = 'coyotte508/powergrid-ai-germany-v1' + + +def prepare(arm, update, revision, output, fixtures): + protocol = json.loads((ROOT / 'ai/strong/league-admission-protocol-v1.json').read_text()) + if arm not in protocol['arms'] or update not in protocol['checkpoint_updates']: + raise ValueError('Arm/update is outside the scheduled comparison') + if not re.fullmatch('[0-9a-f]{40}', revision): + raise ValueError('Supply an immutable repository commit') + run = protocol['arms'][arm]['run'] + output.mkdir(parents=True, exist_ok=True) + # Never overwrite evidence from another checkpoint in the same directory. + pin = {'run': run, 'update': update, 'revision': revision} + pin_path = output / 'pin.json' + if pin_path.exists() and json.loads(pin_path.read_text()) != pin: + raise ValueError('Output directory is pinned to a different checkpoint') + pin_path.write_text(json.dumps(pin, indent=2) + '\n') + hashes = {} + for name in ['latest.pt', 'latest.onnx', 'metrics.json', 'schema.json']: + cached = hf_hub_download(REPO, f'runs/{run}/{name}', revision=revision) + destination = output / name + shutil.copyfile(cached, destination) + hashes[name] = hashlib.sha256(destination.read_bytes()).hexdigest() + checkpoint = torch.load(output / 'latest.pt', map_location='cpu', weights_only=True) + expected = {'update': update, 'snapshot_admission': arm, 'snapshot_interval': 5, + 'initial_revision': 'fbdf2bf24c968bff99ab2d7d9ff9a7d97047db2b', + 'architecture': 'multiplayer_ordered', 'mixed_player_counts': True} + for key, value in expected.items(): + if checkpoint.get(key) != value: + raise ValueError(f'Checkpoint {key}: expected {value!r}, got {checkpoint.get(key)!r}') + metrics = json.loads((output / 'metrics.json').read_text()) + batches = [m for m in metrics if m.get('stage') == 'train'] + if [m['update'] for m in batches] != list(range(update + 1)): + raise ValueError('Missing, duplicate or unexpected training updates') + for m in batches: + if m['episodes'] != 240 or m['truncated'] != 0: + raise ValueError('Incomplete training batch') + if set(m['by_player_count']) != {'2', '3', '4', '5', '6'}: + raise ValueError('Missing player count') + if any(c['episodes'] != 48 or c['truncated'] for c in m['by_player_count'].values()): + raise ValueError('Unbalanced or truncated training count') + if not m.get('search_rollouts_reported') or not m.get('search_stats'): + raise ValueError('Missing search diagnostics') + if any(v['truncated'] for v in m['search_stats'].values()): + raise ValueError('Truncated training search') + manifest = {**pin, 'hashes': hashes, 'training_games': 240 * (update + 1), + 'training_truncated': 0, 'snapshot_updates': checkpoint['snapshot_updates'], + 'strict_parity': 'pending', 'scope': protocol['purpose']} + manifest_path = output / 'checkpoint.json' + manifest_path.write_text(json.dumps(manifest, indent=2) + '\n') + parity_path = output / 'parity.json' + result = subprocess.run([sys.executable, str(ROOT / 'ai/strong/check-export.py'), + str(output / 'latest.pt'), str(output / 'latest.onnx'), + str(fixtures), '--output', str(parity_path)], cwd=ROOT, + capture_output=True, text=True) + (output / 'parity-check.log').write_text(result.stdout + result.stderr) + manifest['strict_parity'] = 'passed' if result.returncode == 0 else 'failed' + manifest_path.write_text(json.dumps(manifest, indent=2) + '\n') + if result.returncode: + raise RuntimeError(f'Strict parity failed; inspect {output / "parity-check.log"}') + parity = json.loads(parity_path.read_text()) + if (parity['positions'] != 2553 or not parity['all_actions_match'] + or parity['model_sha256'] != hashes['latest.onnx']): + manifest['strict_parity'] = 'failed' + manifest_path.write_text(json.dumps(manifest, indent=2) + '\n') + raise ValueError('Unexpected parity coverage or model identity') + jobs = [] + for screen in protocol['screens']: + n, opponent = screen['players'], screen['opponent'] + name = f'league-admission-{arm.replace("_", "-")}-u{update}-{opponent}-{n}p' + env = {'PLAYER_COUNT': str(n), 'ASYNC_ARENA': '0', 'DEAL_OFFSET': '0', + 'DISABLE_SEARCH_PROPOSAL': '0', 'SEARCH_SCOPE': 'all', + 'OPPONENT_MODEL_PATH': '', 'OPPONENT_MODEL_REVISION': ''} + if opponent == 'a260': + env.update(OPPONENT_MODEL_PATH=screen['model_path'], OPPONENT_MODEL_REVISION=screen['revision']) + jobs.append({'run': name, 'env': env, 'argv': ['bash', 'ai/strong/launch-multiplayer-arena.sh', + name, f'runs/{run}/latest.onnx', revision, 'economic', '0', '0', + str(screen['games']), protocol['seed_template'].format(players=n)]}) + (output / 'screen-plan.json').write_text(json.dumps(jobs, indent=2) + '\n') + print(json.dumps({'checkpoint': str(manifest_path), 'strict_parity': 'passed', + 'planned_jobs': len(jobs), 'jobs_launched': 0})) + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description=__doc__) + p.add_argument('arm', choices=['best', 'periodic_anchor']) + p.add_argument('update', type=int, choices=[9, 19]) + p.add_argument('revision') + p.add_argument('output', type=Path) + p.add_argument('--fixtures', type=Path, default=ROOT / 'ai/runs/multiplayer-serving-fixtures.jsonl') + a = p.parse_args() + prepare(a.arm, a.update, a.revision, a.output.resolve(), a.fixtures.resolve()) From 944e3a45d2fbe359b98c8fa426e7e09b2eac1234 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 08:22:45 +0200 Subject: [PATCH 172/184] Verify periodic snapshot opponents in live HF training --- ai/strong/experiments.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b705303..7474d48 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -27692,6 +27692,21 @@ "search_evaluations": 337600 }, "interpretation": "End-to-end HF optimization verified for both arms; training outcomes are not held-out strength evidence. First planned external comparison is update9." + }, + "periodic_admission_verified": { + "job_id": "6abdef76fbc85ba68235f6a0", + "evidence": "HF completed train-stage log for update5", + "update": 5, + "snapshot_updates": [ + -1, + 4 + ], + "episodes": 240, + "episodes_per_count": 48, + "truncated": 0, + "search_evaluations": 446160, + "search_truncated": 0, + "interpretation": "Actual training batch used initial and update4 frozen opponents, verifying periodic admission. No external strength inference." } } } From f812d5aa56d2a52d34bdba3da84eb8b5322b2141 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 08:32:18 +0200 Subject: [PATCH 173/184] Screen geographic update69 with strict export parity and cap audit --- ai/strong/experiments.json | 114 ++++++++++++++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 7474d48..e57af6b 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -181,7 +181,13 @@ "multiplayer-h200-u79-economic-6p": "6abded9bfbc85ba68235f5c4", "multiplayer-h200-u79-a260-3p": "6abded9c404719ba3761615d", "multiplayer-league-admission-v1-best": "6abdef75404719ba37616230", - "multiplayer-league-admission-v1-periodic-anchor": "6abdef76fbc85ba68235f6a0" + "multiplayer-league-admission-v1-periodic-anchor": "6abdef76fbc85ba68235f6a0", + "multiplayer-geoleague-u69-economic-2p": "6abdfe48404719ba376165c4", + "multiplayer-geoleague-u69-economic-3p": "6abdfe49fbc85ba68235fbc1", + "multiplayer-geoleague-u69-economic-4p": "6abdfe49404719ba376165c6", + "multiplayer-geoleague-u69-economic-5p": "6abdfe4a404719ba376165c8", + "multiplayer-geoleague-u69-economic-6p": "6abdfe4bfbc85ba68235fbc5", + "multiplayer-geoleague-u69-a260-3p": "6abdfe4b404719ba376165ca" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -27708,5 +27714,111 @@ "search_truncated": 0, "interpretation": "Actual training batch used initial and update4 frozen opponents, verifying periodic admission. No external strength inference." } + }, + "multiplayer_geoleague_update69_screening": { + "candidate_revision": "69a52c109a03d4ad3a490587a2094cc7e1f430c0", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "training_games": 16800, + "training_search_truncated": 4, + "training_search_cap_details": [ + { + "update": 25, + "opponent": "search_geo", + "decisions": 2766, + "evaluations": 226160, + "truncated": 1 + }, + { + "update": 39, + "opponent": "search_geo", + "decisions": 4896, + "evaluations": 398448, + "truncated": 1 + }, + { + "update": 40, + "opponent": "search_geo", + "decisions": 3640, + "evaluations": 295104, + "truncated": 1 + }, + { + "update": 58, + "opponent": "search_geo", + "decisions": 4799, + "evaluations": 391504, + "truncated": 1 + } + ], + "training_search_evaluations": 25549072, + "training_truncated": 0, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "max_logit_error": 6.103515625e-05, + "max_value_error": 3.2186508178710938e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "multiplayer-geoleague-u69-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abdfe48404719ba376165c4", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u69-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abdfe49fbc85ba68235fbc1", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u69-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abdfe49404719ba376165c6", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u69-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abdfe4a404719ba376165c8", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u69-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abdfe4bfbc85ba68235fbc5", + "observed_stage": "SCHEDULING" + }, + { + "run": "multiplayer-geoleague-u69-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abdfe4b404719ba376165ca", + "observed_stage": "SCHEDULING" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Await six complete paired screens. Latest and internal best both update69; strict parity passes. Four earlier opponent search simulations were capped; actual training games all complete. Internal selection does not establish external strength.", + "reports": {} } } From 5b7791999149c1740657cbce9e22c8c3631e2300 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 08:35:44 +0200 Subject: [PATCH 174/184] Record complete geographic update69 screens and qualification failures --- ai/strong/experiments.json | 793 ++++++++++++++++++++++++++++++++++++- 1 file changed, 784 insertions(+), 9 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e57af6b..b0ed2d1 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -27776,49 +27776,824 @@ "players": 2, "opponent": "economic", "job_id": "6abdfe48404719ba376165c4", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u69-economic-3p", "players": 3, "opponent": "economic", "job_id": "6abdfe49fbc85ba68235fbc1", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u69-economic-4p", "players": 4, "opponent": "economic", "job_id": "6abdfe49404719ba376165c6", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u69-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abdfe4a404719ba376165c8", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u69-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abdfe4bfbc85ba68235fbc5", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u69-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abdfe4b404719ba376165ca", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Await six complete paired screens. Latest and internal best both update69; strict parity passes. Four earlier opponent search simulations were capped; actual training games all complete. Internal selection does not establish external strength.", - "reports": {} + "decision": "Reject universal qualification and do not expand to expensive search screening. Economic2p57.34375% misses66.25% floor; frozenA2603p39.791667% misses40% floor and original sealed30.833333% is below chance. Strict export parity passes, but that does not establish strength. Preserve the scheduled80-update training horizon and matched admission pilot; final reserved seeds untouched.", + "reports": { + "multiplayer-geoleague-u69-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/69a52c109a03d4ad3a490587a2094cc7e1f430c0/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.5734375, + "truncated": 0, + "seconds": 23.44100422800011, + "inference_p95_ms": 0.35390699974868767, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.65625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.575 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.7, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.8 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.475, + 0.7 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.515625, + 0.628125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "5b768f512948ba141ef3e9a69ef5d52b0c06c1b9" + }, + "multiplayer-geoleague-u69-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/69a52c109a03d4ad3a490587a2094cc7e1f430c0/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5875, + "truncated": 0, + "seconds": 28.696851385000002, + "inference_p95_ms": 0.3820963000023879, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4583333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.36666666666666664, + 0.55 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6916666666666667, + 0.8333333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.675, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.575, + 0.775 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5479166666666667, + 0.6291666666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a0c2e342a0130497ff2fe12c1007bd237d2b214a" + }, + "multiplayer-geoleague-u69-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/69a52c109a03d4ad3a490587a2094cc7e1f430c0/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.534375, + "truncated": 0, + "seconds": 39.433230133999984, + "inference_p95_ms": 0.40698899999966903, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.48125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.40625, + 0.55625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.36875, + 0.53125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.6625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.575, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.45, + 0.64375 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.490625, + 0.578125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a0c2e342a0130497ff2fe12c1007bd237d2b214a" + }, + "multiplayer-geoleague-u69-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/69a52c109a03d4ad3a490587a2094cc7e1f430c0/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.703125, + "truncated": 0, + "seconds": 44.87859769699999, + "inference_p95_ms": 0.418279999994553, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.68, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.595, + 0.76 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.64, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.575, + 0.705 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.745, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.685, + 0.805 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.7475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6775, + 0.815 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.665, + 0.740625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a0c2e342a0130497ff2fe12c1007bd237d2b214a" + }, + "multiplayer-geoleague-u69-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/69a52c109a03d4ad3a490587a2094cc7e1f430c0/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.6697916666666667, + "truncated": 0, + "seconds": 50.69608514999999, + "inference_p95_ms": 0.4201939999965987, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.6354166666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.56875, + 0.7020833333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6020833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5333333333333333, + 0.6729687499999993 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.75, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6916666666666667, + 0.8083333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6916666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6291666666666667, + 0.75 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6328125, + 0.7057291666666666 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a0c2e342a0130497ff2fe12c1007bd237d2b214a" + }, + "multiplayer-geoleague-u69-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/69a52c109a03d4ad3a490587a2094cc7e1f430c0/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.39791666666666664, + "truncated": 0, + "seconds": 69.18375326699999, + "inference_p95_ms": 0.39720850000648494, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.4583333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.30833333333333335, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.21666666666666667, + 0.4 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.5166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.39166666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3, + 0.49166666666666664 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.34791666666666665, + 0.45 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "371bceaffa26664b06b76f6aaa0836a0b1570373" + } + }, + "paired_against_geoleague_u19": { + "multiplayer-geoleague-u69-economic-2p": { + "independent_deals": 40, + "difference": 0.0546875, + "paired_seed_bootstrap_95_interval": [ + -0.021875, + 0.1328125 + ] + }, + "multiplayer-geoleague-u69-economic-3p": { + "independent_deals": 40, + "difference": 0.046875, + "paired_seed_bootstrap_95_interval": [ + -0.006250000000000003, + 0.09895833333333333 + ] + }, + "multiplayer-geoleague-u69-economic-4p": { + "independent_deals": 40, + "difference": -0.0296875, + "paired_seed_bootstrap_95_interval": [ + -0.0765625, + 0.01875 + ] + }, + "multiplayer-geoleague-u69-economic-5p": { + "independent_deals": 40, + "difference": 0.019374999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.026250000000000002, + 0.06687499999999999 + ] + }, + "multiplayer-geoleague-u69-economic-6p": { + "independent_deals": 40, + "difference": 0.05052083333333333, + "paired_seed_bootstrap_95_interval": [ + 0.0036458333333333286, + 0.09739583333333333 + ] + }, + "multiplayer-geoleague-u69-a260-3p": { + "independent_deals": 40, + "difference": 0.07291666666666666, + "paired_seed_bootstrap_95_interval": [ + 0.014583333333333328, + 0.12916666666666665 + ] + } + }, + "paired_against_geoleague_u59": { + "multiplayer-geoleague-u69-economic-2p": { + "independent_deals": 40, + "difference": 0.003125, + "paired_seed_bootstrap_95_interval": [ + -0.059375, + 0.0640625 + ] + }, + "multiplayer-geoleague-u69-economic-3p": { + "independent_deals": 40, + "difference": 0.018749999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.03125, + 0.06875 + ] + }, + "multiplayer-geoleague-u69-economic-4p": { + "independent_deals": 40, + "difference": 0.09375, + "paired_seed_bootstrap_95_interval": [ + 0.046875, + 0.1421875 + ] + }, + "multiplayer-geoleague-u69-economic-5p": { + "independent_deals": 40, + "difference": 0.075, + "paired_seed_bootstrap_95_interval": [ + 0.026250000000000002, + 0.1275 + ] + }, + "multiplayer-geoleague-u69-economic-6p": { + "independent_deals": 40, + "difference": 0.1078125, + "paired_seed_bootstrap_95_interval": [ + 0.06614583333333333, + 0.1484375 + ] + }, + "multiplayer-geoleague-u69-a260-3p": { + "independent_deals": 40, + "difference": 0.053125, + "paired_seed_bootstrap_95_interval": [ + -0.003124999999999997, + 0.109375 + ] + } + }, + "paired_against_geoleague_u49": { + "multiplayer-geoleague-u69-economic-2p": { + "independent_deals": 40, + "difference": 0.0578125, + "paired_seed_bootstrap_95_interval": [ + -0.00625, + 0.121875 + ] + }, + "multiplayer-geoleague-u69-economic-3p": { + "independent_deals": 40, + "difference": 0.012499999999999999, + "paired_seed_bootstrap_95_interval": [ + -0.05208333333333333, + 0.075 + ] + }, + "multiplayer-geoleague-u69-economic-4p": { + "independent_deals": 40, + "difference": -0.0453125, + "paired_seed_bootstrap_95_interval": [ + -0.0859375, + -0.0046875 + ] + }, + "multiplayer-geoleague-u69-economic-5p": { + "independent_deals": 40, + "difference": 0.016875, + "paired_seed_bootstrap_95_interval": [ + -0.021875000000000002, + 0.05625 + ] + }, + "multiplayer-geoleague-u69-economic-6p": { + "independent_deals": 40, + "difference": 0.07083333333333333, + "paired_seed_bootstrap_95_interval": [ + 0.03229166666666666, + 0.10885416666666667 + ] + }, + "multiplayer-geoleague-u69-a260-3p": { + "independent_deals": 40, + "difference": 0.029166666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.03333333333333333, + 0.09166666666666665 + ] + } + }, + "paired_against_h200_u79": { + "multiplayer-geoleague-u69-economic-2p": { + "independent_deals": 40, + "difference": -0.0609375, + "paired_seed_bootstrap_95_interval": [ + -0.1390625, + 0.015625 + ] + }, + "multiplayer-geoleague-u69-economic-3p": { + "independent_deals": 40, + "difference": -0.020833333333333336, + "paired_seed_bootstrap_95_interval": [ + -0.075, + 0.03125 + ] + }, + "multiplayer-geoleague-u69-economic-4p": { + "independent_deals": 40, + "difference": -0.0625, + "paired_seed_bootstrap_95_interval": [ + -0.1171875, + -0.0078125 + ] + }, + "multiplayer-geoleague-u69-economic-5p": { + "independent_deals": 40, + "difference": -0.07375000000000001, + "paired_seed_bootstrap_95_interval": [ + -0.11499999999999999, + -0.03125000000000001 + ] + }, + "multiplayer-geoleague-u69-economic-6p": { + "independent_deals": 40, + "difference": -0.06302083333333333, + "paired_seed_bootstrap_95_interval": [ + -0.09895833333333334, + -0.0265625 + ] + }, + "multiplayer-geoleague-u69-a260-3p": { + "independent_deals": 40, + "difference": 0.0625, + "paired_seed_bootstrap_95_interval": [ + 0.0020312500000000404, + 0.125 + ] + } + }, + "paired_against_h200_u69": { + "multiplayer-geoleague-u69-economic-2p": { + "independent_deals": 40, + "difference": -0.0171875, + "paired_seed_bootstrap_95_interval": [ + -0.08125, + 0.0453125 + ] + }, + "multiplayer-geoleague-u69-economic-3p": { + "independent_deals": 40, + "difference": -0.03333333333333334, + "paired_seed_bootstrap_95_interval": [ + -0.09166666666666667, + 0.02291666666666667 + ] + }, + "multiplayer-geoleague-u69-economic-4p": { + "independent_deals": 40, + "difference": -0.0890625, + "paired_seed_bootstrap_95_interval": [ + -0.1453125, + -0.03125 + ] + }, + "multiplayer-geoleague-u69-economic-5p": { + "independent_deals": 40, + "difference": -0.095625, + "paired_seed_bootstrap_95_interval": [ + -0.135625, + -0.055625 + ] + }, + "multiplayer-geoleague-u69-economic-6p": { + "independent_deals": 40, + "difference": -0.09010416666666668, + "paired_seed_bootstrap_95_interval": [ + -0.1234375, + -0.057291666666666664 + ] + }, + "multiplayer-geoleague-u69-a260-3p": { + "independent_deals": 40, + "difference": 1.3877787807814458e-18, + "paired_seed_bootstrap_95_interval": [ + -0.05, + 0.05208333333333333 + ] + } + }, + "interpretation": { + "games": 3680, + "actual_truncations": 0, + "search_truncations": 0, + "economic_win_rates_by_players": { + "2": 0.5734375, + "3": 0.5875, + "4": 0.534375, + "5": 0.703125, + "6": 0.6697916666666667 + }, + "a260_win_rate": 0.39791666666666664, + "paired_findings": [ + "Versus geographic59: supported economic recovery at4\u20136 players.", + "Versus geographic19: supported gains at economic6p and A2603p; other intervals include zero.", + "Versus geographic49: supported economic4p regression and6p improvement; other economic intervals include zero.", + "Versus H20069 and79: supported economic deficits at4\u20136 players;2p/3p intervals include zero." + ], + "uncertainty": "Development-screen seed-cluster intervals are marginal exploratory intervals, not simultaneous guarantees; repeated use of these development deals is not final qualification." + } } } From 0ab6cefe8cc2e502aba56a51e8f233db3a3175a8 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 09:00:11 +0200 Subject: [PATCH 175/184] Launch scheduled periodic league update9 screening --- ai/strong/experiments.json | 191 ++++++++++++++++++++++++++++++++++++- 1 file changed, 189 insertions(+), 2 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b0ed2d1..b060173 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -187,7 +187,13 @@ "multiplayer-geoleague-u69-economic-4p": "6abdfe49404719ba376165c6", "multiplayer-geoleague-u69-economic-5p": "6abdfe4a404719ba376165c8", "multiplayer-geoleague-u69-economic-6p": "6abdfe4bfbc85ba68235fbc5", - "multiplayer-geoleague-u69-a260-3p": "6abdfe4b404719ba376165ca" + "multiplayer-geoleague-u69-a260-3p": "6abdfe4b404719ba376165ca", + "league-admission-periodic-anchor-u9-economic-2p": "6abe04affbc85ba68235fe25", + "league-admission-periodic-anchor-u9-economic-3p": "6abe04b0404719ba37616786", + "league-admission-periodic-anchor-u9-economic-4p": "6abe04b1fbc85ba68235fe27", + "league-admission-periodic-anchor-u9-economic-5p": "6abe04b2fbc85ba68235fe29", + "league-admission-periodic-anchor-u9-economic-6p": "6abe04b2404719ba3761678a", + "league-admission-periodic-anchor-u9-a260-3p": "6abe04b3fbc85ba68235fe2b" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -27713,7 +27719,10 @@ "search_evaluations": 446160, "search_truncated": 0, "interpretation": "Actual training batch used initial and update4 frozen opponents, verifying periodic admission. No external strength inference." - } + }, + "screening_keys": [ + "multiplayer_league_admission_periodic_anchor_update9_screening" + ] }, "multiplayer_geoleague_update69_screening": { "candidate_revision": "69a52c109a03d4ad3a490587a2094cc7e1f430c0", @@ -28595,5 +28604,183 @@ ], "uncertainty": "Development-screen seed-cluster intervals are marginal exploratory intervals, not simultaneous guarantees; repeated use of these development deals is not final qualification." } + }, + "multiplayer_league_admission_periodic_anchor_update9_screening": { + "candidate_revision": "783e5bf3692bcbd4ea7691385810ba70c892d966", + "model_path": "runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "training_games": 2400, + "training_truncated": 0, + "training_search_truncated": 0, + "snapshot_updates": [ + -1, + 4, + 9 + ], + "arm": "periodic_anchor", + "update": 9, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "max_logit_error": 5.340576171875e-05, + "max_value_error": 2.384185791015625e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "league-admission-periodic-anchor-u9-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abe04affbc85ba68235fe25", + "observed_stage": "COMPLETED" + }, + { + "run": "league-admission-periodic-anchor-u9-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abe04b0404719ba37616786", + "observed_stage": "SCHEDULING" + }, + { + "run": "league-admission-periodic-anchor-u9-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abe04b1fbc85ba68235fe27", + "observed_stage": "SCHEDULING" + }, + { + "run": "league-admission-periodic-anchor-u9-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abe04b2fbc85ba68235fe29", + "observed_stage": "SCHEDULING" + }, + { + "run": "league-admission-periodic-anchor-u9-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abe04b2404719ba3761678a", + "observed_stage": "SCHEDULING" + }, + { + "run": "league-admission-periodic-anchor-u9-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abe04b3fbc85ba68235fe2b", + "observed_stage": "SCHEDULING" + } + ], + "status": "RUNNING", + "scope": "Scheduled paired development screen; not final qualification", + "protocol": "ai/strong/league-admission-protocol-v1.json", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Await all six screens and matched opposite arm; do not infer admission benefit from this arm alone.", + "reports": { + "league-admission-periodic-anchor-u9-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/783e5bf3692bcbd4ea7691385810ba70c892d966/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.5765625, + "truncated": 0, + "seconds": 23.301419578999685, + "inference_p95_ms": 0.3577050001695169, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.6 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.65625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.54375, + 0.7625 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.7375 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.51875, + 0.6328125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "aa27550c9e337ec4c3fda89f3249e16663dd70a1" + } + }, + "paired_against_starting_h200_u29": { + "league-admission-periodic-anchor-u9-economic-2p": { + "independent_deals": 40, + "difference": 0.0421875, + "paired_seed_bootstrap_95_interval": [ + -0.0296875, + 0.1125 + ] + } + } } } From 53cedd10eeaa2a7f35ecfa2cfd0251aeff74e66e Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 09:05:34 +0200 Subject: [PATCH 176/184] Compare complete update9 league arms on paired held-out games --- ai/strong/experiments.json | 1516 +++++++++++++++++++++++++++++++++++- 1 file changed, 1506 insertions(+), 10 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b060173..b4a30bd 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -193,7 +193,13 @@ "league-admission-periodic-anchor-u9-economic-4p": "6abe04b1fbc85ba68235fe27", "league-admission-periodic-anchor-u9-economic-5p": "6abe04b2fbc85ba68235fe29", "league-admission-periodic-anchor-u9-economic-6p": "6abe04b2404719ba3761678a", - "league-admission-periodic-anchor-u9-a260-3p": "6abe04b3fbc85ba68235fe2b" + "league-admission-periodic-anchor-u9-a260-3p": "6abe04b3fbc85ba68235fe2b", + "league-admission-best-u9-economic-2p": "6abe052b404719ba376167aa", + "league-admission-best-u9-economic-3p": "6abe052c404719ba376167ac", + "league-admission-best-u9-economic-4p": "6abe052c404719ba376167ae", + "league-admission-best-u9-economic-5p": "6abe052dfbc85ba68235fe86", + "league-admission-best-u9-economic-6p": "6abe052efbc85ba68235fe88", + "league-admission-best-u9-a260-3p": "6abe052ffbc85ba68235fe8a" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -27721,8 +27727,401 @@ "interpretation": "Actual training batch used initial and update4 frozen opponents, verifying periodic admission. No external strength inference." }, "screening_keys": [ - "multiplayer_league_admission_periodic_anchor_update9_screening" - ] + "multiplayer_league_admission_periodic_anchor_update9_screening", + "multiplayer_league_admission_best_update9_screening" + ], + "paired_screens": { + "9": { + "update": 9, + "difference_direction": "periodic_anchor minus best", + "primary_checkpoint": false, + "bootstrap_replicates": 20000, + "bootstrap_seed": 623, + "bootstrap_unit": "gameSeed with all seat/rule repeats", + "arms": { + "periodic_anchor": { + "revision": "783e5bf3692bcbd4ea7691385810ba70c892d966", + "sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14" + }, + "best": { + "revision": "323f899d5db85147704749ebec162759b668c7ac", + "sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246" + } + }, + "limitations": "Single training seed; asynchronous trajectories differ. Marginal exploratory95% intervals, not simultaneous confidence guarantees. Development deals were reused across prior screens. Final reserved test remains untouched.", + "comparisons": { + "economic/2p": { + "overall": { + "games_per_arm": 320, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5765625, + "best_win_rate": 0.528125, + "difference": 0.0484375, + "paired_seed_bootstrap_95_interval": [ + -0.025, + 0.1171875 + ] + }, + "original/open": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5125, + "best_win_rate": 0.5625, + "difference": -0.05, + "paired_seed_bootstrap_95_interval": [ + -0.175, + 0.075 + ] + }, + "original/sealed": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5, + "best_win_rate": 0.475, + "difference": 0.025, + "paired_seed_bootstrap_95_interval": [ + -0.1125, + 0.1625 + ] + }, + "recharged/open": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.65625, + "best_win_rate": 0.6, + "difference": 0.05625, + "paired_seed_bootstrap_95_interval": [ + -0.0875, + 0.2 + ] + }, + "recharged/sealed": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6375, + "best_win_rate": 0.475, + "difference": 0.1625, + "paired_seed_bootstrap_95_interval": [ + 0.0125, + 0.325 + ] + } + }, + "economic/3p": { + "overall": { + "games_per_arm": 480, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5875, + "best_win_rate": 0.6260416666666667, + "difference": -0.03854166666666666, + "paired_seed_bootstrap_95_interval": [ + -0.0875, + 0.009375 + ] + }, + "original/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.49166666666666664, + "best_win_rate": 0.5791666666666667, + "difference": -0.0875, + "paired_seed_bootstrap_95_interval": [ + -0.21666666666666665, + 0.041666666666666664 + ] + }, + "original/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5083333333333333, + "best_win_rate": 0.525, + "difference": -0.016666666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.125, + 0.09166666666666667 + ] + }, + "recharged/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.7166666666666667, + "best_win_rate": 0.8, + "difference": -0.08333333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.175, + 1.3877787807814458e-18 + ] + }, + "recharged/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6333333333333333, + "best_win_rate": 0.6, + "difference": 0.033333333333333326, + "paired_seed_bootstrap_95_interval": [ + -0.05833333333333333, + 0.125 + ] + } + }, + "economic/4p": { + "overall": { + "games_per_arm": 640, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5796875, + "best_win_rate": 0.5625, + "difference": 0.0171875, + "paired_seed_bootstrap_95_interval": [ + -0.0265625, + 0.0609375 + ] + }, + "original/open": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6, + "best_win_rate": 0.51875, + "difference": 0.08125, + "paired_seed_bootstrap_95_interval": [ + -0.01875, + 0.18125 + ] + }, + "original/sealed": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.3625, + "best_win_rate": 0.425, + "difference": -0.0625, + "paired_seed_bootstrap_95_interval": [ + -0.15625, + 0.02515624999998636 + ] + }, + "recharged/open": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.675, + "best_win_rate": 0.70625, + "difference": -0.03125, + "paired_seed_bootstrap_95_interval": [ + -0.1125, + 0.05 + ] + }, + "recharged/sealed": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.68125, + "best_win_rate": 0.6, + "difference": 0.08125, + "paired_seed_bootstrap_95_interval": [ + -0.00625, + 0.175 + ] + } + }, + "economic/5p": { + "overall": { + "games_per_arm": 800, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.745, + "best_win_rate": 0.69875, + "difference": 0.04625, + "paired_seed_bootstrap_95_interval": [ + 0.012499999999999997, + 0.08125 + ] + }, + "original/open": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.66, + "best_win_rate": 0.605, + "difference": 0.05500000000000001, + "paired_seed_bootstrap_95_interval": [ + -0.024999999999999994, + 0.135 + ] + }, + "original/sealed": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.7, + "best_win_rate": 0.685, + "difference": 0.015000000000000005, + "paired_seed_bootstrap_95_interval": [ + -0.05500000000000001, + 0.085 + ] + }, + "recharged/open": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.835, + "best_win_rate": 0.735, + "difference": 0.1, + "paired_seed_bootstrap_95_interval": [ + 0.014999999999999996, + 0.19 + ] + }, + "recharged/sealed": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.785, + "best_win_rate": 0.77, + "difference": 0.015000000000000003, + "paired_seed_bootstrap_95_interval": [ + -0.045000000000000005, + 0.07500000000000001 + ] + } + }, + "economic/6p": { + "overall": { + "games_per_arm": 960, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6963541666666667, + "best_win_rate": 0.6328125, + "difference": 0.06354166666666666, + "paired_seed_bootstrap_95_interval": [ + 0.034895833333333334, + 0.09322916666666667 + ] + }, + "original/open": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6416666666666667, + "best_win_rate": 0.5833333333333334, + "difference": 0.05833333333333333, + "paired_seed_bootstrap_95_interval": [ + -0.025, + 0.14166666666666666 + ] + }, + "original/sealed": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5854166666666667, + "best_win_rate": 0.5958333333333333, + "difference": -0.010416666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.07916666666666666, + 0.05833333333333333 + ] + }, + "recharged/open": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.8125, + "best_win_rate": 0.7145833333333333, + "difference": 0.09791666666666667, + "paired_seed_bootstrap_95_interval": [ + 0.02708333333333333, + 0.16875 + ] + }, + "recharged/sealed": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.7458333333333333, + "best_win_rate": 0.6375, + "difference": 0.10833333333333332, + "paired_seed_bootstrap_95_interval": [ + 0.025, + 0.19166666666666665 + ] + } + }, + "a260/3p": { + "overall": { + "games_per_arm": 480, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.396875, + "best_win_rate": 0.4125, + "difference": -0.015624999999999995, + "paired_seed_bootstrap_95_interval": [ + -0.07395833333333332, + 0.044791666666666674 + ] + }, + "original/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.4166666666666667, + "best_win_rate": 0.4166666666666667, + "difference": 1.3877787807814458e-18, + "paired_seed_bootstrap_95_interval": [ + -0.11666666666666665, + 0.11666666666666665 + ] + }, + "original/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.2916666666666667, + "best_win_rate": 0.36666666666666664, + "difference": -0.075, + "paired_seed_bootstrap_95_interval": [ + -0.20833333333333331, + 0.05 + ] + }, + "recharged/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.525, + "best_win_rate": 0.48333333333333334, + "difference": 0.04166666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.06666666666666667, + 0.15 + ] + }, + "recharged/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.3541666666666667, + "best_win_rate": 0.38333333333333336, + "difference": -0.029166666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.14583333333333334, + 0.08333333333333333 + ] + } + } + } + } + }, + "update9_interpretation": { + "games": 7360, + "actual_game_truncations": 0, + "search_truncations": 0, + "strict_export_parity": "Both arms passed all2553fixtures.", + "decision": "Neither update9 arm qualifies. Continue both unchanged to prespecified primary update19. Do not launch final qualification or claim generally stronger model.", + "supported_overall_arm_differences": { + "economic5p": { + "periodic_minus_best": 0.04625, + "paired_seed_bootstrap_95_interval": [ + 0.0125, + 0.08125 + ] + }, + "economic6p": { + "periodic_minus_best": 0.06354166666666666, + "paired_seed_bootstrap_95_interval": [ + 0.034895833333333334, + 0.09322916666666667 + ] + } + }, + "other_overall_arm_comparisons": "Economic2p/3p/4p and A2603p intervals include zero.", + "starting_policy_comparison": "Periodic arm has no supported overall change versus startingH200u29 in any screen. Best-admission arm has supported economic5p/6p regressions. Evidence favors retention of starting strength, not established improvement beyond it.", + "qualification_failures": "Both arms miss economic2p66.25% floor. PeriodicA26039.6875% misses40%; bestA26041.25% exceeds point floor but original/open and both sealed rule intervals include1/3 chance.", + "limitations": "Single training seed; update9 is secondary; marginal exploratory confidence intervals are not simultaneous guarantees. Final reserved seeds untouched." + } }, "multiplayer_geoleague_update69_screening": { "candidate_revision": "69a52c109a03d4ad3a490587a2094cc7e1f430c0", @@ -28649,43 +29048,43 @@ "players": 3, "opponent": "economic", "job_id": "6abe04b0404719ba37616786", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u9-economic-4p", "players": 4, "opponent": "economic", "job_id": "6abe04b1fbc85ba68235fe27", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u9-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abe04b2fbc85ba68235fe29", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u9-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abe04b2404719ba3761678a", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u9-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abe04b3fbc85ba68235fe2b", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Scheduled paired development screen; not final qualification", "protocol": "ai/strong/league-admission-protocol-v1.json", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Await all six screens and matched opposite arm; do not infer admission benefit from this arm alone.", + "decision": "Complete scheduled secondary screen; not qualified. See multiplayer_league_admission_v1.update9_interpretation and paired_screens. Continue unchanged to primary update19.", "reports": { "league-admission-periodic-anchor-u9-economic-2p": { "async_rollout": false, @@ -28770,6 +29169,426 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "aa27550c9e337ec4c3fda89f3249e16663dd70a1" + }, + "league-admission-periodic-anchor-u9-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/783e5bf3692bcbd4ea7691385810ba70c892d966/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5875, + "truncated": 0, + "seconds": 29.13604050799995, + "inference_p95_ms": 0.39122600005612174, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.49166666666666664, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.6083333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.5083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6333333333333333, + 0.8 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6333333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5583333333333333, + 0.7083333333333334 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5458333333333333, + 0.6291666666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "323f899d5db85147704749ebec162759b668c7ac" + }, + "league-admission-periodic-anchor-u9-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/783e5bf3692bcbd4ea7691385810ba70c892d966/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5796875, + "truncated": 0, + "seconds": 38.657039710999996, + "inference_p95_ms": 0.4088474500058225, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.675 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.3625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.29375, + 0.43125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.675, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.60625, + 0.74375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.68125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.59375, + 0.7625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5453125, + 0.6140625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "d9a14f048c9abce466d70a5514cdeeb56367d28e" + }, + "league-admission-periodic-anchor-u9-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/783e5bf3692bcbd4ea7691385810ba70c892d966/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.745, + "truncated": 0, + "seconds": 44.12749952399999, + "inference_p95_ms": 0.4218311500061133, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.66, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.59, + 0.73 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.7, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.635, + 0.765 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.835, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.775, + 0.89 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.785, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.735, + 0.835 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7125, + 0.7775 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "d9a14f048c9abce466d70a5514cdeeb56367d28e" + }, + "league-admission-periodic-anchor-u9-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/783e5bf3692bcbd4ea7691385810ba70c892d966/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.6963541666666667, + "truncated": 0, + "seconds": 50.912572204000014, + "inference_p95_ms": 0.42528749999348747, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.6416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5791666666666667, + 0.7041666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.5854166666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.53125, + 0.6333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.8125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7458333333333333, + 0.8708333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.7458333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6791666666666667, + 0.8041666666666667 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6682291666666667, + 0.7239583333333334 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "d9a14f048c9abce466d70a5514cdeeb56367d28e" + }, + "league-admission-periodic-anchor-u9-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/783e5bf3692bcbd4ea7691385810ba70c892d966/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "9f01ca60e2d9a0e0668be7c890836942708d82c57c078e0d814c4919fe181d14", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.396875, + "truncated": 0, + "seconds": 68.79882419500018, + "inference_p95_ms": 0.3969676498172699, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.31666666666666665, + 0.5166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.2916666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.225, + 0.36666666666666664 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.6166666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.3541666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2625, + 0.45416666666666666 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.34479166666666666, + 0.4510416666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "d9a14f048c9abce466d70a5514cdeeb56367d28e" } }, "paired_against_starting_h200_u29": { @@ -28780,6 +29599,683 @@ -0.0296875, 0.1125 ] + }, + "league-admission-periodic-anchor-u9-economic-3p": { + "independent_deals": 40, + "difference": -0.015625000000000003, + "paired_seed_bootstrap_95_interval": [ + -0.065625, + 0.03333333333333334 + ] + }, + "league-admission-periodic-anchor-u9-economic-4p": { + "independent_deals": 40, + "difference": 0.015625, + "paired_seed_bootstrap_95_interval": [ + -0.0359375, + 0.06796875 + ] + }, + "league-admission-periodic-anchor-u9-economic-5p": { + "independent_deals": 40, + "difference": -0.018124999999999995, + "paired_seed_bootstrap_95_interval": [ + -0.044375, + 0.008125 + ] + }, + "league-admission-periodic-anchor-u9-economic-6p": { + "independent_deals": 40, + "difference": 0.0140625, + "paired_seed_bootstrap_95_interval": [ + -0.02291666666666666, + 0.0515625 + ] + }, + "league-admission-periodic-anchor-u9-a260-3p": { + "independent_deals": 40, + "difference": 0.04166666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.013541666666666665, + 0.09895833333333334 + ] + } + } + }, + "multiplayer_league_admission_best_update9_screening": { + "candidate_revision": "323f899d5db85147704749ebec162759b668c7ac", + "model_path": "runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "training_games": 2400, + "training_truncated": 0, + "training_search_truncated": 0, + "snapshot_updates": [ + -1, + 9 + ], + "arm": "best", + "update": 9, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 2.562999725341797e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "league-admission-best-u9-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abe052b404719ba376167aa", + "observed_stage": "COMPLETED" + }, + { + "run": "league-admission-best-u9-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abe052c404719ba376167ac", + "observed_stage": "COMPLETED" + }, + { + "run": "league-admission-best-u9-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abe052c404719ba376167ae", + "observed_stage": "COMPLETED" + }, + { + "run": "league-admission-best-u9-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abe052dfbc85ba68235fe86", + "observed_stage": "COMPLETED" + }, + { + "run": "league-admission-best-u9-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abe052efbc85ba68235fe88", + "observed_stage": "COMPLETED" + }, + { + "run": "league-admission-best-u9-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abe052ffbc85ba68235fe8a", + "observed_stage": "COMPLETED" + } + ], + "status": "COMPLETED", + "scope": "Scheduled paired development screen; not final qualification", + "protocol": "ai/strong/league-admission-protocol-v1.json", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Complete scheduled secondary screen; not qualified. See multiplayer_league_admission_v1.update9_interpretation and paired_screens. Continue unchanged to primary update19.", + "reports": { + "league-admission-best-u9-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/323f899d5db85147704749ebec162759b668c7ac/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.528125, + "truncated": 0, + "seconds": 23.444562818000122, + "inference_p95_ms": 0.350388499782639, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.6625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.5875 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4875, + 0.7125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.5875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.478125, + 0.58125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a9a8f1ba49e5904f0c7a47fcc3c0dfa64d495881" + }, + "league-admission-best-u9-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/323f899d5db85147704749ebec162759b668c7ac/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.6260416666666667, + "truncated": 0, + "seconds": 29.143560032000096, + "inference_p95_ms": 0.3901500003848923, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5791666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.49583333333333335, + 0.6625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.8, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7166666666666667, + 0.875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5083333333333333, + 0.6833333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5875, + 0.6645833333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a9a8f1ba49e5904f0c7a47fcc3c0dfa64d495881" + }, + "league-admission-best-u9-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/323f899d5db85147704749ebec162759b668c7ac/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5625, + "truncated": 0, + "seconds": 38.66603110000001, + "inference_p95_ms": 0.4034869999998137, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.51875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.45, + 0.58125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.425, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.34375, + 0.50625 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.70625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.625, + 0.78125 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.6, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.51875, + 0.68125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5203125, + 0.603125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0e65288f16e8cfe5a285790569243588b19c52e8" + }, + "league-admission-best-u9-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/323f899d5db85147704749ebec162759b668c7ac/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.69875, + "truncated": 0, + "seconds": 45.51603366699999, + "inference_p95_ms": 0.41932129999651113, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.605, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.685 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.685, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.63, + 0.74 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.735, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.675, + 0.79 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.77, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.709875, + 0.83 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6675, + 0.73125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0e65288f16e8cfe5a285790569243588b19c52e8" + }, + "league-admission-best-u9-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/323f899d5db85147704749ebec162759b668c7ac/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.6328125, + "truncated": 0, + "seconds": 51.17157556599999, + "inference_p95_ms": 0.4232070499938343, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.5833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5166666666666667, + 0.6458333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.5958333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.6666666666666666 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.7145833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65625, + 0.7708333333333334 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5666666666666667, + 0.7083333333333334 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6026041666666667, + 0.6635416666666667 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0e65288f16e8cfe5a285790569243588b19c52e8" + }, + "league-admission-best-u9-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/323f899d5db85147704749ebec162759b668c7ac/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "9a1c2d6de3755065866858a9e92d194eb7f43e0c6252e472b773f3f339c23246", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.4125, + "truncated": 0, + "seconds": 78.109087058, + "inference_p95_ms": 0.3925324499888915, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.4166666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.325, + 0.5083333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.36666666666666664, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.26666666666666666, + 0.4666666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.48333333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.5916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.38333333333333336, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.475 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.35625, + 0.4708333333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "0e65288f16e8cfe5a285790569243588b19c52e8" + } + }, + "paired_against_starting_h200_u29": { + "league-admission-best-u9-economic-2p": { + "independent_deals": 40, + "difference": -0.00625, + "paired_seed_bootstrap_95_interval": [ + -0.06875, + 0.05625 + ] + }, + "league-admission-best-u9-economic-3p": { + "independent_deals": 40, + "difference": 0.022916666666666675, + "paired_seed_bootstrap_95_interval": [ + -0.026041666666666664, + 0.07083333333333333 + ] + }, + "league-admission-best-u9-economic-4p": { + "independent_deals": 40, + "difference": -0.0015625, + "paired_seed_bootstrap_95_interval": [ + -0.05546875, + 0.05390625 + ] + }, + "league-admission-best-u9-economic-5p": { + "independent_deals": 40, + "difference": -0.064375, + "paired_seed_bootstrap_95_interval": [ + -0.0975, + -0.03125 + ] + }, + "league-admission-best-u9-economic-6p": { + "independent_deals": 40, + "difference": -0.04947916666666667, + "paired_seed_bootstrap_95_interval": [ + -0.090625, + -0.006249999999999997 + ] + }, + "league-admission-best-u9-a260-3p": { + "independent_deals": 40, + "difference": 0.057291666666666664, + "paired_seed_bootstrap_95_interval": [ + -0.00625, + 0.11875 + ] } } } From 06774fe7df97154719aecac3ccb58b6b38de8a1f Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:08:29 +0200 Subject: [PATCH 177/184] Record completed geographic training and launch final checkpoint research screens --- ai/strong/experiments.json | 233 ++++++++++++++++++++++++++++++++++++- 1 file changed, 230 insertions(+), 3 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b4a30bd..64eff47 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -199,7 +199,13 @@ "league-admission-best-u9-economic-4p": "6abe052c404719ba376167ae", "league-admission-best-u9-economic-5p": "6abe052dfbc85ba68235fe86", "league-admission-best-u9-economic-6p": "6abe052efbc85ba68235fe88", - "league-admission-best-u9-a260-3p": "6abe052ffbc85ba68235fe8a" + "league-admission-best-u9-a260-3p": "6abe052ffbc85ba68235fe8a", + "multiplayer-geoleague-u79-economic-2p": "6abe14eafbc85ba6823605db", + "multiplayer-geoleague-u79-economic-3p": "6abe14eafbc85ba6823605e3", + "multiplayer-geoleague-u79-economic-4p": "6abe14ebfbc85ba6823605e8", + "multiplayer-geoleague-u79-economic-5p": "6abe14ec404719ba37616d00", + "multiplayer-geoleague-u79-economic-6p": "6abe14ed404719ba37616d04", + "multiplayer-geoleague-u79-a260-3p": "6abe14ed404719ba37616d06" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -3815,7 +3821,7 @@ "async_rollout": true, "opponent_mode": "mixed_search_geo", "timeout": "24h", - "status": "RUNNING", + "status": "COMPLETED", "purpose": "Scale verified asynchronous full-game collection against geographic-search league; preserve original teacher warm start for clear comparison.", "first_completed_update": { "stage": "train", @@ -3905,7 +3911,101 @@ } } }, - "first_update_note": "Full environment coverage guard passed before optimization; 48 games per count. Training outcomes are sampled-policy league games, not independent strength evidence." + "first_update_note": "Full environment coverage guard passed before optimization; 48 games per count. Training outcomes are sampled-policy league games, not independent strength evidence.", + "final_checkpoint": { + "revision": "035345f5f05bbbb55af5e0f4884d07f9087b1e32", + "run": "multiplayer-refine-geoleague-async-v1", + "update": 79, + "best_update": 69, + "hashes": { + "latest.pt": "18481e19e4e7b045ea088f23848aa1bb14c362271e158f47c86f38afa11ad0f9", + "latest.onnx": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "best.pt": "fee196410b3396c21efb89db441ca64d3dfb8aa6ba8a0a7ed146b1bd1be5c970", + "best.onnx": "1144b043d544ae0f90895c6a8dc7c000978017678e635729762adad337259e35", + "metrics.json": "912e0deff0b86257cb2c80a577b8ef9aec783b5a99067baf5ec2f0c8961b717d", + "schema.json": "dbb1edc7afc35e47004487294d380b2bb8d0e5ad0e0de7c32d41d4c8ee7060cc" + }, + "training_games": 19200, + "training_truncated": 0, + "training_search_truncated": 4, + "training_search_cap_details": [ + { + "update": 25, + "opponent": "search_geo", + "decisions": 2766, + "evaluations": 226160, + "truncated": 1 + }, + { + "update": 39, + "opponent": "search_geo", + "decisions": 4896, + "evaluations": 398448, + "truncated": 1 + }, + { + "update": 40, + "opponent": "search_geo", + "decisions": 3640, + "evaluations": 295104, + "truncated": 1 + }, + { + "update": 58, + "opponent": "search_geo", + "decisions": 4799, + "evaluations": 391504, + "truncated": 1 + } + ], + "training_search_evaluations": 29436848 + }, + "final_export_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 2113, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 18 + ], + "torch32": -0.04654502868652344, + "onnx32": -0.04652976989746094, + "reference64": -0.04653992752699665 + } + ], + "torch_max_error": 7.481528918162894e-06, + "onnx_max_error": 1.1363142196074705e-05, + "winning_margin": 6.952146072055745 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 3.635883331298828e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "strict_export_parity_passed": false, + "qualification_eligible": false, + "completion_note": "All 80 updates completed with 48 games per count per update and zero actual training truncations. Four earlier opponent-search truncations are retained in the audit. Final latest update79 differs from internal best update69. Strict export parity fails one logit; all2553 actions match. Research screening only; no qualified model." }, "multiplayer_search_strong_probe": { "candidate_revision": "ab34dd266010ded1c9a6c818c721e5505dd1ddeb", @@ -30278,5 +30378,132 @@ ] } } + }, + "multiplayer_geoleague_update79_screening": { + "candidate_revision": "035345f5f05bbbb55af5e0f4884d07f9087b1e32", + "model_path": "runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "training_games": 19200, + "training_search_truncated": 4, + "training_search_cap_details": [ + { + "update": 25, + "opponent": "search_geo", + "decisions": 2766, + "evaluations": 226160, + "truncated": 1 + }, + { + "update": 39, + "opponent": "search_geo", + "decisions": 4896, + "evaluations": 398448, + "truncated": 1 + }, + { + "update": 40, + "opponent": "search_geo", + "decisions": 3640, + "evaluations": 295104, + "truncated": 1 + }, + { + "update": 58, + "opponent": "search_geo", + "decisions": 4799, + "evaluations": 391504, + "truncated": 1 + } + ], + "training_search_evaluations": 29436848, + "training_truncated": 0, + "export_diagnostic": { + "positions": 2553, + "reference_details": [ + { + "position": 2113, + "output": 0, + "player_count": 6, + "mismatches": [ + { + "index": [ + 0, + 18 + ], + "torch32": -0.04654502868652344, + "onnx32": -0.04652976989746094, + "reference64": -0.04653992752699665 + } + ], + "torch_max_error": 7.481528918162894e-06, + "onnx_max_error": 1.1363142196074705e-05, + "winning_margin": 6.952146072055745 + } + ], + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "max_logit_error": 4.57763671875e-05, + "max_value_error": 3.635883331298828e-06, + "all_actions_match": true, + "action_mismatches": 0, + "tolerance_violation_positions": [ + 1, + 0 + ], + "specialist_route_counts": {} + }, + "strict_export_parity_passed": false, + "qualification_eligible": false, + "jobs": [ + { + "run": "multiplayer-geoleague-u79-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abe14eafbc85ba6823605db" + }, + { + "run": "multiplayer-geoleague-u79-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abe14eafbc85ba6823605e3" + }, + { + "run": "multiplayer-geoleague-u79-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abe14ebfbc85ba6823605e8" + }, + { + "run": "multiplayer-geoleague-u79-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abe14ec404719ba37616d00" + }, + { + "run": "multiplayer-geoleague-u79-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abe14ed404719ba37616d04" + }, + { + "run": "multiplayer-geoleague-u79-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abe14ed404719ba37616d06" + } + ], + "status": "RUNNING", + "scope": "Paired held-out development screening; not final qualification", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Research-only screening of final latest update79; internal best remains update69. All2553 actions match, but one logit fails strict numerical parity. Not eligible for qualification. Four earlier opponent search simulations were capped; all actual training games complete." } } From 75657b5253450fa875ea4fadaaf9c03186ac7019 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:09:29 +0200 Subject: [PATCH 178/184] Record first geographic final-checkpoint screens and two-player failure --- ai/strong/experiments.json | 263 ++++++++++++++++++++++++++++++++++++- 1 file changed, 256 insertions(+), 7 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 64eff47..b1a8400 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -30467,43 +30467,292 @@ "run": "multiplayer-geoleague-u79-economic-2p", "players": 2, "opponent": "economic", - "job_id": "6abe14eafbc85ba6823605db" + "job_id": "6abe14eafbc85ba6823605db", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u79-economic-3p", "players": 3, "opponent": "economic", - "job_id": "6abe14eafbc85ba6823605e3" + "job_id": "6abe14eafbc85ba6823605e3", + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u79-economic-4p", "players": 4, "opponent": "economic", - "job_id": "6abe14ebfbc85ba6823605e8" + "job_id": "6abe14ebfbc85ba6823605e8", + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-geoleague-u79-economic-5p", "players": 5, "opponent": "economic", - "job_id": "6abe14ec404719ba37616d00" + "job_id": "6abe14ec404719ba37616d00", + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-geoleague-u79-economic-6p", "players": 6, "opponent": "economic", - "job_id": "6abe14ed404719ba37616d04" + "job_id": "6abe14ed404719ba37616d04", + "observed_stage": "SCHEDULING" }, { "run": "multiplayer-geoleague-u79-a260-3p", "players": 3, "opponent": "a260", - "job_id": "6abe14ed404719ba37616d06" + "job_id": "6abe14ed404719ba37616d06", + "observed_stage": "SCHEDULING" } ], "status": "RUNNING", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Research-only screening of final latest update79; internal best remains update69. All2553 actions match, but one logit fails strict numerical parity. Not eligible for qualification. Four earlier opponent search simulations were capped; all actual training games complete." + "decision": "Research-only screening of final latest update79; internal best remains update69. All2553 actions match, but one logit fails strict numerical parity. Not eligible for qualification. Four earlier opponent search simulations were capped; all actual training games complete.", + "reports": { + "multiplayer-geoleague-u79-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/035345f5f05bbbb55af5e0f4884d07f9087b1e32/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.5234375, + "truncated": 0, + "seconds": 23.658672760240734, + "inference_p95_ms": 0.3484640270471572, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.475, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.6 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.64375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3375, + 0.575 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.46875, + 0.578125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "fd75e33d47511027e608d156172c4441d77c2c54" + }, + "multiplayer-geoleague-u79-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/035345f5f05bbbb55af5e0f4884d07f9087b1e32/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5989583333333334, + "truncated": 0, + "seconds": 29.446276201000728, + "inference_p95_ms": 0.38890399955562305, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5666666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.48333333333333334, + 0.65 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.4625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.375, + 0.5458333333333333 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.7416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65, + 0.825 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5166666666666667, + 0.725 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5479166666666667, + 0.6520833333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "fd75e33d47511027e608d156172c4441d77c2c54" + } + }, + "paired_against_geoleague_u19": { + "multiplayer-geoleague-u79-economic-2p": { + "independent_deals": 40, + "difference": 0.0046875, + "paired_seed_bootstrap_95_interval": [ + -0.0796875, + 0.0921875 + ] + }, + "multiplayer-geoleague-u79-economic-3p": { + "independent_deals": 40, + "difference": 0.058333333333333334, + "paired_seed_bootstrap_95_interval": [ + 0.003124999999999997, + 0.11354166666666665 + ] + } + }, + "paired_against_geoleague_u69": { + "multiplayer-geoleague-u79-economic-2p": { + "independent_deals": 40, + "difference": -0.05, + "paired_seed_bootstrap_95_interval": [ + -0.11875, + 0.0171875 + ] + }, + "multiplayer-geoleague-u79-economic-3p": { + "independent_deals": 40, + "difference": 0.011458333333333334, + "paired_seed_bootstrap_95_interval": [ + -0.04583333333333334, + 0.06666666666666667 + ] + } + }, + "paired_against_h200_u29": { + "multiplayer-geoleague-u79-economic-2p": { + "independent_deals": 40, + "difference": -0.0109375, + "paired_seed_bootstrap_95_interval": [ + -0.09375, + 0.0671875 + ] + }, + "multiplayer-geoleague-u79-economic-3p": { + "independent_deals": 40, + "difference": -0.004166666666666668, + "paired_seed_bootstrap_95_interval": [ + -0.0625, + 0.053125 + ] + } + }, + "paired_against_h200_u79": { + "multiplayer-geoleague-u79-economic-2p": { + "independent_deals": 40, + "difference": -0.1109375, + "paired_seed_bootstrap_95_interval": [ + -0.1890625, + -0.0359375 + ] + }, + "multiplayer-geoleague-u79-economic-3p": { + "independent_deals": 40, + "difference": -0.009375000000000005, + "paired_seed_bootstrap_95_interval": [ + -0.07083333333333333, + 0.052083333333333336 + ] + } + }, + "partial_interpretation": "First two completed economic screens: 2p52.34375% fails66.25% floor; 3p59.895833%. All800 games completed without game/search truncations. Remaining four screens pending; final checkpoint already fails the two-player economic strength floor as well as strict export parity. Collect full predefined screen without claiming qualification." } } From c155d1586320160da65afcec1666e8660cb979ad Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:12:53 +0200 Subject: [PATCH 179/184] Complete geographic final-checkpoint evaluation and reject qualification --- ai/strong/experiments.json | 492 ++++++++++++++++++++++++++++++++++++- 1 file changed, 485 insertions(+), 7 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b1a8400..b09e880 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -30482,35 +30482,35 @@ "players": 4, "opponent": "economic", "job_id": "6abe14ebfbc85ba6823605e8", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u79-economic-5p", "players": 5, "opponent": "economic", "job_id": "6abe14ec404719ba37616d00", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u79-economic-6p", "players": 6, "opponent": "economic", "job_id": "6abe14ed404719ba37616d04", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" }, { "run": "multiplayer-geoleague-u79-a260-3p", "players": 3, "opponent": "a260", "job_id": "6abe14ed404719ba37616d06", - "observed_stage": "SCHEDULING" + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Paired held-out development screening; not final qualification", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Research-only screening of final latest update79; internal best remains update69. All2553 actions match, but one logit fails strict numerical parity. Not eligible for qualification. Four earlier opponent search simulations were capped; all actual training games complete.", + "decision": "Reject final geographic update79 for qualification: economic2p52.34375% is below66.25%; A2603p33.333333% is below40%, with only Recharged/open rule CI above chance. Strict export parity also fails one logit. All3680 development games complete, no game/search truncations. Do not extend this same training recipe or launch final reserved qualification.", "reports": { "multiplayer-geoleague-u79-economic-2p": { "async_rollout": false, @@ -30679,6 +30679,342 @@ "search_rollouts_reported": true, "search_stats": {}, "artifact_revision": "fd75e33d47511027e608d156172c4441d77c2c54" + }, + "multiplayer-geoleague-u79-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/035345f5f05bbbb55af5e0f4884d07f9087b1e32/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5453125, + "truncated": 0, + "seconds": 39.19828891099999, + "inference_p95_ms": 0.40218899999899804, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.4375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.53125 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3625, + 0.5375 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.6875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.775 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.60625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.51875, + 0.6875 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.4921875, + 0.5984375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a55cfdacb74f5bb6ab4464dfc7c0a64ffce9ab6b" + }, + "multiplayer-geoleague-u79-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/035345f5f05bbbb55af5e0f4884d07f9087b1e32/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.714375, + "truncated": 0, + "seconds": 44.71749054600001, + "inference_p95_ms": 0.4198756499945941, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.67, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.595, + 0.74 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.655, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.585, + 0.725 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.8, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.75, + 0.85 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.7325, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.665, + 0.7975 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6775, + 0.75 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a55cfdacb74f5bb6ab4464dfc7c0a64ffce9ab6b" + }, + "multiplayer-geoleague-u79-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/035345f5f05bbbb55af5e0f4884d07f9087b1e32/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.6598958333333333, + "truncated": 0, + "seconds": 50.25934596900001, + "inference_p95_ms": 0.4133405000004585, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.6541666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5875, + 0.7208333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.5875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5291666666666667, + 0.65 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.74375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.69375, + 0.79375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.6541666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.7083333333333334 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6291666666666667, + 0.6895833333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "a55cfdacb74f5bb6ab4464dfc7c0a64ffce9ab6b" + }, + "multiplayer-geoleague-u79-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/035345f5f05bbbb55af5e0f4884d07f9087b1e32/runs/multiplayer-refine-geoleague-async-v1/latest.onnx", + "model_sha256": "35deffdacefdc3d3638417b1590432b84a86f3fb302958e273f5eeea9ad7ce34", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.3333333333333333, + "truncated": 0, + "seconds": 72.151513363, + "inference_p95_ms": 0.40227449999719056, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.2916666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.20833333333333334, + 0.375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.275, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2, + 0.35 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.31666666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.24166666666666667, + 0.4 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.29375, + 0.375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "71839c69a5b1c4e1a1e455808f47bf3bc803416c" } }, "paired_against_geoleague_u19": { @@ -30697,6 +31033,38 @@ 0.003124999999999997, 0.11354166666666665 ] + }, + "multiplayer-geoleague-u79-economic-4p": { + "independent_deals": 40, + "difference": -0.01875, + "paired_seed_bootstrap_95_interval": [ + -0.065625, + 0.028125 + ] + }, + "multiplayer-geoleague-u79-economic-5p": { + "independent_deals": 40, + "difference": 0.030624999999999993, + "paired_seed_bootstrap_95_interval": [ + -0.012499999999999997, + 0.07437500000000001 + ] + }, + "multiplayer-geoleague-u79-economic-6p": { + "independent_deals": 40, + "difference": 0.040625, + "paired_seed_bootstrap_95_interval": [ + -0.002604166666666663, + 0.08229166666666668 + ] + }, + "multiplayer-geoleague-u79-a260-3p": { + "independent_deals": 40, + "difference": 0.008333333333333331, + "paired_seed_bootstrap_95_interval": [ + -0.04791666666666667, + 0.06666666666666667 + ] } }, "paired_against_geoleague_u69": { @@ -30715,6 +31083,38 @@ -0.04583333333333334, 0.06666666666666667 ] + }, + "multiplayer-geoleague-u79-economic-4p": { + "independent_deals": 40, + "difference": 0.0109375, + "paired_seed_bootstrap_95_interval": [ + -0.0359375, + 0.0578125 + ] + }, + "multiplayer-geoleague-u79-economic-5p": { + "independent_deals": 40, + "difference": 0.011250000000000001, + "paired_seed_bootstrap_95_interval": [ + -0.03, + 0.05499999999999999 + ] + }, + "multiplayer-geoleague-u79-economic-6p": { + "independent_deals": 40, + "difference": -0.009895833333333335, + "paired_seed_bootstrap_95_interval": [ + -0.04791666666666667, + 0.028124999999999994 + ] + }, + "multiplayer-geoleague-u79-a260-3p": { + "independent_deals": 40, + "difference": -0.06458333333333334, + "paired_seed_bootstrap_95_interval": [ + -0.1125, + -0.016666666666666663 + ] } }, "paired_against_h200_u29": { @@ -30733,6 +31133,38 @@ -0.0625, 0.053125 ] + }, + "multiplayer-geoleague-u79-economic-4p": { + "independent_deals": 40, + "difference": -0.01875, + "paired_seed_bootstrap_95_interval": [ + -0.07890625, + 0.0453125 + ] + }, + "multiplayer-geoleague-u79-economic-5p": { + "independent_deals": 40, + "difference": -0.04875, + "paired_seed_bootstrap_95_interval": [ + -0.09124999999999998, + -0.005000000000000003 + ] + }, + "multiplayer-geoleague-u79-economic-6p": { + "independent_deals": 40, + "difference": -0.02239583333333333, + "paired_seed_bootstrap_95_interval": [ + -0.06197916666666666, + 0.015625 + ] + }, + "multiplayer-geoleague-u79-a260-3p": { + "independent_deals": 40, + "difference": -0.021875, + "paired_seed_bootstrap_95_interval": [ + -0.07708333333333332, + 0.03125000000000001 + ] } }, "paired_against_h200_u79": { @@ -30751,8 +31183,54 @@ -0.07083333333333333, 0.052083333333333336 ] + }, + "multiplayer-geoleague-u79-economic-4p": { + "independent_deals": 40, + "difference": -0.0515625, + "paired_seed_bootstrap_95_interval": [ + -0.1140625, + 0.009375 + ] + }, + "multiplayer-geoleague-u79-economic-5p": { + "independent_deals": 40, + "difference": -0.0625, + "paired_seed_bootstrap_95_interval": [ + -0.1, + -0.025625000000000002 + ] + }, + "multiplayer-geoleague-u79-economic-6p": { + "independent_deals": 40, + "difference": -0.07291666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.103125, + -0.04375 + ] + }, + "multiplayer-geoleague-u79-a260-3p": { + "independent_deals": 40, + "difference": -0.0020833333333333316, + "paired_seed_bootstrap_95_interval": [ + -0.06041666666666666, + 0.05625000000000001 + ] } }, - "partial_interpretation": "First two completed economic screens: 2p52.34375% fails66.25% floor; 3p59.895833%. All800 games completed without game/search truncations. Remaining four screens pending; final checkpoint already fails the two-player economic strength floor as well as strict export parity. Collect full predefined screen without claiming qualification." + "interpretation": { + "economic_win_rates_2_to_6": [ + 0.5234375, + 0.5989583333333334, + 0.5453125, + 0.714375, + 0.6598958333333333 + ], + "a260_win_rate": 0.3333333333333333, + "a260_vs_geoleague69": "Supported decline of6.458333pp; paired95%CI[-11.25,-1.666667]pp. All economic comparisons versus69 include zero.", + "versus_h20029": "Supported5p decline of4.875pp, CI[-9.125,-0.5]pp; other overall intervals include zero.", + "versus_h20079": "Supported economic deficits at2p/5p/6p; other overall intervals include zero.", + "limitation": "Development screening on reused seeds; marginal exploratory intervals, not final qualification.", + "next_action": "Complete prespecified update19 league-admission comparison. No evidence supports more of unchanged geographic training." + } } } From c2f64b21521119e3224a0dad443b4b0fdbbbbed0 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:33:45 +0200 Subject: [PATCH 180/184] Validate completed league pilot checkpoints and launch primary paired screens --- ai/strong/experiments.json | 222 ++++++++++++++++++++++++++++++++++++- 1 file changed, 216 insertions(+), 6 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index b09e880..3b02f15 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -205,7 +205,19 @@ "multiplayer-geoleague-u79-economic-4p": "6abe14ebfbc85ba6823605e8", "multiplayer-geoleague-u79-economic-5p": "6abe14ec404719ba37616d00", "multiplayer-geoleague-u79-economic-6p": "6abe14ed404719ba37616d04", - "multiplayer-geoleague-u79-a260-3p": "6abe14ed404719ba37616d06" + "multiplayer-geoleague-u79-a260-3p": "6abe14ed404719ba37616d06", + "league-admission-best-u19-economic-2p": "6abe1ac1404719ba376170f2", + "league-admission-best-u19-economic-3p": "6abe1ac2fbc85ba682360a65", + "league-admission-best-u19-economic-4p": "6abe1ac2404719ba376170f7", + "league-admission-best-u19-economic-5p": "6abe1ac3404719ba376170f9", + "league-admission-best-u19-economic-6p": "6abe1ac4404719ba376170fb", + "league-admission-best-u19-a260-3p": "6abe1ac4404719ba376170fd", + "league-admission-periodic-anchor-u19-economic-2p": "6abe1acffbc85ba682360a6c", + "league-admission-periodic-anchor-u19-economic-3p": "6abe1ad0fbc85ba682360a6e", + "league-admission-periodic-anchor-u19-economic-4p": "6abe1ad0404719ba37617101", + "league-admission-periodic-anchor-u19-economic-5p": "6abe1ad1404719ba37617103", + "league-admission-periodic-anchor-u19-economic-6p": "6abe1ad2fbc85ba682360a72", + "league-admission-periodic-anchor-u19-a260-3p": "6abe1ad2404719ba37617105" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -27723,7 +27735,7 @@ "interpretation": "All3680 held-out development screening games completed with zero actual/search truncations. Economic2\u20136p win rates63.4375%,60.833333%,59.6875%,77.6875%,73.28125%; frozenA2603p33.541667%, below40% floor. Final80-update training endpoint and strict export success do not qualify this model. Internal-best selection did not deliver universal external strength. Preserve earlier candidates and reserved final seeds; do not extend the same H200 recipe solely because training finished. Further work should change training/opponent coverage based on the observed sealed-auction and frozen-opponent weaknesses, while the geographic80-update run completes." }, "multiplayer_league_admission_v1": { - "status": "RUNNING", + "status": "EVALUATING", "source": { "archive": "strong-source-v34.tgz", "revision": "2c273f96562d0cc2f8c05a2735d8c0492ab77fd8", @@ -27754,12 +27766,54 @@ { "run": "multiplayer-league-admission-v1-best", "job_id": "6abdef75404719ba37616230", - "admission": "best" + "admission": "best", + "observed_stage": "COMPLETED", + "final_checkpoint": { + "run": "multiplayer-league-admission-v1-best", + "update": 19, + "revision": "efdb82f2712b8c6648100d7ad99b6941102f7001", + "hashes": { + "latest.pt": "acd9f867c91c1ce4485b816172dad80f27e6c3d340d3cdd68ed4217e28d37bfe", + "latest.onnx": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "metrics.json": "7fce6ea346c1f94eff31b1f02a01cf83c73afc07ac898ead45e0552863df172c", + "schema.json": "01de9686a1838f1b44e6e766da2ccc4e08f3daf19d0531e3272943f3d5163897" + }, + "training_games": 4800, + "training_truncated": 0, + "snapshot_updates": [ + -1, + 9, + 19 + ], + "strict_parity": "passed", + "scope": "Development comparison of snapshot admission policies; not final qualification." + } }, { "run": "multiplayer-league-admission-v1-periodic-anchor", "job_id": "6abdef76fbc85ba68235f6a0", - "admission": "periodic_anchor" + "admission": "periodic_anchor", + "observed_stage": "COMPLETED", + "final_checkpoint": { + "run": "multiplayer-league-admission-v1-periodic-anchor", + "update": 19, + "revision": "efdb82f2712b8c6648100d7ad99b6941102f7001", + "hashes": { + "latest.pt": "b8db0d4cfa278a37c4c38c6fae734e9375d2d543e59f41bcca128652385e092e", + "latest.onnx": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "metrics.json": "bef60ab198ff7847abaf4831a919bf106f01f602eafb51eee9223b8fe760a694", + "schema.json": "73bb15a8a5897177174aeee6b894390951157b47fbb32cf811d9ee9489fd0304" + }, + "training_games": 4800, + "training_truncated": 0, + "snapshot_updates": [ + -1, + 14, + 19 + ], + "strict_parity": "passed", + "scope": "Development comparison of snapshot admission policies; not final qualification." + } } ], "hypothesis": "Periodic admission with retained starting policy improves robustness versus score-gated last-three admission. Both arms share source, initial checkpoint, seed, geography-aware search opponent mix and optimizer settings.", @@ -27828,7 +27882,9 @@ }, "screening_keys": [ "multiplayer_league_admission_periodic_anchor_update9_screening", - "multiplayer_league_admission_best_update9_screening" + "multiplayer_league_admission_best_update9_screening", + "multiplayer_league_admission_best_update19_screening", + "multiplayer_league_admission_periodic_anchor_update19_screening" ], "paired_screens": { "9": { @@ -28221,7 +28277,9 @@ "starting_policy_comparison": "Periodic arm has no supported overall change versus startingH200u29 in any screen. Best-admission arm has supported economic5p/6p regressions. Evidence favors retention of starting strength, not established improvement beyond it.", "qualification_failures": "Both arms miss economic2p66.25% floor. PeriodicA26039.6875% misses40%; bestA26041.25% exceeds point floor but original/open and both sealed rule intervals include1/3 chance.", "limitations": "Single training seed; update9 is secondary; marginal exploratory confidence intervals are not simultaneous guarantees. Final reserved seeds untouched." - } + }, + "training_status": "COMPLETED", + "completion_note": "Both matched arms completed 20 updates and4800 games each, balanced2\u20136players, with zero actual/search truncations and strict2553fixture parity. Primary update19 paired screens launched; qualification remains unproven." }, "multiplayer_geoleague_update69_screening": { "candidate_revision": "69a52c109a03d4ad3a490587a2094cc7e1f430c0", @@ -31232,5 +31290,157 @@ "limitation": "Development screening on reused seeds; marginal exploratory intervals, not final qualification.", "next_action": "Complete prespecified update19 league-admission comparison. No evidence supports more of unchanged geographic training." } + }, + "multiplayer_league_admission_best_update19_screening": { + "candidate_revision": "efdb82f2712b8c6648100d7ad99b6941102f7001", + "model_path": "runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "training_games": 4800, + "training_truncated": 0, + "training_search_truncated": 0, + "snapshot_updates": [ + -1, + 9, + 19 + ], + "arm": "best", + "update": 19, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "max_logit_error": 6.866455078125e-05, + "max_value_error": 2.115964889526367e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "league-admission-best-u19-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abe1ac1404719ba376170f2" + }, + { + "run": "league-admission-best-u19-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abe1ac2fbc85ba682360a65" + }, + { + "run": "league-admission-best-u19-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abe1ac2404719ba376170f7" + }, + { + "run": "league-admission-best-u19-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abe1ac3404719ba376170f9" + }, + { + "run": "league-admission-best-u19-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abe1ac4404719ba376170fb" + }, + { + "run": "league-admission-best-u19-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abe1ac4404719ba376170fd" + } + ], + "status": "RUNNING", + "scope": "Scheduled paired development screen; not final qualification", + "protocol": "ai/strong/league-admission-protocol-v1.json", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Await all six screens and matched opposite arm; do not infer admission benefit from this arm alone." + }, + "multiplayer_league_admission_periodic_anchor_update19_screening": { + "candidate_revision": "efdb82f2712b8c6648100d7ad99b6941102f7001", + "model_path": "runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "training_games": 4800, + "training_truncated": 0, + "training_search_truncated": 0, + "snapshot_updates": [ + -1, + 14, + 19 + ], + "arm": "periodic_anchor", + "update": 19, + "parity": { + "positions": 2553, + "by_player_count": { + "2": 349, + "3": 427, + "4": 527, + "5": 609, + "6": 641 + }, + "inactive_values_zero": true, + "feature_revision": "4.0-multiplayer", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "max_logit_error": 6.866455078125e-05, + "max_value_error": 2.8014183044433594e-06, + "all_actions_match": true, + "specialist_route_counts": {} + }, + "jobs": [ + { + "run": "league-admission-periodic-anchor-u19-economic-2p", + "players": 2, + "opponent": "economic", + "job_id": "6abe1acffbc85ba682360a6c" + }, + { + "run": "league-admission-periodic-anchor-u19-economic-3p", + "players": 3, + "opponent": "economic", + "job_id": "6abe1ad0fbc85ba682360a6e" + }, + { + "run": "league-admission-periodic-anchor-u19-economic-4p", + "players": 4, + "opponent": "economic", + "job_id": "6abe1ad0404719ba37617101" + }, + { + "run": "league-admission-periodic-anchor-u19-economic-5p", + "players": 5, + "opponent": "economic", + "job_id": "6abe1ad1404719ba37617103" + }, + { + "run": "league-admission-periodic-anchor-u19-economic-6p", + "players": 6, + "opponent": "economic", + "job_id": "6abe1ad2fbc85ba682360a72" + }, + { + "run": "league-admission-periodic-anchor-u19-a260-3p", + "players": 3, + "opponent": "a260", + "job_id": "6abe1ad2404719ba37617105" + } + ], + "status": "RUNNING", + "scope": "Scheduled paired development screen; not final qualification", + "protocol": "ai/strong/league-admission-protocol-v1.json", + "arena_source": "37465b08df007221665d796448aea57e6828257e", + "search_samples": 0, + "decision": "Await all six screens and matched opposite arm; do not infer admission benefit from this arm alone." } } From 882be043f90983ae4651cfa303d3ac92df47bdaf Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:37:38 +0200 Subject: [PATCH 181/184] Complete primary league-admission comparison and record failed strength gates --- ai/strong/experiments.json | 1554 +++++++++++++++++++++++++++++++++++- 1 file changed, 1536 insertions(+), 18 deletions(-) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 3b02f15..e99db19 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -27735,7 +27735,7 @@ "interpretation": "All3680 held-out development screening games completed with zero actual/search truncations. Economic2\u20136p win rates63.4375%,60.833333%,59.6875%,77.6875%,73.28125%; frozenA2603p33.541667%, below40% floor. Final80-update training endpoint and strict export success do not qualify this model. Internal-best selection did not deliver universal external strength. Preserve earlier candidates and reserved final seeds; do not extend the same H200 recipe solely because training finished. Further work should change training/opponent coverage based on the observed sealed-auction and frozen-opponent weaknesses, while the geographic80-update run completes." }, "multiplayer_league_admission_v1": { - "status": "EVALUATING", + "status": "COMPLETED", "source": { "archive": "strong-source-v34.tgz", "revision": "2c273f96562d0cc2f8c05a2735d8c0492ab77fd8", @@ -28249,6 +28249,369 @@ } } } + }, + "19": { + "update": 19, + "difference_direction": "periodic_anchor minus best", + "primary_checkpoint": true, + "bootstrap_replicates": 20000, + "bootstrap_seed": 623, + "bootstrap_unit": "gameSeed with all seat/rule repeats", + "arms": { + "periodic_anchor": { + "revision": "efdb82f2712b8c6648100d7ad99b6941102f7001", + "sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67" + }, + "best": { + "revision": "efdb82f2712b8c6648100d7ad99b6941102f7001", + "sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e" + } + }, + "limitations": "Single training seed; asynchronous trajectories differ. Marginal exploratory95% intervals, not simultaneous confidence guarantees. Development deals were reused across prior screens. Final reserved test remains untouched.", + "comparisons": { + "economic/2p": { + "overall": { + "games_per_arm": 320, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.603125, + "best_win_rate": 0.528125, + "difference": 0.075, + "paired_seed_bootstrap_95_interval": [ + -0.009375, + 0.1578125 + ] + }, + "original/open": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5375, + "best_win_rate": 0.5125, + "difference": 0.025, + "paired_seed_bootstrap_95_interval": [ + -0.1375, + 0.1875 + ] + }, + "original/sealed": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5625, + "best_win_rate": 0.375, + "difference": 0.1875, + "paired_seed_bootstrap_95_interval": [ + 0.0625, + 0.3125 + ] + }, + "recharged/open": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6875, + "best_win_rate": 0.6625, + "difference": 0.025, + "paired_seed_bootstrap_95_interval": [ + -0.125, + 0.175 + ] + }, + "recharged/sealed": { + "games_per_arm": 80, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.625, + "best_win_rate": 0.5625, + "difference": 0.0625, + "paired_seed_bootstrap_95_interval": [ + -0.1, + 0.225 + ] + } + }, + "economic/3p": { + "overall": { + "games_per_arm": 480, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5739583333333333, + "best_win_rate": 0.5666666666666667, + "difference": 0.007291666666666671, + "paired_seed_bootstrap_95_interval": [ + -0.065625, + 0.08020833333333333 + ] + }, + "original/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5083333333333333, + "best_win_rate": 0.48333333333333334, + "difference": 0.025, + "paired_seed_bootstrap_95_interval": [ + -0.08333333333333334, + 0.13333333333333333 + ] + }, + "original/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.5, + "best_win_rate": 0.45, + "difference": 0.049999999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.1, + 0.2 + ] + }, + "recharged/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6666666666666666, + "best_win_rate": 0.6916666666666667, + "difference": -0.025000000000000005, + "paired_seed_bootstrap_95_interval": [ + -0.15, + 0.1 + ] + }, + "recharged/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6208333333333333, + "best_win_rate": 0.6416666666666667, + "difference": -0.020833333333333336, + "paired_seed_bootstrap_95_interval": [ + -0.1375, + 0.09166666666666666 + ] + } + }, + "economic/4p": { + "overall": { + "games_per_arm": 640, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6171875, + "best_win_rate": 0.5765625, + "difference": 0.040625, + "paired_seed_bootstrap_95_interval": [ + -0.00625, + 0.0875 + ] + }, + "original/open": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.54375, + "best_win_rate": 0.575, + "difference": -0.03125, + "paired_seed_bootstrap_95_interval": [ + -0.125, + 0.06875 + ] + }, + "original/sealed": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.509375, + "best_win_rate": 0.4125, + "difference": 0.096875, + "paired_seed_bootstrap_95_interval": [ + 0.0125, + 0.18125 + ] + }, + "recharged/open": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.721875, + "best_win_rate": 0.66875, + "difference": 0.053125, + "paired_seed_bootstrap_95_interval": [ + -0.040625, + 0.146875 + ] + }, + "recharged/sealed": { + "games_per_arm": 160, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.69375, + "best_win_rate": 0.65, + "difference": 0.04375, + "paired_seed_bootstrap_95_interval": [ + -0.043906249999999855, + 0.13125 + ] + } + }, + "economic/5p": { + "overall": { + "games_per_arm": 800, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.749375, + "best_win_rate": 0.791875, + "difference": -0.0425, + "paired_seed_bootstrap_95_interval": [ + -0.08249999999999999, + -0.0018749999999999975 + ] + }, + "original/open": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6775, + "best_win_rate": 0.72, + "difference": -0.042499999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.1375, + 0.052500000000000005 + ] + }, + "original/sealed": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.7, + "best_win_rate": 0.7525, + "difference": -0.052500000000000005, + "paired_seed_bootstrap_95_interval": [ + -0.1375, + 0.032499999999999994 + ] + }, + "recharged/open": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.825, + "best_win_rate": 0.86, + "difference": -0.03500000000000001, + "paired_seed_bootstrap_95_interval": [ + -0.09500000000000001, + 0.029999999999999992 + ] + }, + "recharged/sealed": { + "games_per_arm": 200, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.795, + "best_win_rate": 0.835, + "difference": -0.04, + "paired_seed_bootstrap_95_interval": [ + -0.11500000000000002, + 0.03500000000000001 + ] + } + }, + "economic/6p": { + "overall": { + "games_per_arm": 960, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.7015625, + "best_win_rate": 0.7458333333333333, + "difference": -0.04427083333333333, + "paired_seed_bootstrap_95_interval": [ + -0.08020833333333333, + -0.006770833333333332 + ] + }, + "original/open": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6666666666666666, + "best_win_rate": 0.7645833333333333, + "difference": -0.09791666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.17916666666666664, + -0.016666666666666663 + ] + }, + "original/sealed": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.6458333333333334, + "best_win_rate": 0.75, + "difference": -0.10416666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.1875, + -0.020833333333333336 + ] + }, + "recharged/open": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.7854166666666667, + "best_win_rate": 0.7645833333333333, + "difference": 0.020833333333333336, + "paired_seed_bootstrap_95_interval": [ + -0.049999999999999996, + 0.09166666666666666 + ] + }, + "recharged/sealed": { + "games_per_arm": 240, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.7083333333333334, + "best_win_rate": 0.7041666666666667, + "difference": 0.0041666666666666675, + "paired_seed_bootstrap_95_interval": [ + -0.05416666666666666, + 0.0625 + ] + } + }, + "a260/3p": { + "overall": { + "games_per_arm": 480, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.36041666666666666, + "best_win_rate": 0.3958333333333333, + "difference": -0.035416666666666666, + "paired_seed_bootstrap_95_interval": [ + -0.09791666666666665, + 0.027083333333333338 + ] + }, + "original/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.35, + "best_win_rate": 0.375, + "difference": -0.024999999999999994, + "paired_seed_bootstrap_95_interval": [ + -0.1583333333333333, + 0.10833333333333335 + ] + }, + "original/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.30833333333333335, + "best_win_rate": 0.35833333333333334, + "difference": -0.04999999999999999, + "paired_seed_bootstrap_95_interval": [ + -0.175, + 0.075 + ] + }, + "recharged/open": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.44166666666666665, + "best_win_rate": 0.49166666666666664, + "difference": -0.049999999999999996, + "paired_seed_bootstrap_95_interval": [ + -0.16666666666666666, + 0.058333333333333334 + ] + }, + "recharged/sealed": { + "games_per_arm": 120, + "independent_deals": 40, + "periodic_anchor_win_rate": 0.3416666666666667, + "best_win_rate": 0.35833333333333334, + "difference": -0.01666666666666667, + "paired_seed_bootstrap_95_interval": [ + -0.125, + 0.09166666666666666 + ] + } + } + } } }, "update9_interpretation": { @@ -28279,7 +28642,36 @@ "limitations": "Single training seed; update9 is secondary; marginal exploratory confidence intervals are not simultaneous guarantees. Final reserved seeds untouched." }, "training_status": "COMPLETED", - "completion_note": "Both matched arms completed 20 updates and4800 games each, balanced2\u20136players, with zero actual/search truncations and strict2553fixture parity. Primary update19 paired screens launched; qualification remains unproven." + "completion_note": "Both matched arms completed 20 updates and4800 games each, balanced2\u20136players, with zero actual/search truncations and strict2553fixture parity. Primary update19 paired screens launched; qualification remains unproven.", + "qualification_eligible": false, + "update19_interpretation": { + "games": 7360, + "actual_game_truncations": 0, + "search_truncations": 0, + "strict_export_parity": "Both arms passed all2553 fixtures.", + "decision": "Neither arm qualifies. Periodic retention has no robust overall advantage at the primary endpoint; do not extrapolate the update9 secondary signal or extend unchanged training.", + "periodic_minus_best_supported_differences": { + "economic5p": { + "difference": -0.0425, + "paired_seed_bootstrap_95_interval": [ + -0.0825, + -0.001875 + ] + }, + "economic6p": { + "difference": -0.04427083333333333, + "paired_seed_bootstrap_95_interval": [ + -0.08020833333333333, + -0.006770833333333332 + ] + } + }, + "other_overall_arm_comparisons": "Economic2p/3p/4p and A2603p intervals include zero.", + "versus_starting_policy": "Periodic has a marginal supported2p improvement; best has a supported6p improvement. Neither improves A260 with a confidence interval excluding zero.", + "qualification_failures": "Both miss economic2p66.25% and A2603p40% floors.", + "limitations": "Single training seed, reused development seeds, marginal exploratory intervals. Final reserved seeds untouched.", + "next_action": "Audit stronger policy-guided search/teacher targets and remaining sealed/low-count weaknesses before selecting a new training recipe. Do not launch final qualification." + } }, "multiplayer_geoleague_update69_screening": { "candidate_revision": "69a52c109a03d4ad3a490587a2094cc7e1f430c0", @@ -31327,45 +31719,608 @@ "run": "league-admission-best-u19-economic-2p", "players": 2, "opponent": "economic", - "job_id": "6abe1ac1404719ba376170f2" + "job_id": "6abe1ac1404719ba376170f2", + "observed_stage": "COMPLETED" }, { "run": "league-admission-best-u19-economic-3p", "players": 3, "opponent": "economic", - "job_id": "6abe1ac2fbc85ba682360a65" + "job_id": "6abe1ac2fbc85ba682360a65", + "observed_stage": "COMPLETED" }, { "run": "league-admission-best-u19-economic-4p", "players": 4, "opponent": "economic", - "job_id": "6abe1ac2404719ba376170f7" + "job_id": "6abe1ac2404719ba376170f7", + "observed_stage": "COMPLETED" }, { "run": "league-admission-best-u19-economic-5p", "players": 5, "opponent": "economic", - "job_id": "6abe1ac3404719ba376170f9" + "job_id": "6abe1ac3404719ba376170f9", + "observed_stage": "COMPLETED" }, { "run": "league-admission-best-u19-economic-6p", "players": 6, "opponent": "economic", - "job_id": "6abe1ac4404719ba376170fb" + "job_id": "6abe1ac4404719ba376170fb", + "observed_stage": "COMPLETED" }, { "run": "league-admission-best-u19-a260-3p", "players": 3, "opponent": "a260", - "job_id": "6abe1ac4404719ba376170fd" + "job_id": "6abe1ac4404719ba376170fd", + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Scheduled paired development screen; not final qualification", "protocol": "ai/strong/league-admission-protocol-v1.json", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Await all six screens and matched opposite arm; do not infer admission benefit from this arm alone." + "decision": "Reject for qualification: economic2p below66.25% and A2603p below40%. Strict parity passes and all3680 evaluation games complete; neither opponent-admission arm establishes universal strength.", + "reports": { + "league-admission-best-u19-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.528125, + "truncated": 0, + "seconds": 23.320432219001304, + "inference_p95_ms": 0.351196450355928, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.625 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.475 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5375, + 0.7875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.5625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.6625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.478125, + 0.578125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "d503005c7a297e6eb8f342040bfb8d3c4bc8772f" + }, + "league-admission-best-u19-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5666666666666667, + "truncated": 0, + "seconds": 29.220613294281065, + "inference_p95_ms": 0.3797638695687054, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.48333333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.38333333333333336, + 0.5833333333333334 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.45, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.55 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6916666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6, + 0.775 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.55, + 0.7333333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.51875, + 0.61875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "d503005c7a297e6eb8f342040bfb8d3c4bc8772f" + }, + "league-admission-best-u19-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.5765625, + "truncated": 0, + "seconds": 39.60646936199919, + "inference_p95_ms": 0.4081129991391207, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.575, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.50625, + 0.64375 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.4125, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.3375, + 0.48125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.66875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.59375, + 0.75 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.65, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.56875, + 0.73125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5421875, + 0.6109375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "d503005c7a297e6eb8f342040bfb8d3c4bc8772f" + }, + "league-admission-best-u19-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.791875, + "truncated": 0, + "seconds": 45.741639111, + "inference_p95_ms": 0.4217234000066128, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.72, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6598750000000001, + 0.78 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.7525, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.685, + 0.82 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.86, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.815, + 0.9 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.835, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.775, + 0.89 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.755, + 0.82625 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "f12e084c8103b505ea44ffa689995cd6daf8de9a" + }, + "league-admission-best-u19-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.7458333333333333, + "truncated": 0, + "seconds": 51.660910626, + "inference_p95_ms": 0.4168021000083399, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.7645833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7041666666666667, + 0.8208333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.75, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7, + 0.8 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.7645833333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.70625, + 0.8208333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.7041666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6458333333333334, + 0.7625 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.7140625, + 0.7760416666666666 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "f12e084c8103b505ea44ffa689995cd6daf8de9a" + }, + "league-admission-best-u19-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-best/latest.onnx", + "model_sha256": "691a91ae58d5946a396fe595ffba2f866b5bfba6533ec504da9e6a134c07750e", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.3958333333333333, + "truncated": 0, + "seconds": 68.972651707, + "inference_p95_ms": 0.38849065001045346, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.2916666666666667, + 0.4583333333333333 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.35833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.44166666666666665 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.49166666666666664, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4, + 0.5916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.35833333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.275, + 0.45 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.34791666666666665, + 0.44375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "f12e084c8103b505ea44ffa689995cd6daf8de9a" + } + }, + "paired_against_starting_h200_u29": { + "league-admission-best-u19-economic-2p": { + "independent_deals": 40, + "difference": -0.00625, + "paired_seed_bootstrap_95_interval": [ + -0.075, + 0.0625 + ] + }, + "league-admission-best-u19-economic-3p": { + "independent_deals": 40, + "difference": -0.03645833333333333, + "paired_seed_bootstrap_95_interval": [ + -0.0875, + 0.016666666666666666 + ] + }, + "league-admission-best-u19-economic-4p": { + "independent_deals": 40, + "difference": 0.0125, + "paired_seed_bootstrap_95_interval": [ + -0.04140625, + 0.0640625 + ] + }, + "league-admission-best-u19-economic-5p": { + "independent_deals": 40, + "difference": 0.028749999999999998, + "paired_seed_bootstrap_95_interval": [ + -0.006874999999999997, + 0.06375 + ] + }, + "league-admission-best-u19-economic-6p": { + "independent_deals": 40, + "difference": 0.06354166666666668, + "paired_seed_bootstrap_95_interval": [ + 0.024479166666666666, + 0.10260416666666665 + ] + }, + "league-admission-best-u19-a260-3p": { + "independent_deals": 40, + "difference": 0.040624999999999994, + "paired_seed_bootstrap_95_interval": [ + -0.006250000000000003, + 0.0875 + ] + } + }, + "qualification_eligible": false }, "multiplayer_league_admission_periodic_anchor_update19_screening": { "candidate_revision": "efdb82f2712b8c6648100d7ad99b6941102f7001", @@ -31403,44 +32358,607 @@ "run": "league-admission-periodic-anchor-u19-economic-2p", "players": 2, "opponent": "economic", - "job_id": "6abe1acffbc85ba682360a6c" + "job_id": "6abe1acffbc85ba682360a6c", + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u19-economic-3p", "players": 3, "opponent": "economic", - "job_id": "6abe1ad0fbc85ba682360a6e" + "job_id": "6abe1ad0fbc85ba682360a6e", + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u19-economic-4p", "players": 4, "opponent": "economic", - "job_id": "6abe1ad0404719ba37617101" + "job_id": "6abe1ad0404719ba37617101", + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u19-economic-5p", "players": 5, "opponent": "economic", - "job_id": "6abe1ad1404719ba37617103" + "job_id": "6abe1ad1404719ba37617103", + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u19-economic-6p", "players": 6, "opponent": "economic", - "job_id": "6abe1ad2fbc85ba682360a72" + "job_id": "6abe1ad2fbc85ba682360a72", + "observed_stage": "COMPLETED" }, { "run": "league-admission-periodic-anchor-u19-a260-3p", "players": 3, "opponent": "a260", - "job_id": "6abe1ad2404719ba37617105" + "job_id": "6abe1ad2404719ba37617105", + "observed_stage": "COMPLETED" } ], - "status": "RUNNING", + "status": "COMPLETED", "scope": "Scheduled paired development screen; not final qualification", "protocol": "ai/strong/league-admission-protocol-v1.json", "arena_source": "37465b08df007221665d796448aea57e6828257e", "search_samples": 0, - "decision": "Await all six screens and matched opposite arm; do not infer admission benefit from this arm alone." + "decision": "Reject for qualification: economic2p below66.25% and A2603p below40%. Strict parity passes and all3680 evaluation games complete; neither opponent-admission arm establishes universal strength.", + "reports": { + "league-admission-periodic-anchor-u19-economic-6p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 6, + "chance_win_rate": 0.16666666666666666, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-6p", + "games": 960, + "win_rate": 0.7015625, + "truncated": 0, + "seconds": 50.88001339599941, + "inference_p95_ms": 0.42513900052654197, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 240, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6125, + 0.7166666666666667 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 240, + "win_rate": 0.6458333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5791666666666667, + 0.7125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 240, + "win_rate": 0.7854166666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.7291666666666666, + 0.8416666666666667 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 240, + "win_rate": 0.7083333333333334, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.6583333333333333, + 0.7583333333333333 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.6739583333333333, + 0.728125 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "37bf64d5e653e33ecb4df86706fc3c5f77fb4cea" + }, + "league-admission-periodic-anchor-u19-a260-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/b38515c29e57826de05b55b645c29591e4a886bf/runs/strong-league-v2-a/best.onnx", + "opponent_sha256": "9b46db558669a0c3085412fe2544359eda55ed9f092dffb67bead6af3c409ecd", + "opponent_feature_revision": "3.0", + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.36041666666666666, + "truncated": 0, + "seconds": 70.0081376126036, + "inference_p95_ms": 0.4062972962856293, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.35, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25833333333333336, + 0.44166666666666665 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.30833333333333335, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.225, + 0.4 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.44166666666666665, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.35, + 0.5333333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.3416666666666667, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.25, + 0.43333333333333335 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.3125, + 0.41041666666666665 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "37bf64d5e653e33ecb4df86706fc3c5f77fb4cea" + }, + "league-admission-periodic-anchor-u19-economic-2p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 2, + "chance_win_rate": 0.5, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-2p", + "games": 320, + "win_rate": 0.603125, + "truncated": 0, + "seconds": 23.834393973999994, + "inference_p95_ms": 0.3741368499959208, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 80, + "win_rate": 0.5375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.425, + 0.65 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 80, + "win_rate": 0.5625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4625, + 0.675 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 80, + "win_rate": 0.6875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5875, + 0.7875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 80, + "win_rate": 0.625, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.51875, + 0.73125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.546875, + 0.6609375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "f12e084c8103b505ea44ffa689995cd6daf8de9a" + }, + "league-admission-periodic-anchor-u19-economic-3p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 3, + "chance_win_rate": 0.3333333333333333, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-3p", + "games": 480, + "win_rate": 0.5739583333333333, + "truncated": 0, + "seconds": 29.765950736999997, + "inference_p95_ms": 0.4008079999962888, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 120, + "win_rate": 0.5083333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4166666666666667, + 0.6 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 120, + "win_rate": 0.5, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.4083333333333333, + 0.5916666666666667 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 120, + "win_rate": 0.6666666666666666, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5666666666666667, + 0.7583333333333333 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 120, + "win_rate": 0.6208333333333333, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.525, + 0.7125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.5302083333333333, + 0.6177083333333333 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "f12e084c8103b505ea44ffa689995cd6daf8de9a" + }, + "league-admission-periodic-anchor-u19-economic-4p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 4, + "chance_win_rate": 0.25, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-4p", + "games": 640, + "win_rate": 0.6171875, + "truncated": 0, + "seconds": 38.896012008, + "inference_p95_ms": 0.41654000000335145, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 160, + "win_rate": 0.54375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.46875, + 0.61875 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 160, + "win_rate": 0.509375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.440625, + 0.58125 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 160, + "win_rate": 0.721875, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.65625, + 0.784375 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 160, + "win_rate": 0.69375, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.60625, + 0.78125 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.578125, + 0.65546875 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "f12e084c8103b505ea44ffa689995cd6daf8de9a" + }, + "league-admission-periodic-anchor-u19-economic-5p": { + "async_rollout": false, + "engine_workers": 24, + "player_count": 5, + "chance_win_rate": 0.2, + "deal_offset": 0, + "model": "/root/.cache/huggingface/hub/models--coyotte508--powergrid-ai-germany-v1/snapshots/efdb82f2712b8c6648100d7ad99b6941102f7001/runs/multiplayer-league-admission-v1-periodic-anchor/latest.onnx", + "model_sha256": "08ad0042e548e9b871e9f4178626d405637fb55f3f42b0d580b2bd6979ac7f67", + "model_feature_revision": "4.0-multiplayer", + "encoder_feature_revision": "4.0-multiplayer", + "opponent": "economic", + "opponent_sha256": null, + "opponent_feature_revision": null, + "paired_seats": true, + "candidate_search_samples": 0, + "search_max_steps": 2400, + "candidate_search_scope": "all", + "candidate_geographic_search": false, + "candidate_search_model_proposal": true, + "seed": "multiplayer-screening-paired-v1-5p", + "games": 800, + "win_rate": 0.749375, + "truncated": 0, + "seconds": 44.28743813800001, + "inference_p95_ms": 0.4168877000012118, + "by_rules": [ + { + "variant": "original", + "sealed": false, + "games": 200, + "win_rate": 0.6775, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.5975, + 0.755 + ] + }, + { + "variant": "original", + "sealed": true, + "games": 200, + "win_rate": 0.7, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.63, + 0.77 + ] + }, + { + "variant": "recharged", + "sealed": false, + "games": 200, + "win_rate": 0.825, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.775, + 0.875 + ] + }, + { + "variant": "recharged", + "sealed": true, + "games": 200, + "win_rate": 0.795, + "independent_seeds": 40, + "truncated": 0, + "seed_bootstrap_95_interval": [ + 0.74, + 0.85 + ] + } + ], + "independent_seeds": 40, + "seed_bootstrap_95_interval": [ + 0.719375, + 0.779375 + ], + "search_rollouts_reported": true, + "search_stats": {}, + "artifact_revision": "f12e084c8103b505ea44ffa689995cd6daf8de9a" + } + }, + "paired_against_starting_h200_u29": { + "league-admission-periodic-anchor-u19-economic-6p": { + "independent_deals": 40, + "difference": 0.019270833333333338, + "paired_seed_bootstrap_95_interval": [ + -0.019270833333333334, + 0.06041666666666666 + ] + }, + "league-admission-periodic-anchor-u19-a260-3p": { + "independent_deals": 40, + "difference": 0.005208333333333337, + "paired_seed_bootstrap_95_interval": [ + -0.05208333333333333, + 0.06145833333333332 + ] + }, + "league-admission-periodic-anchor-u19-economic-2p": { + "independent_deals": 40, + "difference": 0.06875, + "paired_seed_bootstrap_95_interval": [ + 0.0015625, + 0.1359375 + ] + }, + "league-admission-periodic-anchor-u19-economic-3p": { + "independent_deals": 40, + "difference": -0.029166666666666674, + "paired_seed_bootstrap_95_interval": [ + -0.08333333333333334, + 0.023958333333333328 + ] + }, + "league-admission-periodic-anchor-u19-economic-4p": { + "independent_deals": 40, + "difference": 0.053125, + "paired_seed_bootstrap_95_interval": [ + -0.0125, + 0.1171875 + ] + }, + "league-admission-periodic-anchor-u19-economic-5p": { + "independent_deals": 40, + "difference": -0.013750000000000002, + "paired_seed_bootstrap_95_interval": [ + -0.04812500000000001, + 0.021875 + ] + } + }, + "qualification_eligible": false } } From 0809d7022f14de5895d38c1efabd6acbd73207f6 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:41:45 +0200 Subject: [PATCH 182/184] Capture paired search outcomes and launch teacher reliability audit --- ai/strong/audit-search-target.cjs | 26 +++++++++++++ ai/strong/audit-search-targets.py | 49 +++++++++++++++++++++++++ ai/strong/experiments.json | 27 +++++++++++++- ai/strong/launch-teacher-reliability.sh | 16 ++++++++ ai/strong/search.cjs | 13 ++++++- ai/strong/test-search-samples.cjs | 26 +++++++++++++ 6 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 ai/strong/audit-search-target.cjs create mode 100644 ai/strong/audit-search-targets.py create mode 100644 ai/strong/launch-teacher-reliability.sh create mode 100644 ai/strong/test-search-samples.cjs diff --git a/ai/strong/audit-search-target.cjs b/ai/strong/audit-search-target.cjs new file mode 100644 index 0000000..c50ca37 --- /dev/null +++ b/ai/strong/audit-search-target.cjs @@ -0,0 +1,26 @@ +// Independent search batches on fixed development positions; no learning. +const fs = require('node:fs'); +const search = require('./search.cjs'); +const c = require('../core.cjs'); +const rows = fs.readFileSync(process.argv[2], 'utf8').trim().split('\n'); +const row = JSON.parse(rows[Number(process.argv[3])]); +const { state, player } = row.request; +const batches = ['a', 'b'].map((batch) => { + const result = search.choose(state, player, { + samples: 48, + candidates: 6, + geography: true, + maxSteps: 2400, + seed: `teacher-reliability-v1-${row.fixtureIndex}-${batch}`, + includeSamples: true, + }); + return { batch, ...result }; +}); +console.log(JSON.stringify({ + fixtureIndex: row.fixtureIndex, + cell: row.cell, + round: state.round, + actions: c.candidates(state, player), + samplePolicies: Array.from({ length: 48 }, (_, i) => i % 2 ? 'heuristic' : 'economic'), + batches, +})); diff --git a/ai/strong/audit-search-targets.py b/ai/strong/audit-search-targets.py new file mode 100644 index 0000000..c23debe --- /dev/null +++ b/ai/strong/audit-search-targets.py @@ -0,0 +1,49 @@ +"""HF-only diagnostic collection of independent teacher-search repetitions.""" +import concurrent.futures +import hashlib +import json +import os +from pathlib import Path +import subprocess +from huggingface_hub import HfApi + +fixtures = Path('ai/strong/fixtures/teacher-reliability-v1.jsonl') +rows = fixtures.read_text().splitlines() +assert len(rows) == 60 + + +def audit(index): + result = subprocess.run(['node', 'ai/strong/audit-search-target.cjs', str(fixtures), str(index)], + text=True, capture_output=True, check=True) + row = json.loads(result.stdout) + for batch in row['batches']: + samples = batch['sampleOutcomes'] + assert all(len(v) == 48 for v in samples.values()) + assert sum(len(v) for v in samples.values()) == batch['evaluations'] + assert sum(v.count(None) for v in samples.values()) == batch['truncated'] + assert all(sum(x for x in v if x is not None) == batch['values'][k] + for k, v in samples.items()) + return row + + +output = Path('teacher-reliability-v1.jsonl') +completed = [] +with concurrent.futures.ThreadPoolExecutor(max_workers=24) as pool: + futures = [pool.submit(audit, i) for i in range(len(rows))] + for f in concurrent.futures.as_completed(futures): + completed.append(f.result()) + print(json.dumps({'completed_positions': len(completed), 'requested_positions': len(rows)}), flush=True) +completed.sort(key=lambda r: r['fixtureIndex']) +output.write_text(''.join(json.dumps(r) + '\n' for r in completed)) +manifest = {'positions': len(completed), 'samples_per_batch': 48, 'batches_per_position': 2, + 'search_max_steps': 2400, 'fixture_sha256': hashlib.sha256(fixtures.read_bytes()).hexdigest(), + 'output_sha256': hashlib.sha256(output.read_bytes()).hexdigest(), + 'truncated': sum(b['truncated'] for r in completed for b in r['batches']), + 'evaluations': sum(b['evaluations'] for r in completed for b in r['batches']), + 'scope': 'Reused development fixtures; diagnostic only, no strength or calibration claim.'} +api = HfApi() +api.upload_file(repo_id=os.environ['HF_MODEL_REPO'], path_or_fileobj=output, + path_in_repo='runs/teacher-reliability-v1/results.jsonl') +api.upload_file(repo_id=os.environ['HF_MODEL_REPO'], path_or_fileobj=json.dumps(manifest, indent=2).encode(), + path_in_repo='runs/teacher-reliability-v1/manifest.json') +print(json.dumps(manifest), flush=True) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index e99db19..bf1693d 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -217,7 +217,8 @@ "league-admission-periodic-anchor-u19-economic-4p": "6abe1ad0404719ba37617101", "league-admission-periodic-anchor-u19-economic-5p": "6abe1ad1404719ba37617103", "league-admission-periodic-anchor-u19-economic-6p": "6abe1ad2fbc85ba682360a72", - "league-admission-periodic-anchor-u19-a260-3p": "6abe1ad2404719ba37617105" + "league-admission-periodic-anchor-u19-a260-3p": "6abe1ad2404719ba37617105", + "teacher-reliability-v1": "6abe1cc8404719ba376171b1" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -32960,5 +32961,29 @@ } }, "qualification_eligible": false + }, + "teacher_reliability_v1": { + "job_id": "6abe1cc8404719ba376171b1", + "status": "SCHEDULING", + "source_revision": "aee5febe0ea0c60988f76a937521e87956544526", + "source_archive": "strong-source-v35.tgz", + "source_sha256": "0174bfd5f2b5773eba1c260eadb99fd441d274800b7a2ff23af10b8c402168d5", + "base_revision": "2c273f96562d0cc2f8c05a2735d8c0492ab77fd8", + "changed_files": [ + "ai/strong/search.cjs", + "ai/strong/test-search-samples.cjs", + "ai/strong/audit-search-target.cjs", + "ai/strong/audit-search-targets.py", + "ai/strong/fixtures/teacher-reliability-v1.jsonl" + ], + "fixture_sha256": "855b34ad7f07665dfcb012a673147f0780820a9e7560fda268a9a39478c60ff4", + "selection": "Median fixture index within each of60 count/rules/action cells; reused development fixtures, not final-test seeds.", + "positions": 60, + "samples_per_batch": 48, + "batches_per_position": 2, + "search_max_steps": 2400, + "workers": 24, + "purpose": "Measure independent-batch ranking stability, tied outcomes, and continuation-policy sensitivity before another distillation run. No gradients, no qualification claim.", + "tests": "Search horizon regression and detailed-sample equivalence pass; truncations retained as null outcomes." } } diff --git a/ai/strong/launch-teacher-reliability.sh b/ai/strong/launch-teacher-reliability.sh new file mode 100644 index 0000000..de51807 --- /dev/null +++ b/ai/strong/launch-teacher-reliability.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail +hf jobs run --detach --flavor cpu-performance --timeout 3h \ + --secrets HF_TOKEN --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --label project=powergrid-ai --label stage=teacher-reliability-v1 \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v35.tgz\",repo_type=\"dataset\",revision=\"aee5febe0ea0c60988f76a937521e87956544526\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/strong/test-search-samples.cjs ai/strong/test-search-horizon.cjs +python -u ai/strong/audit-search-targets.py +' diff --git a/ai/strong/search.cjs b/ai/strong/search.cjs index 44c8fcc..692896e 100644 --- a/ai/strong/search.cjs +++ b/ai/strong/search.cjs @@ -47,6 +47,7 @@ function choose( maxSteps = DEFAULT_MAX_STEPS, extraCandidates = [], geography = false, + includeSamples = false, } = {} ) { const actions = c.candidates(g, seat), @@ -55,6 +56,7 @@ function choose( throw Error('Invalid search proposal'); if (options.length === 1) return { index: options[0], action: actions[options[0]], evaluations: 0 }; const totals = Object.fromEntries(options.map((i) => [i, 0])); + const sampleOutcomes = includeSamples ? Object.fromEntries(options.map((i) => [i, []])) : null; let evaluations = 0, truncated = 0; for (let sample = 0; sample < samples; sample++) { @@ -69,8 +71,14 @@ function choose( const move = sample % 2 ? c.heuristic(sim, p, rng).action : eco.choose(sim, p, rng).action; c.E.move(sim, move, p); } - if (c.E.ended(sim)) totals[index] += c.outcome(sim)[seat]; - else truncated++; + if (c.E.ended(sim)) { + const value = c.outcome(sim)[seat]; + totals[index] += value; + if (sampleOutcomes) sampleOutcomes[index].push(value); + } else { + truncated++; + if (sampleOutcomes) sampleOutcomes[index].push(null); + } evaluations++; } } @@ -83,6 +91,7 @@ function choose( truncated, winEstimate: totals[index] / samples, values: totals, + ...(sampleOutcomes ? { sampleOutcomes } : {}), }; } module.exports = { choose, shortlist, DEFAULT_MAX_STEPS }; diff --git a/ai/strong/test-search-samples.cjs b/ai/strong/test-search-samples.cjs new file mode 100644 index 0000000..b8120ed --- /dev/null +++ b/ai/strong/test-search-samples.cjs @@ -0,0 +1,26 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); +const search = require('./search.cjs'); +const fixture = require('./fixtures/search-horizon-six-player.json'); + +test('optional paired outcomes preserve decisions and distinguish capped continuations', () => { + for (const maxSteps of [1200, 2400]) { + const options = { ...fixture.options, maxSteps }; + const before = JSON.stringify(fixture.state); + const plain = search.choose(fixture.state, fixture.seat, options); + const detailed = search.choose(fixture.state, fixture.seat, { ...options, includeSamples: true }); + const { sampleOutcomes, ...rest } = detailed; + assert.deepEqual(rest, plain); + assert.equal(JSON.stringify(fixture.state), before); + let capped = 0, count = 0; + for (const [index, values] of Object.entries(sampleOutcomes)) { + assert.equal(values.length, options.samples); + assert.equal(values.filter((v) => v !== null).reduce((a, b) => a + b, 0), plain.values[index]); + capped += values.filter((v) => v === null).length; + count += values.length; + } + assert.equal(capped, plain.truncated); + assert.equal(count, plain.evaluations); + assert.equal(capped, maxSteps === 1200 ? 1 : 0); + } +}); From 1835c4ccd30dbfd4250588e012ed692f485831c7 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:44:05 +0200 Subject: [PATCH 183/184] Measure teacher target instability across independent search batches --- ai/strong/experiments.json | 1382 ++++++++++++++++++++- ai/strong/summarize-search-reliability.py | 83 ++ 2 files changed, 1463 insertions(+), 2 deletions(-) create mode 100644 ai/strong/summarize-search-reliability.py diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index bf1693d..437d680 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -32964,7 +32964,7 @@ }, "teacher_reliability_v1": { "job_id": "6abe1cc8404719ba376171b1", - "status": "SCHEDULING", + "status": "COMPLETED", "source_revision": "aee5febe0ea0c60988f76a937521e87956544526", "source_archive": "strong-source-v35.tgz", "source_sha256": "0174bfd5f2b5773eba1c260eadb99fd441d274800b7a2ff23af10b8c402168d5", @@ -32984,6 +32984,1384 @@ "search_max_steps": 2400, "workers": 24, "purpose": "Measure independent-batch ranking stability, tied outcomes, and continuation-policy sensitivity before another distillation run. No gradients, no qualification claim.", - "tests": "Search horizon regression and detailed-sample equivalence pass; truncations retained as null outcomes." + "tests": "Search horizon regression and detailed-sample equivalence pass; truncations retained as null outcomes.", + "artifact_revision": "b9fa9a33a8315442793256a0d343511d8c631016", + "manifest": { + "positions": 60, + "samples_per_batch": 48, + "batches_per_position": 2, + "search_max_steps": 2400, + "fixture_sha256": "855b34ad7f07665dfcb012a673147f0780820a9e7560fda268a9a39478c60ff4", + "output_sha256": "412e54fdf2de6f269a487c6bffa68373133356c3c6c9d0df84af41f8626d5db9", + "truncated": 0, + "evaluations": 30048, + "scope": "Reused development fixtures; diagnostic only, no strength or calibration claim." + }, + "summary": { + "input_sha256": "412e54fdf2de6f269a487c6bffa68373133356c3c6c9d0df84af41f8626d5db9", + "groups": { + "overall": { + "positions": 60, + "same_selected_action": 39, + "a_winner_is_b_co_winner": 40, + "a_all_actions_tied": 16, + "b_all_actions_tied": 16, + "disjoint_continuation_policy_winner_sets": 25, + "positive_discovery_gap": 30, + "positive_confirmation_gap": 27, + "negative_confirmation_gap": 10, + "positive_confirmation_hoeffding_lower": 0 + }, + "players/2": { + "positions": 12, + "same_selected_action": 8, + "a_winner_is_b_co_winner": 8, + "a_all_actions_tied": 0, + "b_all_actions_tied": 0, + "disjoint_continuation_policy_winner_sets": 8, + "positive_discovery_gap": 9, + "positive_confirmation_gap": 9, + "negative_confirmation_gap": 2, + "positive_confirmation_hoeffding_lower": 0 + }, + "rules/original/sealed": { + "positions": 15, + "same_selected_action": 7, + "a_winner_is_b_co_winner": 8, + "a_all_actions_tied": 2, + "b_all_actions_tied": 2, + "disjoint_continuation_policy_winner_sets": 5, + "positive_discovery_gap": 9, + "positive_confirmation_gap": 8, + "negative_confirmation_gap": 4, + "positive_confirmation_hoeffding_lower": 0 + }, + "action/ChoosePowerPlant": { + "positions": 20, + "same_selected_action": 16, + "a_winner_is_b_co_winner": 16, + "a_all_actions_tied": 4, + "b_all_actions_tied": 4, + "disjoint_continuation_policy_winner_sets": 5, + "positive_discovery_gap": 14, + "positive_confirmation_gap": 12, + "negative_confirmation_gap": 4, + "positive_confirmation_hoeffding_lower": 0 + }, + "action/Build": { + "positions": 20, + "same_selected_action": 15, + "a_winner_is_b_co_winner": 15, + "a_all_actions_tied": 8, + "b_all_actions_tied": 8, + "disjoint_continuation_policy_winner_sets": 8, + "positive_discovery_gap": 7, + "positive_confirmation_gap": 4, + "negative_confirmation_gap": 3, + "positive_confirmation_hoeffding_lower": 0 + }, + "action/Bid": { + "positions": 20, + "same_selected_action": 8, + "a_winner_is_b_co_winner": 9, + "a_all_actions_tied": 4, + "b_all_actions_tied": 4, + "disjoint_continuation_policy_winner_sets": 12, + "positive_discovery_gap": 9, + "positive_confirmation_gap": 11, + "negative_confirmation_gap": 3, + "positive_confirmation_hoeffding_lower": 0 + }, + "rules/recharged/sealed": { + "positions": 15, + "same_selected_action": 11, + "a_winner_is_b_co_winner": 11, + "a_all_actions_tied": 3, + "b_all_actions_tied": 4, + "disjoint_continuation_policy_winner_sets": 4, + "positive_discovery_gap": 4, + "positive_confirmation_gap": 5, + "negative_confirmation_gap": 3, + "positive_confirmation_hoeffding_lower": 0 + }, + "rules/original/open": { + "positions": 15, + "same_selected_action": 9, + "a_winner_is_b_co_winner": 9, + "a_all_actions_tied": 7, + "b_all_actions_tied": 6, + "disjoint_continuation_policy_winner_sets": 9, + "positive_discovery_gap": 7, + "positive_confirmation_gap": 6, + "negative_confirmation_gap": 1, + "positive_confirmation_hoeffding_lower": 0 + }, + "rules/recharged/open": { + "positions": 15, + "same_selected_action": 12, + "a_winner_is_b_co_winner": 12, + "a_all_actions_tied": 4, + "b_all_actions_tied": 4, + "disjoint_continuation_policy_winner_sets": 7, + "positive_discovery_gap": 10, + "positive_confirmation_gap": 8, + "negative_confirmation_gap": 2, + "positive_confirmation_hoeffding_lower": 0 + }, + "players/3": { + "positions": 12, + "same_selected_action": 8, + "a_winner_is_b_co_winner": 8, + "a_all_actions_tied": 3, + "b_all_actions_tied": 3, + "disjoint_continuation_policy_winner_sets": 8, + "positive_discovery_gap": 5, + "positive_confirmation_gap": 7, + "negative_confirmation_gap": 2, + "positive_confirmation_hoeffding_lower": 0 + }, + "players/4": { + "positions": 12, + "same_selected_action": 6, + "a_winner_is_b_co_winner": 6, + "a_all_actions_tied": 6, + "b_all_actions_tied": 5, + "disjoint_continuation_policy_winner_sets": 3, + "positive_discovery_gap": 4, + "positive_confirmation_gap": 1, + "negative_confirmation_gap": 4, + "positive_confirmation_hoeffding_lower": 0 + }, + "players/5": { + "positions": 12, + "same_selected_action": 8, + "a_winner_is_b_co_winner": 8, + "a_all_actions_tied": 2, + "b_all_actions_tied": 2, + "disjoint_continuation_policy_winner_sets": 4, + "positive_discovery_gap": 8, + "positive_confirmation_gap": 7, + "negative_confirmation_gap": 1, + "positive_confirmation_hoeffding_lower": 0 + }, + "players/6": { + "positions": 12, + "same_selected_action": 9, + "a_winner_is_b_co_winner": 10, + "a_all_actions_tied": 5, + "b_all_actions_tied": 6, + "disjoint_continuation_policy_winner_sets": 2, + "positive_discovery_gap": 4, + "positive_confirmation_gap": 3, + "negative_confirmation_gap": 1, + "positive_confirmation_hoeffding_lower": 0 + } + }, + "positions": [ + { + "fixtureIndex": 25, + "cell": [ + 2, + "original", + true, + "ChoosePowerPlant" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 3, + "a_runner_up": 1, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": 0.0625, + "confirmation_95_hoeffding_lower": -0.2908018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 39, + "cell": [ + 2, + "original", + true, + "Build" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 2, + "discovery_gap": 0.125, + "confirmation_gap": 0.041666666666666664, + "confirmation_95_hoeffding_lower": -0.311635156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 51, + "cell": [ + 2, + "original", + true, + "Bid" + ], + "round": 9, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 7, + "a_runner_up": 6, + "discovery_gap": 0.0, + "confirmation_gap": -0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.374135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 109, + "cell": [ + 2, + "recharged", + true, + "Bid" + ], + "round": 6, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 6, + "a_runner_up": 4, + "discovery_gap": 0.0, + "confirmation_gap": 0.041666666666666664, + "confirmation_95_hoeffding_lower": -0.311635156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 117, + "cell": [ + 2, + "recharged", + true, + "ChoosePowerPlant" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 0, + "discovery_gap": 0.041666666666666664, + "confirmation_gap": 0.08333333333333333, + "confirmation_95_hoeffding_lower": -0.26996848956707237, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 127, + "cell": [ + 2, + "recharged", + true, + "Build" + ], + "round": 8, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 6, + "a_runner_up": 7, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 181, + "cell": [ + 2, + "original", + false, + "ChoosePowerPlant" + ], + "round": 4, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 2, + "discovery_gap": 0.03125, + "confirmation_gap": -0.125, + "confirmation_95_hoeffding_lower": -0.4783018229004057, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 202, + "cell": [ + 2, + "original", + false, + "Bid" + ], + "round": 7, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 0, + "a_runner_up": 2, + "discovery_gap": 0.03125, + "confirmation_gap": 0.0625, + "confirmation_95_hoeffding_lower": -0.2908018229004057, + "disjoint_continuation_policy_winner_sets": 2 + }, + { + "fixtureIndex": 218, + "cell": [ + 2, + "original", + false, + "Build" + ], + "round": 9, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 10, + "a_runner_up": 1, + "discovery_gap": 0.0625, + "confirmation_gap": 0.19791666666666666, + "confirmation_95_hoeffding_lower": -0.15538515623373902, + "disjoint_continuation_policy_winner_sets": 2 + }, + { + "fixtureIndex": 293, + "cell": [ + 2, + "recharged", + false, + "Bid" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 13, + "a_runner_up": 0, + "discovery_gap": 0.08333333333333333, + "confirmation_gap": 0.2916666666666667, + "confirmation_95_hoeffding_lower": -0.061635156233739, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 319, + "cell": [ + 2, + "recharged", + false, + "Build" + ], + "round": 8, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 2, + "a_runner_up": 0, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": 0.16666666666666666, + "confirmation_95_hoeffding_lower": -0.18663515623373902, + "disjoint_continuation_policy_winner_sets": 2 + }, + { + "fixtureIndex": 333, + "cell": [ + 2, + "recharged", + false, + "ChoosePowerPlant" + ], + "round": 10, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 6, + "a_runner_up": 0, + "discovery_gap": 0.14583333333333334, + "confirmation_gap": 0.10416666666666667, + "confirmation_95_hoeffding_lower": -0.249135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 374, + "cell": [ + 3, + "original", + true, + "ChoosePowerPlant" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 1, + "a_runner_up": 4, + "discovery_gap": 0.08333333333333333, + "confirmation_gap": 0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.33246848956707237, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 410, + "cell": [ + 3, + "original", + true, + "Bid" + ], + "round": 8, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 0, + "a_runner_up": 1, + "discovery_gap": 0.0, + "confirmation_gap": 0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.33246848956707237, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 415, + "cell": [ + 3, + "original", + true, + "Build" + ], + "round": 8, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 1, + "a_runner_up": 5, + "discovery_gap": 0.0, + "confirmation_gap": -0.13541666666666666, + "confirmation_95_hoeffding_lower": -0.4887184895670723, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 480, + "cell": [ + 3, + "recharged", + true, + "ChoosePowerPlant" + ], + "round": 5, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": -0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.374135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 487, + "cell": [ + 3, + "recharged", + true, + "Bid" + ], + "round": 6, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 7, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 508, + "cell": [ + 3, + "recharged", + true, + "Build" + ], + "round": 8, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 0, + "a_runner_up": 2, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 570, + "cell": [ + 3, + "original", + false, + "ChoosePowerPlant" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 3, + "a_runner_up": 0, + "discovery_gap": 0.125, + "confirmation_gap": 0.25, + "confirmation_95_hoeffding_lower": -0.10330182290040568, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 600, + "cell": [ + 3, + "original", + false, + "Bid" + ], + "round": 7, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 2, + "a_runner_up": 3, + "discovery_gap": 0.0, + "confirmation_gap": 0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.33246848956707237, + "disjoint_continuation_policy_winner_sets": 2 + }, + { + "fixtureIndex": 635, + "cell": [ + 3, + "original", + false, + "Build" + ], + "round": 9, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 10, + "a_runner_up": 9, + "discovery_gap": 0.28125, + "confirmation_gap": 0.20833333333333334, + "confirmation_95_hoeffding_lower": -0.14496848956707234, + "disjoint_continuation_policy_winner_sets": 2 + }, + { + "fixtureIndex": 695, + "cell": [ + 3, + "recharged", + false, + "Bid" + ], + "round": 3, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 1, + "a_runner_up": 3, + "discovery_gap": 0.13541666666666666, + "confirmation_gap": 0.2916666666666667, + "confirmation_95_hoeffding_lower": -0.061635156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 710, + "cell": [ + 3, + "recharged", + false, + "ChoosePowerPlant" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 0, + "discovery_gap": 0.25, + "confirmation_gap": 0.25, + "confirmation_95_hoeffding_lower": -0.10330182290040568, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 762, + "cell": [ + 3, + "recharged", + false, + "Build" + ], + "round": 10, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 2, + "a_runner_up": 1, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 810, + "cell": [ + 4, + "original", + true, + "Bid" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 8, + "a_runner_up": 5, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 811, + "cell": [ + 4, + "original", + true, + "ChoosePowerPlant" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 1, + "discovery_gap": 0.25, + "confirmation_gap": 0.20833333333333334, + "confirmation_95_hoeffding_lower": -0.14496848956707234, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 858, + "cell": [ + 4, + "original", + true, + "Build" + ], + "round": 8, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 5, + "a_runner_up": 0, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": -0.10416666666666667, + "confirmation_95_hoeffding_lower": -0.45746848956707237, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 929, + "cell": [ + 4, + "recharged", + true, + "Bid" + ], + "round": 4, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 0, + "a_runner_up": 3, + "discovery_gap": 0.0, + "confirmation_gap": -0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.374135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 948, + "cell": [ + 4, + "recharged", + true, + "ChoosePowerPlant" + ], + "round": 6, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 0, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": -0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.374135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 992, + "cell": [ + 4, + "recharged", + true, + "Build" + ], + "round": 9, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 18, + "a_runner_up": 4, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1066, + "cell": [ + 4, + "original", + false, + "Bid" + ], + "round": 5, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": true, + "b_all_actions_tied": false, + "a_winner": 0, + "a_runner_up": 1, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1101, + "cell": [ + 4, + "original", + false, + "ChoosePowerPlant" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 3, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1106, + "cell": [ + 4, + "original", + false, + "Build" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 1, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1203, + "cell": [ + 4, + "recharged", + false, + "Bid" + ], + "round": 6, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 1, + "a_runner_up": 0, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 1218, + "cell": [ + 4, + "recharged", + false, + "ChoosePowerPlant" + ], + "round": 7, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 3, + "a_runner_up": 2, + "discovery_gap": 0.0, + "confirmation_gap": -0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.374135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1270, + "cell": [ + 4, + "recharged", + false, + "Build" + ], + "round": 9, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 16, + "a_runner_up": 1, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1356, + "cell": [ + 5, + "original", + true, + "Bid" + ], + "round": 5, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 6, + "a_runner_up": 1, + "discovery_gap": 0.041666666666666664, + "confirmation_gap": 0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.33246848956707237, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1382, + "cell": [ + 5, + "original", + true, + "ChoosePowerPlant" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 0, + "discovery_gap": 0.20833333333333334, + "confirmation_gap": 0.16666666666666666, + "confirmation_95_hoeffding_lower": -0.18663515623373902, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1407, + "cell": [ + 5, + "original", + true, + "Build" + ], + "round": 8, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 6, + "a_runner_up": 4, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": -0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.374135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1490, + "cell": [ + 5, + "recharged", + true, + "Bid" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 1, + "a_runner_up": 6, + "discovery_gap": 0.0, + "confirmation_gap": 0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.33246848956707237, + "disjoint_continuation_policy_winner_sets": 2 + }, + { + "fixtureIndex": 1504, + "cell": [ + 5, + "recharged", + true, + "ChoosePowerPlant" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 2, + "discovery_gap": 0.041666666666666664, + "confirmation_gap": 0.09375, + "confirmation_95_hoeffding_lower": -0.2595518229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1551, + "cell": [ + 5, + "recharged", + true, + "Build" + ], + "round": 8, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 13, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1655, + "cell": [ + 5, + "original", + false, + "ChoosePowerPlant" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 3, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1665, + "cell": [ + 5, + "original", + false, + "Bid" + ], + "round": 6, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 1, + "a_runner_up": 3, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": 0.0625, + "confirmation_95_hoeffding_lower": -0.2908018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1714, + "cell": [ + 5, + "original", + false, + "Build" + ], + "round": 8, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 20, + "a_runner_up": 5, + "discovery_gap": 0.041666666666666664, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1805, + "cell": [ + 5, + "recharged", + false, + "Bid" + ], + "round": 3, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 0, + "a_runner_up": 1, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": 0.041666666666666664, + "confirmation_95_hoeffding_lower": -0.311635156233739, + "disjoint_continuation_policy_winner_sets": 2 + }, + { + "fixtureIndex": 1857, + "cell": [ + 5, + "recharged", + false, + "ChoosePowerPlant" + ], + "round": 6, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 0, + "a_runner_up": 3, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": 0.0625, + "confirmation_95_hoeffding_lower": -0.2908018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1877, + "cell": [ + 5, + "recharged", + false, + "Build" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 1, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1951, + "cell": [ + 6, + "original", + true, + "Bid" + ], + "round": 3, + "same_selected_action": false, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 19, + "a_runner_up": 6, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": 0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.33246848956707237, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1966, + "cell": [ + 6, + "original", + true, + "ChoosePowerPlant" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 4, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 1971, + "cell": [ + 6, + "original", + true, + "Build" + ], + "round": 4, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 6, + "a_runner_up": 7, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 2070, + "cell": [ + 6, + "recharged", + true, + "Bid" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": true, + "a_winner": 3, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 2082, + "cell": [ + 6, + "recharged", + true, + "ChoosePowerPlant" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 3, + "discovery_gap": 0.125, + "confirmation_gap": 0.09375, + "confirmation_95_hoeffding_lower": -0.2595518229004057, + "disjoint_continuation_policy_winner_sets": 1 + }, + { + "fixtureIndex": 2126, + "cell": [ + 6, + "recharged", + true, + "Build" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 7, + "a_runner_up": 4, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 2271, + "cell": [ + 6, + "original", + false, + "Bid" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 6, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 2276, + "cell": [ + 6, + "original", + false, + "ChoosePowerPlant" + ], + "round": 5, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 1, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 2334, + "cell": [ + 6, + "original", + false, + "Build" + ], + "round": 7, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 8, + "a_runner_up": 0, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 2410, + "cell": [ + 6, + "recharged", + false, + "Bid" + ], + "round": 3, + "same_selected_action": false, + "a_winner_is_b_co_winner": false, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 2, + "a_runner_up": 0, + "discovery_gap": 0.020833333333333332, + "confirmation_gap": -0.020833333333333332, + "confirmation_95_hoeffding_lower": -0.374135156233739, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 2429, + "cell": [ + 6, + "recharged", + false, + "ChoosePowerPlant" + ], + "round": 4, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": false, + "b_all_actions_tied": false, + "a_winner": 4, + "a_runner_up": 0, + "discovery_gap": 0.125, + "confirmation_gap": 0.08333333333333333, + "confirmation_95_hoeffding_lower": -0.26996848956707237, + "disjoint_continuation_policy_winner_sets": 0 + }, + { + "fixtureIndex": 2513, + "cell": [ + 6, + "recharged", + false, + "Build" + ], + "round": 8, + "same_selected_action": true, + "a_winner_is_b_co_winner": true, + "a_all_actions_tied": true, + "b_all_actions_tied": true, + "a_winner": 15, + "a_runner_up": 2, + "discovery_gap": 0.0, + "confirmation_gap": 0.0, + "confirmation_95_hoeffding_lower": -0.3533018229004057, + "disjoint_continuation_policy_winner_sets": 0 + } + ], + "limitations": "One reused development position per cell; no game-strength inference. Policy-subset comparisons also vary sampled scenarios. Confirmation rival fixed using batch A; bounds marginal, not simultaneous." + }, + "decision": "Target reproducibility is insufficient to assume that more hard-label distillation will improve the model: selected action agrees39/60 overall and8/20 bidding;16/60 discovery positions tie every candidate. This is a small reused-development diagnostic, not a game-strength estimate. Next compare larger sample budgets and fixed continuation policies on identical public scenarios before training more targets.", + "caveat": "No positive distribution-free confirmation lower bound at48 samples does not prove no useful moves; the bound is conservative. Mixed-policy subset disagreement is confounded by distinct scenario samples, so it does not identify a causal policy effect." } } diff --git a/ai/strong/summarize-search-reliability.py b/ai/strong/summarize-search-reliability.py new file mode 100644 index 0000000..ec4ebc6 --- /dev/null +++ b/ai/strong/summarize-search-reliability.py @@ -0,0 +1,83 @@ +"""Describe teacher ranking stability using independent search repetitions.""" +import argparse +from collections import defaultdict +import hashlib +import json +import math +from pathlib import Path + + +def summarize(path): + rows = [json.loads(line) for line in path.read_text().splitlines()] + assert len(rows) == 60 and len({r['fixtureIndex'] for r in rows}) == 60 + expected = {(n, variant, sealed, action) for n in range(2, 7) + for variant in ['original', 'recharged'] for sealed in [False, True] + for action in ['ChoosePowerPlant', 'Bid', 'Build']} + assert {tuple(r['cell']) for r in rows} == expected + details = [] + for row in rows: + a, b = row['batches'] + assert [a['batch'], b['batch']] == ['a', 'b'] + assert set(a['sampleOutcomes']) == set(b['sampleOutcomes']) + for batch in [a, b]: + assert batch['truncated'] == 0, 'Capped search cannot establish target reliability' + assert len(batch['sampleOutcomes']) * 48 == batch['evaluations'] + for k, v in batch['sampleOutcomes'].items(): + assert len(v) == 48 and all(x is not None and 0 <= x <= 1 for x in v) + assert sum(v) == batch['values'][k] + winner = str(a['index']) + alternatives = [k for k in a['values'] if k != winner] + assert alternatives + # Rival selected using only discovery batch A; evaluate its gap on fresh B. + rival = max(alternatives, key=lambda k: (a['values'][k], -int(k))) + diffs = [x - y for x, y in zip(b['sampleOutcomes'][winner], b['sampleOutcomes'][rival])] + gap = sum(diffs) / len(diffs) + policy_disagreements = [] + for batch in [a, b]: + policy_winners = [] + for parity in [0, 1]: + totals = {k: sum(v[parity::2]) for k, v in batch['sampleOutcomes'].items()} + high = max(totals.values()) + policy_winners.append({k for k, v in totals.items() if v == high}) + policy_disagreements.append(not bool(policy_winners[0] & policy_winners[1])) + details.append({ + 'fixtureIndex': row['fixtureIndex'], 'cell': row['cell'], 'round': row['round'], + 'same_selected_action': a['index'] == b['index'], + 'a_winner_is_b_co_winner': b['values'][winner] == max(b['values'].values()), + 'a_all_actions_tied': len(set(a['values'].values())) == 1, + 'b_all_actions_tied': len(set(b['values'].values())) == 1, + 'a_winner': int(winner), 'a_runner_up': int(rival), + 'discovery_gap': (a['values'][winner] - a['values'][rival]) / 48, + 'confirmation_gap': gap, + # One-sided Hoeffding bound for independent bounded differences [-1,1]. + # Marginal per-position diagnostic, not simultaneous or a strength gate. + 'confirmation_95_hoeffding_lower': gap - math.sqrt(2 * math.log(20) / 48), + 'disjoint_continuation_policy_winner_sets': sum(policy_disagreements), + }) + groups = defaultdict(list) + for r in details: + n, variant, sealed, action = r['cell'] + for key in ['overall', f'players/{n}', f'rules/{variant}/{"sealed" if sealed else "open"}', f'action/{action}']: + groups[key].append(r) + def aggregate(group): + return {'positions': len(group), + **{k: sum(r[k] for r in group) for k in [ + 'same_selected_action', 'a_winner_is_b_co_winner', 'a_all_actions_tied', + 'b_all_actions_tied', 'disjoint_continuation_policy_winner_sets']}, + 'positive_discovery_gap': sum(r['discovery_gap'] > 0 for r in group), + 'positive_confirmation_gap': sum(r['confirmation_gap'] > 0 for r in group), + 'negative_confirmation_gap': sum(r['confirmation_gap'] < 0 for r in group), + 'positive_confirmation_hoeffding_lower': sum(r['confirmation_95_hoeffding_lower'] > 0 for r in group)} + return {'input_sha256': hashlib.sha256(path.read_bytes()).hexdigest(), + 'groups': {k: aggregate(v) for k, v in groups.items()}, 'positions': details, + 'limitations': 'One reused development position per cell; no game-strength inference. Policy-subset comparisons also vary sampled scenarios. Confirmation rival fixed using batch A; bounds marginal, not simultaneous.'} + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description=__doc__) + p.add_argument('results', type=Path) + p.add_argument('--output', required=True, type=Path) + a = p.parse_args() + result = summarize(a.results) + a.output.write_text(json.dumps(result, indent=2) + '\n') + print(json.dumps(result['groups'], indent=2)) From 4bc256a8b126c0da977b9a728df9356e201ed815 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Thu, 1 Oct 2026 10:47:00 +0200 Subject: [PATCH 184/184] Launch paired continuation-policy and larger-budget teacher audit --- ai/strong/audit-search-budget.cjs | 15 +++++ ai/strong/audit-search-budgets.py | 55 +++++++++++++++++ ai/strong/experiments.json | 68 +++++++++++++++++++++- ai/strong/launch-teacher-reliability-v2.sh | 18 ++++++ ai/strong/search.cjs | 5 +- ai/strong/test-search-samples.cjs | 12 ++++ 6 files changed, 171 insertions(+), 2 deletions(-) create mode 100644 ai/strong/audit-search-budget.cjs create mode 100644 ai/strong/audit-search-budgets.py create mode 100644 ai/strong/launch-teacher-reliability-v2.sh diff --git a/ai/strong/audit-search-budget.cjs b/ai/strong/audit-search-budget.cjs new file mode 100644 index 0000000..f2e2fd5 --- /dev/null +++ b/ai/strong/audit-search-budget.cjs @@ -0,0 +1,15 @@ +// Paired public scenarios across continuation policies and nested search budgets. +const fs = require('node:fs'); +const search = require('./search.cjs'); +const rows = fs.readFileSync(process.argv[2], 'utf8').trim().split('\n'); +const row = JSON.parse(rows[Number(process.argv[3])]); +const continuation = process.argv[4], batch = process.argv[5]; +if (!['a', 'b'].includes(batch)) throw Error('Invalid batch'); +const { state, player } = row.request; +const result = search.choose(state, player, { + samples: 384, candidates: 6, geography: true, maxSteps: 2400, + seed: `teacher-reliability-v1-${row.fixtureIndex}-${batch}`, + continuation, includeSamples: true, +}); +console.log(JSON.stringify({ fixtureIndex: row.fixtureIndex, cell: row.cell, + round: state.round, continuation, batch, samples: 384, result })); diff --git a/ai/strong/audit-search-budgets.py b/ai/strong/audit-search-budgets.py new file mode 100644 index 0000000..ed60347 --- /dev/null +++ b/ai/strong/audit-search-budgets.py @@ -0,0 +1,55 @@ +"""HF diagnostic shard: repeat searches with shared scenarios across policies.""" +import concurrent.futures +import hashlib +import itertools +import json +import os +from pathlib import Path +import subprocess +from huggingface_hub import HfApi + +players = int(os.environ['PLAYER_COUNT']) +assert 2 <= players <= 6 +fixtures = Path('ai/strong/fixtures/teacher-reliability-v1.jsonl') +rows = [json.loads(line) for line in fixtures.read_text().splitlines()] +indices = [i for i, r in enumerate(rows) if r['cell'][0] == players] +assert len(indices) == 12 +tasks = list(itertools.product(indices, ['mixed', 'economic', 'heuristic'], ['a', 'b'])) + + +def audit(task): + index, policy, batch = task + process = subprocess.run(['node', 'ai/strong/audit-search-budget.cjs', str(fixtures), + str(index), policy, batch], capture_output=True, text=True, check=True) + row = json.loads(process.stdout) + assert row['cell'][0] == players and row['continuation'] == policy and row['batch'] == batch + result = row['result'] + assert len(result['sampleOutcomes']) * 384 == result['evaluations'] + assert sum(v.count(None) for v in result['sampleOutcomes'].values()) == result['truncated'] + for k, v in result['sampleOutcomes'].items(): + assert len(v) == 384 and sum(x for x in v if x is not None) == result['values'][k] + return row + + +completed = [] +with concurrent.futures.ThreadPoolExecutor(max_workers=24) as pool: + futures = [pool.submit(audit, task) for task in tasks] + for f in concurrent.futures.as_completed(futures): + completed.append(f.result()) + print(json.dumps({'players': players, 'completed_searches': len(completed), + 'requested_searches': len(tasks)}), flush=True) +completed.sort(key=lambda r: (r['fixtureIndex'], r['continuation'], r['batch'])) +output = Path(f'results-{players}p.jsonl') +output.write_text(''.join(json.dumps(r) + '\n' for r in completed)) +manifest = {'players': players, 'positions': 12, 'searches': len(completed), 'samples': 384, + 'search_max_steps': 2400, 'fixture_sha256': hashlib.sha256(fixtures.read_bytes()).hexdigest(), + 'output_sha256': hashlib.sha256(output.read_bytes()).hexdigest(), + 'evaluations': sum(r['result']['evaluations'] for r in completed), + 'truncated': sum(r['result']['truncated'] for r in completed), + 'scope': 'Reused development positions; nested budgets and shared public scenarios; no strength claim.'} +api = HfApi() +api.upload_file(repo_id=os.environ['HF_MODEL_REPO'], path_or_fileobj=output, + path_in_repo=f'runs/teacher-reliability-v2/{output.name}') +api.upload_file(repo_id=os.environ['HF_MODEL_REPO'], path_or_fileobj=json.dumps(manifest, indent=2).encode(), + path_in_repo=f'runs/teacher-reliability-v2/manifest-{players}p.json') +print(json.dumps(manifest), flush=True) diff --git a/ai/strong/experiments.json b/ai/strong/experiments.json index 437d680..51a486e 100644 --- a/ai/strong/experiments.json +++ b/ai/strong/experiments.json @@ -218,7 +218,12 @@ "league-admission-periodic-anchor-u19-economic-5p": "6abe1ad1404719ba37617103", "league-admission-periodic-anchor-u19-economic-6p": "6abe1ad2fbc85ba682360a72", "league-admission-periodic-anchor-u19-a260-3p": "6abe1ad2404719ba37617105", - "teacher-reliability-v1": "6abe1cc8404719ba376171b1" + "teacher-reliability-v1": "6abe1cc8404719ba376171b1", + "teacher-reliability-v2-2p": "6abe1df0fbc85ba682360bd8", + "teacher-reliability-v2-3p": "6abe1df1404719ba3761721e", + "teacher-reliability-v2-4p": "6abe1df2fbc85ba682360bda", + "teacher-reliability-v2-5p": "6abe1df2fbc85ba682360bdc", + "teacher-reliability-v2-6p": "6abe1df3fbc85ba682360be0" }, "cancelled_while_queued": [ "6abd128efbc85ba68235b1a6", @@ -34363,5 +34368,66 @@ }, "decision": "Target reproducibility is insufficient to assume that more hard-label distillation will improve the model: selected action agrees39/60 overall and8/20 bidding;16/60 discovery positions tie every candidate. This is a small reused-development diagnostic, not a game-strength estimate. Next compare larger sample budgets and fixed continuation policies on identical public scenarios before training more targets.", "caveat": "No positive distribution-free confirmation lower bound at48 samples does not prove no useful moves; the bound is conservative. Mixed-policy subset disagreement is confounded by distinct scenario samples, so it does not identify a causal policy effect." + }, + "teacher_reliability_v2": { + "status": "RUNNING", + "source_revision": "d07e072058ee877112d609280980fc806ee8ce28", + "source_archive": "strong-source-v36.tgz", + "source_sha256": "6c4170317a74a5148c2a576ad93d1170441e0d8e791a7e6c23197c51dad69109", + "base_revision": "aee5febe0ea0c60988f76a937521e87956544526", + "changed_files": [ + "ai/strong/search.cjs", + "ai/strong/test-search-samples.cjs", + "ai/strong/audit-search-budget.cjs", + "ai/strong/audit-search-budgets.py" + ], + "fixture_sha256": "855b34ad7f07665dfcb012a673147f0780820a9e7560fda268a9a39478c60ff4", + "positions": 60, + "samples_per_batch": 384, + "batches": [ + "a", + "b" + ], + "continuations": [ + "mixed", + "economic", + "heuristic" + ], + "search_max_steps": 2400, + "workers_per_job": 24, + "jobs": [ + { + "run": "teacher-reliability-v2-2p", + "players": 2, + "job_id": "6abe1df0fbc85ba682360bd8", + "observed_stage": "RUNNING" + }, + { + "run": "teacher-reliability-v2-3p", + "players": 3, + "job_id": "6abe1df1404719ba3761721e", + "observed_stage": "RUNNING" + }, + { + "run": "teacher-reliability-v2-4p", + "players": 4, + "job_id": "6abe1df2fbc85ba682360bda", + "observed_stage": "RUNNING" + }, + { + "run": "teacher-reliability-v2-5p", + "players": 5, + "job_id": "6abe1df2fbc85ba682360bdc", + "observed_stage": "RUNNING" + }, + { + "run": "teacher-reliability-v2-6p", + "players": 6, + "job_id": "6abe1df3fbc85ba682360be0", + "observed_stage": "RUNNING" + } + ], + "purpose": "Separate finite-sample instability from dependence on continuation policy using nested budgets and shared public scenarios. Diagnostic only; no gradients and no strength claim.", + "tests": "3 search regression tests pass, including preservation of defaults and identical fixed-policy samples." } } diff --git a/ai/strong/launch-teacher-reliability-v2.sh b/ai/strong/launch-teacher-reliability-v2.sh new file mode 100644 index 0000000..2a742de --- /dev/null +++ b/ai/strong/launch-teacher-reliability-v2.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail +players=${1:?Specify player count 2–6} +[[ "$players" =~ ^[2-6]$ ]] +hf jobs run --detach --flavor cpu-performance --timeout 6h \ + --secrets HF_TOKEN --env PLAYER_COUNT="$players" --env HF_MODEL_REPO=coyotte508/powergrid-ai-germany-v1 \ + --label project=powergrid-ai --label stage="teacher-reliability-v2-${players}p" \ + -- pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime bash -lc ' +set -euo pipefail +python -m pip install --quiet --timeout 120 --retries 5 huggingface_hub==2.0.0 +mkdir -p /workspace +python -c "import urllib.request,tarfile; urllib.request.urlretrieve(\"https://nodejs.org/dist/v24.14.0/node-v24.14.0-linux-x64.tar.xz\",\"/tmp/node.tar.xz\");tarfile.open(\"/tmp/node.tar.xz\").extractall(\"/opt\")" +export PATH=/opt/node-v24.14.0-linux-x64/bin:$PATH +python -c "from huggingface_hub import hf_hub_download;import tarfile;p=hf_hub_download(\"coyotte508/powergrid-ai-training-v1\",\"strong-source-v36.tgz\",repo_type=\"dataset\",revision=\"d07e072058ee877112d609280980fc806ee8ce28\");tarfile.open(p).extractall(\"/workspace\")" +cd /workspace +node --test ai/strong/test-search-samples.cjs ai/strong/test-search-horizon.cjs +python -u ai/strong/audit-search-budgets.py +' diff --git a/ai/strong/search.cjs b/ai/strong/search.cjs index 692896e..5f80d45 100644 --- a/ai/strong/search.cjs +++ b/ai/strong/search.cjs @@ -48,8 +48,10 @@ function choose( extraCandidates = [], geography = false, includeSamples = false, + continuation = 'mixed', } = {} ) { + if (!['mixed', 'heuristic', 'economic'].includes(continuation)) throw Error('Invalid continuation policy'); const actions = c.candidates(g, seat), options = [...new Set([...shortlist(g, seat, candidates, geography), ...extraCandidates])]; if (options.some((i) => !Number.isInteger(i) || i < 0 || i >= actions.length)) @@ -68,7 +70,8 @@ function choose( let step = 0; while (!c.E.ended(sim) && step++ < maxSteps) { const p = sim.currentPlayers[0]; - const move = sample % 2 ? c.heuristic(sim, p, rng).action : eco.choose(sim, p, rng).action; + const useHeuristic = continuation === 'heuristic' || (continuation === 'mixed' && sample % 2); + const move = useHeuristic ? c.heuristic(sim, p, rng).action : eco.choose(sim, p, rng).action; c.E.move(sim, move, p); } if (c.E.ended(sim)) { diff --git a/ai/strong/test-search-samples.cjs b/ai/strong/test-search-samples.cjs index b8120ed..ed143fe 100644 --- a/ai/strong/test-search-samples.cjs +++ b/ai/strong/test-search-samples.cjs @@ -24,3 +24,15 @@ test('optional paired outcomes preserve decisions and distinguish capped continu assert.equal(capped, maxSteps === 1200 ? 1 : 0); } }); + +test('fixed continuation policies share scenarios and reproduce mixed-policy samples', () => { + const options = { ...fixture.options, samples: 2, maxSteps: 2400, includeSamples: true }; + const mixed = search.choose(fixture.state, fixture.seat, options); + const economic = search.choose(fixture.state, fixture.seat, { ...options, continuation: 'economic' }); + const heuristic = search.choose(fixture.state, fixture.seat, { ...options, continuation: 'heuristic' }); + for (const k of Object.keys(mixed.sampleOutcomes)) { + assert.equal(mixed.sampleOutcomes[k][0], economic.sampleOutcomes[k][0]); + assert.equal(mixed.sampleOutcomes[k][1], heuristic.sampleOutcomes[k][1]); + } + assert.throws(() => search.choose(fixture.state, fixture.seat, { continuation: 'unknown' }), /Invalid continuation/); +});