gammonview 3.4.0__tar.gz → 3.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gammonview-3.4.0 → gammonview-3.5.0}/CHANGELOG.md +25 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/PKG-INFO +1 -1
- gammonview-3.5.0/gvanalysis/positionmove.py +232 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/export.py +28 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/package-lock.json +2 -2
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/package.json +2 -2
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/export.js +19 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/hQ8sVn2LbTdF4wRm.json +1 -1
- gammonview-3.5.0/gvformat-js/test/test-bearoff-excess-steps.js +43 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/run_all.py +2 -0
- gammonview-3.5.0/tests/test_bearoff_excess_steps.py +95 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_gvab_writer.py +14 -2
- gammonview-3.5.0/tests/test_position_moves.py +108 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/.gitattributes +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/.github/workflows/ci.yml +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/.github/workflows/engine.yml +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/.github/workflows/publish.yml +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/.gitignore +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/.python-version +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/CLAUDE.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/CONTRIBUTING.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/LICENSE +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/README.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/THIRD-PARTY-NOTICES.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/assets/logo.png +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/CLI.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/METHODOLOGY.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/OGXM_COMPUTED_FIELDS.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/OGXM_JSON_SPEC_GAMMONVIEW.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/OGXM_V2_PROFILE.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/PRESET_ACCURACY.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/upstream-bgsage.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/docs/v1/OGXM_FORMAT_SPEC_GAMMONVIEW.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/experiments/2026-09-16-checker-mid-tier.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/experiments/2026-09-17-checker-mid-tier-followup.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/experiments/2026-09-19-cross-machine-costs.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/experiments/2026-09-20-corpus-rerun.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/experiments/2026-10-21-wc2-corpus.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/experiments/bench.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/__init__.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/batch.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/checker_eval.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/compare_gva.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/game_eval.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/loader.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/luck.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/match.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/ogxm_reconstructor.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/parentwatch.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/position.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/presets.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/progress.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/reconstruct_mat.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvanalysis/share.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/__init__.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/basefill.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/bgf.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/binary.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/game_reconstructor.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/legality.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/mat.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/mat_parser.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/merge.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/met.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/notation.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/ogid.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/ogxm2.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/ogxm2_passthrough.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/ogxm2_writer.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/place.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/reader.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/share.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/stats.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat/xg.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/.gitignore +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/LICENSE +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/README.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/THIRD-PARTY-NOTICES.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/cli/README.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/cli/bgf2gva.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/cli/mat2gva.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/cli/xg2gva.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/basefill.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/bgf2gva.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/binary.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/constants.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/index.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/legality.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/mat2gva.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/merge.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/met.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/notation.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/og2gva.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/ogid.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/ogxm2.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/ogxm2_passthrough.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/ogxm2_writer.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/place.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/reader.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/sha256.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/share.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/stats.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/src/xg2gva.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/3WNK_g1Z-PLsh_HyvQ5j4a.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/5nqfGw9bWG3deTaU.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/B4_SrGcsKAQmoTyHlgJCbM.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/C07OQCKyw4Pe-CnjFiAMYO.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/MYdvw1qGuyaRUH__.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/Sz-2PgKnvb6aFls69-qFXg.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/UL-CV6F9jMM-E1Pu.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/XCu3RJ0UvDg_Tldl.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/baR-U643iUDpvzTC.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/eXBNG5wZHS5Alu3P.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/rK7pXm4TqLb9NzWd.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/mat/uwvEbd63UvdX7SDin5o_Iw.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/annos-docs.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/annos-edits-sha256.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/annos-sha256.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/annos.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/annos.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/bgf-writer-sha256.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/blocks-docs.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/blocks-sha256.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/blocks.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/blocks.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/cube-on-two.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/cube-on-two.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/fields-docs.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/fields-sha256.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/fields.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/fields.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/foreign.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/gen.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/match.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/match.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/passthrough-sha256.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/resign.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/resign.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/set-up.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/set-up.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/two-blocks.expected.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/two-blocks.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/v1-chunks.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/v23-foreign.anchors.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/v23-foreign.ogxm +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/fixtures/ogxm2/writer-sha256.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-alternative-move-steps.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-basefill.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-bgf-alternatives.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-bgf-embedded-cube.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-bgf-move-steps.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-chunk-passthrough.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-equity-loss.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-illegal-move.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-illegal-play-steps.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-legality.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-mat.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-merge.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-met.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-og.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogid.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm2-annos.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm2-blocks.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm2-fields.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm2-limits.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm2-passthrough.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm2-writer.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm2.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-ogxm23.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-place.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-robustness.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-roundtrip.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-share.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-stats.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-xg-cube.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-xg-eval-levels.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-xg-move-steps.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/gvformat-js/test/test-xg-zero-win-eval.js +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/pyproject.toml +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/README.md +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/3WNK_g1Z-PLsh_HyvQ5j4a.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/5nqfGw9bWG3deTaU.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/B4_SrGcsKAQmoTyHlgJCbM.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/C07OQCKyw4Pe-CnjFiAMYO.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/MYdvw1qGuyaRUH__.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/Sz-2PgKnvb6aFls69-qFXg.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/UL-CV6F9jMM-E1Pu.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/XCu3RJ0UvDg_Tldl.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/baR-U643iUDpvzTC.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/eXBNG5wZHS5Alu3P.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/bgf/uwvEbd63UvdX7SDin5o_Iw.bgf +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/3WNK_g1Z-PLsh_HyvQ5j4a.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/5nqfGw9bWG3deTaU.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/B4_SrGcsKAQmoTyHlgJCbM.gva +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/B4_SrGcsKAQmoTyHlgJCbM.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/C07OQCKyw4Pe-CnjFiAMYO.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/MYdvw1qGuyaRUH__.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/Sz-2PgKnvb6aFls69-qFXg.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/UL-CV6F9jMM-E1Pu.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/XCu3RJ0UvDg_Tldl.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/baR-U643iUDpvzTC.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/eXBNG5wZHS5Alu3P.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/gv/uwvEbd63UvdX7SDin5o_Iw.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/3WNK_g1Z-PLsh_HyvQ5j4a.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/5nqfGw9bWG3deTaU.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/B4_SrGcsKAQmoTyHlgJCbM.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/C07OQCKyw4Pe-CnjFiAMYO.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/MYdvw1qGuyaRUH__.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/Sz-2PgKnvb6aFls69-qFXg.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/UL-CV6F9jMM-E1Pu.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/XCu3RJ0UvDg_Tldl.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/baR-U643iUDpvzTC.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/eXBNG5wZHS5Alu3P.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/hQ8sVn2LbTdF4wRm.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/rK7pXm4TqLb9NzWd.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/mat/uwvEbd63UvdX7SDin5o_Iw.mat +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/3WNK_g1Z-PLsh_HyvQ5j4a.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/5nqfGw9bWG3deTaU.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/B4_SrGcsKAQmoTyHlgJCbM.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/C07OQCKyw4Pe-CnjFiAMYO.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/MYdvw1qGuyaRUH__.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/Sz-2PgKnvb6aFls69-qFXg.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/UL-CV6F9jMM-E1Pu.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/XCu3RJ0UvDg_Tldl.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/baR-U643iUDpvzTC.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/eXBNG5wZHS5Alu3P.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/hQ8sVn2LbTdF4wRm.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/rK7pXm4TqLb9NzWd.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/samples/xg/uwvEbd63UvdX7SDin5o_Iw.xg +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/audit_corpus.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/fixtures.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/gen_js_v2_fixtures.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/gen_ogxm23_fixtures.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/gen_ogxm2_annos_fixtures.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/gen_ogxm2_blocks_fixtures.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/gen_ogxm2_fields_fixtures.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/gen_ogxm2_passthrough_fixtures.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/3WNK_g1Z-PLsh_HyvQ5j4a.fast.gva +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/3WNK_g1Z-PLsh_HyvQ5j4a.fast.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/5nqfGw9bWG3deTaU.fast.gva +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/5nqfGw9bWG3deTaU.fast.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/B4_SrGcsKAQmoTyHlgJCbM.fast.gva +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/B4_SrGcsKAQmoTyHlgJCbM.fast.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/MYdvw1qGuyaRUH__.fast.gva +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/MYdvw1qGuyaRUH__.fast.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/PROVENANCE.json +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/baR-U643iUDpvzTC.fast.gva +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/golden/baR-U643iUDpvzTC.fast.gvab +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/ogxm2_annos_cases.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/ogxm2_blocks_cases.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/ogxm2_fields_cases.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/ogxm2_oracle.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/passthrough_cases.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/regen_golden.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_alternative_move_steps.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_analysis_orientation.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_analyze_position.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_basefill.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_bgf_alternatives.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_bgf_cube_response.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_bgf_move_steps.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_chunk_passthrough.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_count_illegal.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_cube_tiers.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_docs_presets.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_equity_loss.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_illegal_move.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_illegal_play_steps.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_legality.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_loader_formats.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_luck_fill.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_merge_resign.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_met.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_money_rules.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm23.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_annos.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_blocks.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_blocks_analysis.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_fields.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_fields_analysis.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_limits.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_passthrough.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_reference.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm2_writer.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm_conformance.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm_export.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm_pipeline.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_ogxm_stats.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_parent_watch.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_position_id.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_presets.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_read_gvab.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_reconstruct_mat.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_resign_actor.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_resign_errors.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_restated_play_analysis.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_screened_checker.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_share_link.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_xg_cube.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_xg_eval_levels.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_xg_move_steps.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/tests/test_xg_zero_win_eval.py +0 -0
- {gammonview-3.4.0 → gammonview-3.5.0}/uv.lock +0 -0
|
@@ -13,6 +13,31 @@ when the repository was opened; they are kept because they record why things
|
|
|
13
13
|
are the way they are — particularly the breaking changes and the measurements
|
|
14
14
|
behind several design decisions. Dates are the tag dates.
|
|
15
15
|
|
|
16
|
+
## 3.5.0 — 2026-11-15
|
|
17
|
+
|
|
18
|
+
**Individual moves can be evaluated from the library** *(added)*
|
|
19
|
+
|
|
20
|
+
`gvanalysis.positionmove.analyze_moves(position_id, notations, level=...)`
|
|
21
|
+
evaluates named moves of one checker play on their own, at any level, and
|
|
22
|
+
returns rows shaped like `alternatives`. bgsage screens candidates at 1-ply and
|
|
23
|
+
spends the requested level on only a handful, so the move you doubt is often in
|
|
24
|
+
the shallow tail; this asks about that move alone instead of re-running the
|
|
25
|
+
decision. At the rollout levels the number is the one a full run would have
|
|
26
|
+
given. It lived in GammonView's analysis server until now; the desktop helper
|
|
27
|
+
needs it too.
|
|
28
|
+
|
|
29
|
+
## 3.4.1 — 2026-11-13
|
|
30
|
+
|
|
31
|
+
**A checker borne off with both dice and pips to spare keeps its steps** *(fixed)*
|
|
32
|
+
|
|
33
|
+
8/off with a 4-5 is 8 pips, not 9: the 5 bears off from the 4-point with one to
|
|
34
|
+
spare. The span matched neither die nor their sum, so it was split into a single
|
|
35
|
+
8-pip step, which `pips` cannot hold, and the play was dropped. An analysed
|
|
36
|
+
position or match showed the engine's best play as no move at all (the equity
|
|
37
|
+
was right); a played move of that shape was restated as a set position. It is
|
|
38
|
+
now 8/4, 4/off, smaller die first unless the opponent holds that stop, in both
|
|
39
|
+
codecs. Files already written keep their empty play: re-analyse to repair them.
|
|
40
|
+
|
|
16
41
|
## 3.4.0 — 2026-11-13
|
|
17
42
|
|
|
18
43
|
**OGXM 2.3: files with a priced forfeit load** *(fixed)*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gammonview
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.5.0
|
|
4
4
|
Summary: Backgammon match analysis — the pure-Python OGXM/GVA codec (`gvformat`) plus bgsage-powered match and position analysis (`gvanalysis`).
|
|
5
5
|
Project-URL: Homepage, https://github.com/gammonview/gammonview-analysis
|
|
6
6
|
Project-URL: Repository, https://github.com/gammonview/gammonview-analysis
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (C) 2026 Nicholas Vlamis
|
|
3
|
+
|
|
4
|
+
"""Re-evaluate *individual moves* of a checker play at a deeper level.
|
|
5
|
+
|
|
6
|
+
Two callers use this: GammonView's analysis server (`POST /position/moves`) and
|
|
7
|
+
the desktop helper, which answers the same request for the site. Both hand it a
|
|
8
|
+
parsed position and get the same dict back; `analyze_moves` is the form for a
|
|
9
|
+
caller holding only a position id.
|
|
10
|
+
|
|
11
|
+
`analyze_position` answers a whole decision: every legal move, ranked. That is
|
|
12
|
+
the right unit for a first look, but it is the wrong unit for a second one.
|
|
13
|
+
bgsage screens candidates at 1-ply and only spends the requested level on the
|
|
14
|
+
survivors -- moves within 0.08 equity of the 1-ply best, at most five of them
|
|
15
|
+
(`_MultiPlyAnalyzer.FILTER_MAX_MOVES` / `FILTER_THRESHOLD`). So a 3ply answer
|
|
16
|
+
is really a handful of 3ply rows over a tail of 1-ply ones, and the tail is
|
|
17
|
+
exactly where a doubtful move tends to sit. Re-running the whole decision at
|
|
18
|
+
2T to settle one move costs the rollout of five moves to learn about one.
|
|
19
|
+
|
|
20
|
+
This evaluates named moves and nothing else, which is what makes "analyse at
|
|
21
|
+
3p, upgrade the interesting rows to 2T/3T" a cheap interaction rather than a
|
|
22
|
+
new full run each time.
|
|
23
|
+
|
|
24
|
+
**The number is the same number.** A move's equity *is* an evaluation of its
|
|
25
|
+
post-move board: `_CubefulAnalyzer` calls
|
|
26
|
+
`rollout_strategy.cubeful_evaluate_board(post_move_board, ...)` per survivor,
|
|
27
|
+
and `BgBotAnalyzer.post_move_analytics` (which is what this calls) routes to
|
|
28
|
+
that same function for rollout levels. The rollout's dice are stratified from
|
|
29
|
+
`config_.seed` and cached on the strategy, not advanced per call, so every
|
|
30
|
+
candidate -- rolled out in a batch or one at a time, now or ten minutes from
|
|
31
|
+
now -- sees the identical 360-trial sequence. Common random numbers, which is
|
|
32
|
+
also why two upgraded rows are comparable to each other.
|
|
33
|
+
|
|
34
|
+
Two things do *not* round-trip exactly, both harmless and both about probs
|
|
35
|
+
rather than equity:
|
|
36
|
+
|
|
37
|
+
- n-ply levels reach cubeful equity through `cubeful_probs_nply` plus a
|
|
38
|
+
post-hoc Janowski conversion here, where a full checker play uses
|
|
39
|
+
`cubeful_equity_nply`. Different arithmetic, and measurably so: 3ply rows
|
|
40
|
+
re-evaluated this way came back 0.001-0.003 off their full-run values,
|
|
41
|
+
which is small but not nothing next to a 0.008 blunder threshold. Rollout
|
|
42
|
+
levels have no such gap -- a 2T/3T upgrade reproduced a forced full run to
|
|
43
|
+
four decimals, on a fresh engine, including for a move the 1-ply filter
|
|
44
|
+
had dropped. That is the reason to make 2T/3T the levels a row is upgraded
|
|
45
|
+
*to*, and to treat an n-ply upgrade as a convenience rather than a
|
|
46
|
+
substitute for re-running the decision.
|
|
47
|
+
- a bearoff position's displayed probabilities come from the rollout here,
|
|
48
|
+
where a full run overrides them with exact bearoff-database lookups. The
|
|
49
|
+
cubeful equity is the rollout's either way.
|
|
50
|
+
|
|
51
|
+
Only shared helpers are used to build the reply -- `compute_move_notation` to
|
|
52
|
+
name a candidate, `_probs_to_eval`/`_normalize_eval_level` to shape it -- so an
|
|
53
|
+
upgraded row cannot drift from the row it replaces.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
from __future__ import annotations
|
|
57
|
+
|
|
58
|
+
import time
|
|
59
|
+
|
|
60
|
+
from gvanalysis.position import EVAL_LEVELS, PositionState, _probs, parse_position_id
|
|
61
|
+
from gvformat.export import _normalize_eval_level, _probs_to_eval
|
|
62
|
+
from gvformat.legality import board_problems
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class MoveEvalError(ValueError):
|
|
66
|
+
"""A request that names something this position cannot offer."""
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _post_move_accepts_beaver() -> bool:
|
|
70
|
+
"""Whether this bgsage's `post_move_analytics` takes `beaver`. The engine
|
|
71
|
+
underneath it does; the Python wrapper did not expose it as of bgsage 2.x.
|
|
72
|
+
|
|
73
|
+
It makes no difference to the number either way. A beaver only answers a
|
|
74
|
+
double that was wrong to make, and the engine's own cube play never makes
|
|
75
|
+
one, so a move's equity under correct play is the same with beavers
|
|
76
|
+
allowed or not (checked across checker plays and cube decisions alike).
|
|
77
|
+
It is passed where it can be only so the request says what it means."""
|
|
78
|
+
import inspect
|
|
79
|
+
from bgsage import BgBotAnalyzer
|
|
80
|
+
return "beaver" in inspect.signature(BgBotAnalyzer.post_move_analytics).parameters
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
BEAVER_UPGRADES = _post_move_accepts_beaver()
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def candidate_boards(state: PositionState) -> dict[str, list[int]]:
|
|
87
|
+
"""Every legal play for `state`, keyed by the notation it will be shown as.
|
|
88
|
+
|
|
89
|
+
Keyed by notation because notation is what a client can hand back: the
|
|
90
|
+
OGXM `move` steps a panel renders are themselves derived from it
|
|
91
|
+
(`_build_alternatives` -> `_notation_to_steps`), so it is the one label
|
|
92
|
+
that survives the round trip without a second encoder to keep in step.
|
|
93
|
+
"""
|
|
94
|
+
from bgsage import possible_moves
|
|
95
|
+
from bgsage.text_export import compute_move_notation
|
|
96
|
+
|
|
97
|
+
boards: dict[str, list[int]] = {}
|
|
98
|
+
for cand in possible_moves(state.board, state.die1, state.die2):
|
|
99
|
+
board = list(cand)
|
|
100
|
+
notation = compute_move_notation(
|
|
101
|
+
state.board, board, state.die1, state.die2)
|
|
102
|
+
# Distinct candidates give distinct notations; first-wins is only a
|
|
103
|
+
# guard against a duplicate the move generator happened to emit twice.
|
|
104
|
+
boards.setdefault(_key(notation), board)
|
|
105
|
+
return boards
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def _key(notation: str) -> str:
|
|
109
|
+
"""Collapse a notation to what identity should ignore -- spacing only."""
|
|
110
|
+
return " ".join(str(notation).split())
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def evaluate_moves(
|
|
114
|
+
state: PositionState,
|
|
115
|
+
notations: list[str],
|
|
116
|
+
*,
|
|
117
|
+
analyzer,
|
|
118
|
+
level: str,
|
|
119
|
+
jacoby: bool = True,
|
|
120
|
+
beaver: bool = True,
|
|
121
|
+
) -> dict:
|
|
122
|
+
"""Evaluate the named moves of `state` at `analyzer`'s level.
|
|
123
|
+
|
|
124
|
+
`jacoby` and `beaver` are the money-game rules, as for `/position`: an
|
|
125
|
+
upgraded row has to be evaluated under the same rules as the list it is
|
|
126
|
+
dropped into. `beaver` reaches bgsage only where it can (`BEAVER_UPGRADES`),
|
|
127
|
+
which costs nothing: it cannot move a move's equity.
|
|
128
|
+
|
|
129
|
+
Returns an OGXM-flavoured dict whose `moves` entries carry the same
|
|
130
|
+
`equity` / `eval` / `eval_level` an `alternatives` row does, so a client
|
|
131
|
+
can drop one into a row it already rendered. `diff` is deliberately absent:
|
|
132
|
+
it is relative to the best move, and which move is best is a property of
|
|
133
|
+
the list a caller is assembling, not of any single evaluation.
|
|
134
|
+
|
|
135
|
+
Raises `MoveEvalError` for a position with no checker play, or a notation
|
|
136
|
+
that is not one of its legal moves.
|
|
137
|
+
"""
|
|
138
|
+
if not (state.die1 and state.die2) or state.force_cube:
|
|
139
|
+
raise MoveEvalError("this position poses a cube decision, not a checker play")
|
|
140
|
+
|
|
141
|
+
boards = candidate_boards(state)
|
|
142
|
+
wanted: list[tuple[str, list[int]]] = []
|
|
143
|
+
for notation in notations:
|
|
144
|
+
board = boards.get(_key(notation))
|
|
145
|
+
if board is None:
|
|
146
|
+
raise MoveEvalError(f"{notation!r} is not a legal move for this position")
|
|
147
|
+
wanted.append((notation, board))
|
|
148
|
+
|
|
149
|
+
started = time.perf_counter()
|
|
150
|
+
moves = [
|
|
151
|
+
_evaluated(notation, board, state, analyzer, jacoby, beaver)
|
|
152
|
+
for notation, board in wanted
|
|
153
|
+
]
|
|
154
|
+
return {
|
|
155
|
+
"position_id": None, # filled in by the caller, which owns the id
|
|
156
|
+
# (`analyze_moves` does)
|
|
157
|
+
"eval_level": level,
|
|
158
|
+
"moves": moves,
|
|
159
|
+
"elapsed": round(time.perf_counter() - started, 3),
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def _evaluated(notation: str, board: list[int], state: PositionState, analyzer,
|
|
164
|
+
jacoby: bool = True, beaver: bool = True) -> dict:
|
|
165
|
+
"""One post-move board, in the vocabulary an `alternatives` row uses."""
|
|
166
|
+
r = analyzer.post_move_analytics(
|
|
167
|
+
board,
|
|
168
|
+
cube_owner=state.cube_owner,
|
|
169
|
+
cube_value=state.cube_value,
|
|
170
|
+
away1=state.away1,
|
|
171
|
+
away2=state.away2,
|
|
172
|
+
is_crawford=state.is_crawford,
|
|
173
|
+
jacoby=jacoby,
|
|
174
|
+
**({"beaver": beaver} if BEAVER_UPGRADES else {}),
|
|
175
|
+
)
|
|
176
|
+
move: dict = {
|
|
177
|
+
"notation": notation,
|
|
178
|
+
"equity": round(float(r.cubeful_equity), 4),
|
|
179
|
+
"cubeless_equity": round(float(r.cubeless_equity), 4),
|
|
180
|
+
"eval": _probs_to_eval(_probs(r.probs)),
|
|
181
|
+
}
|
|
182
|
+
eval_level = _normalize_eval_level(r.eval_level)
|
|
183
|
+
if eval_level is not None:
|
|
184
|
+
move["eval_level"] = eval_level
|
|
185
|
+
# A rollout's standard error is the honest part of a rolled-out number:
|
|
186
|
+
# it is what says how much of a gap between two upgraded rows is signal.
|
|
187
|
+
# Static evals have none, and the key is absent rather than zero.
|
|
188
|
+
if r.cubeful_se is not None:
|
|
189
|
+
move["se"] = round(float(r.cubeful_se), 4)
|
|
190
|
+
return move
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def analyze_moves(
|
|
194
|
+
position_id: str,
|
|
195
|
+
notations: list[str],
|
|
196
|
+
*,
|
|
197
|
+
level: str,
|
|
198
|
+
analyzer=None,
|
|
199
|
+
jacoby: bool = True,
|
|
200
|
+
beaver: bool = True,
|
|
201
|
+
) -> dict:
|
|
202
|
+
"""`evaluate_moves` for a caller holding only a position id (XGID or OGID).
|
|
203
|
+
|
|
204
|
+
The counterpart of `analyze_position` for named moves: it parses the id,
|
|
205
|
+
refuses a board that cannot be a position (`board_problems`, the check
|
|
206
|
+
`POST /position/moves` makes before the engine sees anything), builds an
|
|
207
|
+
analyzer at `level` when none is passed, and echoes the id back as
|
|
208
|
+
`position_id`. A prebuilt `analyzer` must have been built at `level`.
|
|
209
|
+
|
|
210
|
+
Everything wrong with the *request* raises `MoveEvalError` -- an unknown
|
|
211
|
+
level, an unreadable id, an impossible board, a cube decision, a move the
|
|
212
|
+
position does not offer -- so a caller has one exception to answer for.
|
|
213
|
+
"""
|
|
214
|
+
if level not in EVAL_LEVELS:
|
|
215
|
+
raise MoveEvalError(f"level must be one of {list(EVAL_LEVELS)}, got {level!r}")
|
|
216
|
+
try:
|
|
217
|
+
state = parse_position_id(position_id)
|
|
218
|
+
except Exception as exc: # noqa: BLE001 - any parse failure is a bad request
|
|
219
|
+
raise MoveEvalError(f"could not read position: {exc}") from None
|
|
220
|
+
problems = board_problems(state.board)
|
|
221
|
+
if problems:
|
|
222
|
+
raise MoveEvalError("; ".join(problems))
|
|
223
|
+
|
|
224
|
+
if analyzer is None:
|
|
225
|
+
from bgsage import BgBotAnalyzer
|
|
226
|
+
analyzer = BgBotAnalyzer(eval_level=level, cubeful=True)
|
|
227
|
+
|
|
228
|
+
result = evaluate_moves(
|
|
229
|
+
state, notations, analyzer=analyzer, level=level,
|
|
230
|
+
jacoby=jacoby, beaver=beaver)
|
|
231
|
+
result["position_id"] = position_id.strip()
|
|
232
|
+
return result
|
|
@@ -498,9 +498,37 @@ def _split_span_nondouble(
|
|
|
498
498
|
order = legal
|
|
499
499
|
first_d, second_d, mid = order[0]
|
|
500
500
|
return [(f, first_d), (mid, second_d)]
|
|
501
|
+
if t == 0 and f != 25 and max(d1, d2) < dist < d1 + d2:
|
|
502
|
+
return _split_bearoff_excess(f, d1, d2, board)
|
|
501
503
|
return [(f, dist)] if dist > 0 else [] # best-effort fallback
|
|
502
504
|
|
|
503
505
|
|
|
506
|
+
def _split_bearoff_excess(
|
|
507
|
+
f: int, d1: int, d2: int, board: list[int] | None,
|
|
508
|
+
) -> list[tuple[int, int]]:
|
|
509
|
+
"""One checker borne off with both dice and pips to spare: 8/off with a 4-5.
|
|
510
|
+
|
|
511
|
+
The span is shorter than the dice (8 pips, not 9), because the second die
|
|
512
|
+
bears off from below its own number, so it matches neither die nor their
|
|
513
|
+
sum. Left to the single-hop fallback it became one 8-pip step, which a
|
|
514
|
+
``pips`` field cannot hold, and the whole move was then dropped -- an
|
|
515
|
+
engine's best play shown as no move at all.
|
|
516
|
+
|
|
517
|
+
The second die may bear off with excess only from the mover's highest
|
|
518
|
+
point. Smaller die first stops higher, so it is the legal order whenever
|
|
519
|
+
either is -- unless the opponent holds that stop, and then only the other
|
|
520
|
+
can be.
|
|
521
|
+
"""
|
|
522
|
+
lo, hi = sorted((d1, d2))
|
|
523
|
+
order = [(lo, hi), (hi, lo)]
|
|
524
|
+
if board is not None:
|
|
525
|
+
open_ = [o for o in order if board[f - o[0]] >= 0]
|
|
526
|
+
if open_:
|
|
527
|
+
order = open_
|
|
528
|
+
first, second = order[0]
|
|
529
|
+
return [(f, first), (f - first, second)]
|
|
530
|
+
|
|
531
|
+
|
|
504
532
|
def _mover_to_abs(point_mover: int, mover_is_white: bool) -> int:
|
|
505
533
|
"""Mover-numbering point (0-25, 25=own bar) -> OGXM absolute point
|
|
506
534
|
(0=white bar, 25=black bar, 1-24 white's numbering) -- same formula
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gammonview/gvformat",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@gammonview/gvformat",
|
|
9
|
-
"version": "3.1.
|
|
9
|
+
"version": "3.1.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"pako": "^3.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gammonview/gvformat",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"prepublishOnly": "npm test",
|
|
31
|
-
"test": "node test/test-ogid.js && node test/test-roundtrip.js && node test/test-merge.js && node test/test-stats.js && node test/test-met.js && node test/test-xg-cube.js && node test/test-bgf-alternatives.js && node test/test-bgf-move-steps.js && node test/test-bgf-embedded-cube.js && node test/test-xg-move-steps.js && node test/test-xg-eval-levels.js && node test/test-xg-zero-win-eval.js && node test/test-alternative-move-steps.js && node test/test-legality.js && node test/test-illegal-play-steps.js && node test/test-illegal-move.js && node test/test-share.js && node test/test-place.js && node test/test-mat.js && node test/test-og.js && node test/test-equity-loss.js && node test/test-basefill.js && node test/test-ogxm2.js && node test/test-ogxm2-writer.js && node test/test-chunk-passthrough.js && node test/test-ogxm2-passthrough.js && node test/test-ogxm2-fields.js && node test/test-ogxm2-blocks.js && node test/test-ogxm2-annos.js && node test/test-ogxm2-limits.js && node test/test-ogxm23.js && node test/test-robustness.js"
|
|
31
|
+
"test": "node test/test-ogid.js && node test/test-roundtrip.js && node test/test-merge.js && node test/test-stats.js && node test/test-met.js && node test/test-xg-cube.js && node test/test-bgf-alternatives.js && node test/test-bgf-move-steps.js && node test/test-bgf-embedded-cube.js && node test/test-xg-move-steps.js && node test/test-xg-eval-levels.js && node test/test-xg-zero-win-eval.js && node test/test-alternative-move-steps.js && node test/test-legality.js && node test/test-illegal-play-steps.js && node test/test-bearoff-excess-steps.js && node test/test-illegal-move.js && node test/test-share.js && node test/test-place.js && node test/test-mat.js && node test/test-og.js && node test/test-equity-loss.js && node test/test-basefill.js && node test/test-ogxm2.js && node test/test-ogxm2-writer.js && node test/test-chunk-passthrough.js && node test/test-ogxm2-passthrough.js && node test/test-ogxm2-fields.js && node test/test-ogxm2-blocks.js && node test/test-ogxm2-annos.js && node test/test-ogxm2-limits.js && node test/test-ogxm23.js && node test/test-robustness.js"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=18"
|
|
@@ -342,6 +342,9 @@ function _splitSpanNondouble(f, t, d1, d2, board, hitPoints) {
|
|
|
342
342
|
const [firstD, secondD, mid] = order[0];
|
|
343
343
|
return [[f, firstD], [mid, secondD]];
|
|
344
344
|
}
|
|
345
|
+
if (t === 0 && f !== 25 && Math.max(d1, d2) < dist && dist < d1 + d2) {
|
|
346
|
+
return _splitBearoffExcess(f, d1, d2, board);
|
|
347
|
+
}
|
|
345
348
|
return dist > 0 ? [[f, dist]] : [];
|
|
346
349
|
}
|
|
347
350
|
|
|
@@ -349,6 +352,22 @@ function _moverToAbs(pointMover, moverIsWhite) {
|
|
|
349
352
|
return moverIsWhite ? (25 - pointMover) : pointMover;
|
|
350
353
|
}
|
|
351
354
|
|
|
355
|
+
// One checker borne off with both dice and pips to spare: 8/off with a 4-5.
|
|
356
|
+
// The span matches neither die nor their sum, and as one 8-pip step it was
|
|
357
|
+
// dropped whole (see gvformat/export.py's _split_bearoff_excess). Smaller die
|
|
358
|
+
// first stops higher, so it is the legal order unless the opponent holds that
|
|
359
|
+
// stop.
|
|
360
|
+
function _splitBearoffExcess(f, d1, d2, board) {
|
|
361
|
+
const lo = Math.min(d1, d2), hi = Math.max(d1, d2);
|
|
362
|
+
let order = [[lo, hi], [hi, lo]];
|
|
363
|
+
if (board) {
|
|
364
|
+
const open = order.filter(o => board[f - o[0]] >= 0);
|
|
365
|
+
if (open.length) order = open;
|
|
366
|
+
}
|
|
367
|
+
const [first, second] = order[0];
|
|
368
|
+
return [[f, first], [f - first, second]];
|
|
369
|
+
}
|
|
370
|
+
|
|
352
371
|
export function _computeMoveSteps(boardBeforeP1, boardAfterP1, moverIsWhite, d1, d2) {
|
|
353
372
|
const mbBefore = moverIsWhite ? boardBeforeP1 : _flipBoard(boardBeforeP1);
|
|
354
373
|
const mbAfter = moverIsWhite ? boardAfterP1 : _flipBoard(boardAfterP1);
|