Skip to main content

Open Sage bot engine — a neural-network backgammon engine

Project description

The Open Sage Backgammon Bot Engine Library

Open Sage is a "backgammon bot engine" - that is, a library that you can ask questions like "what's the best move in this situation, with all the analytics to back it up", or "is this a double, and if so, is it a take or a pass (including analytics)?".

What it Contains

It is a joint Python/C++ library that includes:

  • A neural network-based backgammon bot.
  • Neural network training framework using both self play and supervised learning, including training code, benchmark scoring, with customizable inputs. Uses your NVIDIA GPU (via CUDA) if you have one.
  • The post-training weights for several different versions of the bot engine.
  • Multi-ply and rollout calculations that efficiently parallelize on the CPU.
  • Test framework.
  • VIBING.md: information on how to use Claude Code-style tools to interact with and change it, and how to submit changes back to us (the maintainers). Most of this code was written by Anthropic's Claude Code and OpenAI's Codex.

What Evaluation Levels Does It Support?

The library supports "multi-ply" lookahead calculations. 1-ply is the raw neural network evaluation (we follow the XG/eXtreme Gammon numbering convention; GNUbg calls this "0-ply"). Adding a ply makes the calculation roughly 20x slower. It efficiently parallelizes these multi-ply calculations on your CPUs.

It supports truncated rollout calculations, where it simulates the game several turns into the future and then stops the simulation, using bot evaluations at the leaves.

It also supports full rollout calculations, which are simulations playing out the game over and over to completion.

Truncated and full rollouts both include variance reduction and efficiently parallelize on CPUs.

What are Its Interfaces?

