{"id":25176820,"url":"https://github.com/bungogood/bkgm","last_synced_at":"2026-02-17T15:01:48.691Z","repository":{"id":195762045,"uuid":"693659860","full_name":"bungogood/bkgm","owner":"bungogood","description":"Rust crate for Backgammon, providing move generation, position parsing, and support for Backgammon and Hypergammon, including a perfect hash for bearoff and hypergammon databases.","archived":false,"fork":false,"pushed_at":"2025-03-25T10:42:40.000Z","size":121,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T09:03:16.210Z","etag":null,"topics":["backgammon","rust","rust-library"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bkgm","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bungogood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-19T13:13:34.000Z","updated_at":"2025-03-25T10:42:44.000Z","dependencies_parsed_at":"2023-10-14T16:26:37.486Z","dependency_job_id":"4d730611-cc2b-41a4-babb-aa8280c487e1","html_url":"https://github.com/bungogood/bkgm","commit_stats":null,"previous_names":["bungogood/bkgm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bungogood/bkgm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bungogood%2Fbkgm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bungogood%2Fbkgm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bungogood%2Fbkgm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bungogood%2Fbkgm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bungogood","download_url":"https://codeload.github.com/bungogood/bkgm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bungogood%2Fbkgm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29548201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backgammon","rust","rust-library"],"created_at":"2025-02-09T13:18:39.269Z","updated_at":"2026-02-17T15:01:48.672Z","avatar_url":"https://github.com/bungogood.png","language":"Rust","readme":"# bkgm\n\n[![Build](../../actions/workflows/build.yaml/badge.svg)](../../actions/workflows/build.yaml)\n\nBkgm is a versatile Rust crate designed to facilitate Backgammon-related operations, such as move generation, position parsing, conversion between standards, and the implementation of the [perfect hash](https://api.semanticscholar.org/CorpusID:60574812) for bearoff and hypergammon databases. It supports both traditional Backgammon and 3-checker Hypergammon and provides the foundation for building Backgammon engines or APIs.\n\n## Example Position\n\nHere's a visual representation of the starting position in Backgammon:\n\n```plaintext\nPosition ID: 4HPwATDgc/ABMA\n┌13─14─15─16─17─18─┬───┬19─20─21─22─23─24─┬───┐\n│ X           O    │   │ O              X │   │\n│ X           O    │   │ O              X │   │\n│ X           O    │   │ O                │   │\n│ X                │   │ O                │   │\n│ X                │   │ O                │   │\n│                  │BAR│                  │OFF│\n│ O                │   │ X                │   │\n│ O                │   │ X                │   │\n│ O           X    │   │ X                │   │\n│ O           X    │   │ X              O │   │\n│ O           X    │   │ X              O │   │\n└12─11─10──9──8──7─┴───┴─6──5──4──3──2──1─┴───┘\n```\n\n## Features\n\n-   Support for the Gnubg position id format.\n-   Ability to generate possible positions.\n-   Macros to create Backgammon and Hypergammon positions.\n-   State trait implemented for both Backgammon and Hypergammon.\n\n## TODO\n\n-   Move generation (next possible position generation is already implemented).\n-   Move parsing (e.g., 24/23*/22*/21\\*).\n-   Improve test coverage.\n-   Add a game trait, enabling Mat files.\n-   Addition of optional rules\n-   Improve macros to work with bar and off\n\n## References\n\n-   Bkgm [Documentation](https://docs.rs/bkgm/latest/bkgm)\n-   Backgammon [Wikipedia](https://en.wikipedia.org/wiki/Backgammon)\n-   [Wildbg](https://github.com/carsten-wenderdel/wildbg) by [Carsten Wenderdel](https://github.com/carsten-wenderdel/wildbg)\n-   [Enumerating Backgammon Positions: The Perfect Hash (1997)](https://api.semanticscholar.org/CorpusID:60574812) by A. T. Benjamin and A. M. Ross\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbungogood%2Fbkgm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbungogood%2Fbkgm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbungogood%2Fbkgm/lists"}