8000 GitHub - bungogood/bkgm: Rust crate for Backgammon, providing move generation, position parsing, and support for Backgammon and Hypergammon, including a perfect hash for bearoff and hypergammon databases.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ bkgm Public

Rust crate for Backgammon, providing move generation, position parsing, and support for Backgammon and Hypergammon, including a perfect hash for bearoff and hypergammon databases.

License

Notifications You must be signed in to change notification settings

bungogood/bkgm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bkgm

Build

Bkgm 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 for bearoff and hypergammon databases. It supports both traditional Backgammon and 3-checker Hypergammon and provides the foundation for building Backgammon engines or APIs.

Example Position

Here's a visual representation of the starting position in Backgammon:

Position ID: 4HPwATDgc/ABMA
┌13─14─15─16─17─18─┬───┬19─20─21─22─23─24─┬───┐
│ X           O    │   │ O              X │   │
│ X           O    │   │ O              X │   │
│ X           O    │   │ O                │   │
│ X                │   │ O                │   │
│ X                │   │ O                │   │
│                  │BAR│                  │OFF│
│ O                │   │ X                │   │
│ O                │   │ X                │   │
│ O           X    │   │ X                │   │
│ O           X    │   │ X              O │   │
│ O           X    │   │ X              O │   │
└12─11─10──9
6872
─8──7─┴───┴─6──5──4──3──2──1─┴───┘

Features

  • Support for the Gnubg position id format.
  • Ability to generate possible positions.
  • Macros to create Backgammon and Hypergammon positions.
  • State trait implemented for both Backgammon and Hypergammon.

TODO

  • Move generation (next possible position generation is already implemented).
  • Move parsing (e.g., 24/23*/22*/21*).
  • Improve test coverage.
  • Add a game trait, enabling Mat files.
  • Addition of optional rules
  • Improve macros to work with bar and off

References

About

Rust crate for Backgammon, providing move generation, position parsing, and support for Backgammon and Hypergammon, including a perfect hash for bearoff and hypergammon databases.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0