wildbg is a backgammon engine based on neural networks. Currently, it's in alpha stage.
As of January 2024, it reaches an error rate of roughly 5.9 for 1-pointers when being analyzed with GnuBG 2-ply.
For discussions, please join the Discord Server Computer Backgammon 
- Provide source code and documentation to train neural nets from zero to super human strength.
- Implement logic to evaluate all kind of backgammon positions: cubeless and cubeful equities, multi-ply evaluation, rollouts, etc.
- Make the backgammon engine accessible via an easy-to-use HTTP JSON API.
A graphical user interface (GUI) is not part of this project.
Click the play vs bot button and enjoy the wildbg bot at https://kutuama.com. No need to download a client or register.
Thanks to @tslocum you can play against BOT_wildbg on his new backgammon server https://bgammon.org.
No need to download a client or register.
The source code of the bot can be found here. There are also winning statistics available.
On OpenGammon.org you can play against WildBG.
Thanks to @oysteijo you can play against wildbg on the backgammon server FIBS. As FIBS client I recommend JavaFibs.
You can access the API and see yourself how wildbg would move: http://46.224.159.43/swagger-ui/
An example for the starting position and rolling 3 and 1: http://46.224.159.43/move?die1=3&die2=1&p24=2&p19=-5&p17=-3&p13=5&p12=-5&p8=3&p6=5&p1=-2
Install Rust on your machine and then execute cargo run or cargo run --release.
A web server will be started which you can access via http://localhost:8080/swagger-ui/
Beware that the networks committed to the main branch of this repository (in ./neural-nets/) are very small networks just for demonstration purposes. For using the latest and strongest networks, switch to the branch nets. Alternatively, you can find the training progress and various networks here: https://github.com/carsten-wenderdel/wildbg-training
Instead of installing Rust, you can also use Docker:
docker build -t wildbg .
docker run -p 8082:8082 wildbg
- HTTP API: http://46.224.159.43/swagger-ui/
- C API: docs/user/wildbg-c.md
- Code structure: docs/dev/architecture.md
- Engine: docs/dev/engine.md
- Training process: docs/dev/training.md
Also see the CHANGELOG for a list of changes.
This project is inspired and influenced by other backgammon engines:
- TD-Gammon by Gerald Tesauro brought the idea of using neural networks to backgammon
- GnuBG - The strongest open source backgammon engine
Help is more than welcome! There are some smaller tasks but also bigger ones, see https://github.com/carsten-wenderdel/wildbg/issues. Currently, most needed is:
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.