It offers both Python and C++ interfaces for:

  • Checker play analytics: given a list of checker positions, the two dice, and cube information, it returns you a list of information about the top possible moves, sorted in descending order of equity; for each it gives you equity and cubeless post-move probabilities. You can specify the evaluation level.
  • Post-move position analytics: given a list of checker positions and the cube information, it returns you cubeful equity, cubeless equity, and the cubeless probabilities - for a post-move position (right before the opponent's turn).
  • Cube action analytics: given a list of checker positions and the cube information, it returns you cubeful equity information about the three states (ND, D/T, and D/P), cubeless equity, and the cubeless probabilities - for a pre-roll position.
  • Game plan classification: given a list of checkers, it returns the optimal game plans of the player and the opponent.
  • Game utilities (flip a board, etc).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bgsage-0.1.20260421.tar.gz (8.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

bgsage-0.1.20260421-cp313-cp313-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.13Windows x86-64

bgsage-0.1.20260421-cp313-cp313-manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

bgsage-0.1.20260421-cp313-cp313-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

bgsage-0.1.20260421-cp313-cp313-macosx_10_13_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

bgsage-0.1.20260421-cp312-cp312-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.12Windows x86-64

bgsage-0.1.20260421-cp312-cp312-manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

bgsage-0.1.20260421-cp312-cp312-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

bgsage-0.1.20260421-cp312-cp312-macosx_10_13_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

bgsage-0.1.20260421-cp311-cp311-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.11Windows x86-64

bgsage-0.1.20260421-cp311-cp311-manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

bgsage-0.1.20260421-cp311-cp311-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

bgsage-0.1.20260421-cp311-cp311-macosx_10_9_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

bgsage-0.1.20260421-cp310-cp310-win_amd64.whl (8.4 MB view details)

Uploaded CPython 3.10Windows x86-64

bgsage-0.1.20260421-cp310-cp310-manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

bgsage-0.1.20260421-cp310-cp310-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

bgsage-0.1.20260421-cp310-cp310-macosx_10_9_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file bgsage-0.1.20260421.tar.gz.

File metadata

  • Download URL: bgsage-0.1.20260421.tar.gz
  • Upload date:
  • Size: 8.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bgsage-0.1.20260421.tar.gz
Algorithm Hash digest
SHA256 345334c3e01c7d883a82acfced3ea5e32782e9acf7aa03b3a00dbb5fd68b84d4
MD5 912084c61c35f74c4719383552dfc07c
BLAKE2b-256 144f334e7e4879d42a6dda5907ee7b64311ac4bf945ef31c6b52974c00d1c18f

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421.tar.gz:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d99f7bb46d0071e3c6811d19bb6674146d0ee80b6d9b2882141d1f9b366e880c
MD5 5ef1e53128847a2f344cfd239bc09fdf
BLAKE2b-256 bfd8add3aecc5030a6785be370c5f405bca5822b23bc5c4b1fbcded089bf3456

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fbebbf4a44e3a134a805f6ed9901e41feb126db5bf8c76f4b64396605802898d
MD5 c9b489d0399dd8fb9151338a9bf21603
BLAKE2b-256 be0b7d82dd4f6977facb6e6b495b2663e094baf7f263de0ec2198b10363d42c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 abcb8bf16f451a776493b732f86f17f2ccb7a5dcc7fb3845d10c6f3be0c34099
MD5 a3fce94f60483156cbaf3fa779f6a157
BLAKE2b-256 3ba4838c2b0ff1d84fe52f6943d3f6f8271a0d0e5851de790af2dd9ef31754a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 11de0ece1306707c1fc38b4a048f084c8e1b1a00d49d59daa7ef51adf99934e8
MD5 3b8bde543183122674048f3dd1e38140
BLAKE2b-256 ab7991d48e8e3721be1fb8fd2eeee5f707bed5bf0e434ee243a84562ba63f890

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp313-cp313-macosx_10_13_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e9bbcf70be92cd8d8fcb79d00d751d051d840b8c2cb06592777fc6ddbd23bdaf
MD5 21cf0b732cccddbc224f32be6d67a14e
BLAKE2b-256 48597e466e7ef637e7b7f4adfa1ee10fb577692bc7abf3ba89036530551fbf68

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5070cfc551c5700672690b6aaf2dd062186ce37ba4f22682a39fed47deb94a2f
MD5 f5b58cfb315b909e8b383fa70153f66c
BLAKE2b-256 7386f425b0a98d456a62c811bf5c36a12888cb95f8fb5e01fe33748419a7fd48

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 246ec1f989974293574ef79c4dceccf76195742e30f5e81e2d2462855d5e55f2
MD5 b5e2b90c98bc7f4c9fd3d498ed1c404c
BLAKE2b-256 85040c927d9090f6c78128ff8e16c62f7f24d4196ad21edc40a583e283c0cd42

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7daa5de79464485c116f277ab94d605d987876989e7b06ceffb4ded752f5060f
MD5 6f2c0e2c0757a23359defee4573acbad
BLAKE2b-256 e71c3191c3ddb91f0b6856b75b982e1d3fb274a9acb4680540cc109fb011e49b

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4458a0bf97ab3385084c106270cc97cb3139429a9a56a36bc0e10e3c3a0a9b8d
MD5 0d946551a325f48408f333ee798d87f3
BLAKE2b-256 0f10931be2052c61f006e5d5c89ebc45b96846da11af9d69242e0a32acd5f2a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 691e998b276e66212ded9354cf31789291b6e50aa4f63dc923b3b7661ccafc05
MD5 cc9e55f67d1bff9306b55b4dfcd56c25
BLAKE2b-256 9ac0f93dbc93aa7d0d0176ef38514406fb47453d7895e03f43149be7354e3f49

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 778c9416efc65dde74f61b510cf93f2c484ad225747672b54ddf9297a4dd900c
MD5 be056ea25f246153b2f81ed2ac503372
BLAKE2b-256 32af6aedfadcb9d3fbc90000183352d77f45c8d796df7dc84931412da8cc8585

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 72a9cbfb4e0146d61251593bbc47540c9bc623bc0bb28b5fa3b8c0d8c5f84db6
MD5 75d30594f539921cf33d8c2c9a5241b7
BLAKE2b-256 84bf7a62f524ce6f0a29323eabefad90d7a3928de64d713564c107d9562f5154

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7bd684d35e31ab2a1764b477c57b08d546a846941144c2f6e62f56dab5616fc6
MD5 1092e1ad03390fa56396b1d1aa0c45d1
BLAKE2b-256 9f51ae9fcdeadb2ff1cc8fd9b735ea5d713a7425c020a92a15fa09562af37132

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d56640f1c53d921999a4fbef7557c9092a9dbfb5dd42f17fbba9947c40beb23
MD5 537e79f79956fad45ad26c3cb1a72855
BLAKE2b-256 b14b5f890ce2a87c9204e46d47a80662c999a6941a9c0ff6736ea1e24559d868

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc4c1ec97dcbedad717d8c5433e500d7038a83a41b8fa274cc9a99e71135d499
MD5 d34d98461ae77d6f3ca357503f8bda30
BLAKE2b-256 db1a6b1c57c1f3eac0da1421f910b0ff00935b2d8174170da4b6703b205bb009

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bgsage-0.1.20260421-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for bgsage-0.1.20260421-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 26b05f7df6f061d42b9170fd04dffbd6db2bfca94e2da05a50b4930b143af967
MD5 b029d178584316497c0753d68beefa09
BLAKE2b-256 48289dde6091fe2d1f4e5e1b822ccab866d4f764b087872dc994ff1a13e9491b

See more details on using hashes here.

Provenance

The following attestation bundles were made for bgsage-0.1.20260421-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on markbgsage/bgsage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page