Crates.io | blunders |
lib.rs | blunders |
version | 0.1.0 |
source | src |
created_at | 2021-09-22 03:10:08.672363 |
updated_at | 2021-09-22 03:10:08.672363 |
description | UCI chess engine application |
homepage | https://github.com/paulolemus/blunders |
repository | https://github.com/paulolemus/blunders |
max_upload_size | |
id | 454703 |
size | 59,570 |
A Universal Chess Interface (UCI) chess engine.
Blunders is currently a work in progress.
Blunders supports 64-bit Windows 10 and Linux primarily, MacOS is tested only through CI. The following commands should work on both platforms.
Install the most recent stable rust compiler and cargo through rustup. Download or clone the Blunders repository and navigate into the root folder.
To build only, run the command cargo build --release
To build and run, run the command cargo run --release
The default location for the Blunders executable is blunders/target/release/blunders
.
Blunders is a UCI compatible chess engine, and is most easily used from a chess GUI or CLI program instead of running it directly. Blunders uses the chess GUI Cute Chess during development and is known to work well within it.
To use Blunders directly, look at the UCI specification to find complete instructions on how to interact with Blunders in UCI mode. Eventually Blunders will get a non-standard set of commands to make it easy to use directly.
Hash x
: an integer size in megabytes x
to set the size of the engine's hash table
Clear Hash
: a button command telling the engine to clear its hash table, effectively forgetting its search history
Ponder bool
: tells engine whether pondering is allowed or not. Allowing this means the engine may be allowed to search during an opponent's turn
Threads x
: an integer x
telling engine the maximum number of threads it may use to search. This is best set to the number of threads your computer cpu supports
Debug bool
: tell engine to print debugging or extra information strings
Change default settings, then quit:
blunders/target/release>./blunders
setoption name Hash value 20
setoption name Ponder value false
setoption name Threads value 4
setoption name Debug value true
setoption name Clear Hash
quit
blunders/target/release>
Search the starting position to depth 3 to get info and bestmove output, then quit:
blunders/target/release>./blunders
position startpos
go depth 3
info depth 3 score cp +10 time 6 nodes 10000 nps 1666666 pv d2d4 d7d5 c2c4
bestmove d2d4
quit
blunders/target/release>
Testing is done through cargo
. There are several commands that can be run to test all crates. Note that there are extra debug assertions so it may be worth it to test in both debug and release modes.
Run relatively quick tests: cargo test --all
or cargo test --all --release
Run all tests: cargo test --all -- --include-ignored
or cargo test --all --release -- --include-ignored
Blunders has some simple benchmarks that can be run with cargo bench --all
.
search
blunders-engine
This project is licensed under GNU GPL v3.0.
Copyright (C) 2021 Paulo Lemus
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.