Crates.io | poirebot |
lib.rs | poirebot |
version | 0.1.6 |
source | src |
created_at | 2021-03-26 09:06:46.340648 |
updated_at | 2021-04-08 06:31:02.873691 |
description | A chess bot engine written in Rust |
homepage | https://github.com/aramperes/poirebot |
repository | https://github.com/aramperes/poirebot |
max_upload_size | |
id | 373740 |
size | 90,379 |
A chess engine and bot written in Rust.
The bot is occasionally up on Lichess.org with the account @poirebot.
Until the bot is live 24/7, you may want to run it locally to try it out. You should create a new Lichess.org that will then become a BOT account.
LICHESS_TOKEN
environment variable (or you can also use the --token
flag later)Download latest release (does not require Rust): https://github.com/aramperes/poirebot/releases/latest
Or to build and install latest release using Cargo (Rust 1.50+):
rustup update stable
cargo install poirebot-lichess
Or to build bleeding edge (master branch) instead (Rust 1.50+):
rustup update stable
git clone https://github.com/aramperes/poirebot.git
cd poirebot
cargo build --release
# (The poirebot-lichess binary will be in ./target/release)
The poirebot-lichess upgrade-account
command is only required for the first run (it converts the Lichess account into
a BOT account).
poirebot-lichess upgrade-account
poirebot-lichess start
Use poirebot-lichess start --help
for a list of flags that can be used when running the bot.
poirebot keeps track of board state in a collection of 64-bit Bitboards. Specifically, the board state is stored in a collection of Bitboards for each side (color):
It also stores whether the king has moved (bool).
In addition, after the mutation of a side (color) is "committed", it generates "inherited" bitboards for move-generation purposes:
poirebot does not have a functioning brain right now. The current goal is to be able to generate all potential moves, and later use some flavor of the MiniMax algorithm.
poirebot depends on Rust stable 1.50+, or nightly, as it uses the <number>::clamp
function.
This bot was made for a friendly competition with Jeff. As a fairness rule, neither bot uses a chess library to manage board state and implement movement rules.
MIT, see LICENSE.