No description
Find a file
2025-08-15 17:06:07 -07:00
bitboard [bitboard, board] Remove BitBoard::empty() and BitBoard::full() 2025-08-15 16:14:34 -07:00
board [board] Fix a counter underflow in the piece set 2025-08-15 16:15:09 -07:00
chessfriend [chessfriend] Empty crate 2025-06-16 19:29:57 -07:00
core [core] Fix an incorrect assertion in the Score doc test 2025-07-12 20:27:47 -07:00
doc Move Notes and ChessPieces docs to a doc directory 2024-01-22 19:27:08 -08:00
explorer [board, explorer, position] Clean up naming of sight and movement methods 2025-06-29 09:23:20 -07:00
moves [board, moves] Derive Clone on several error types 2025-06-21 21:08:04 -07:00
perft [explorer, perft, position] Move node count into a new PerftCounters struct 2025-06-19 11:34:59 -07:00
position [board, position] Simplify check methods 2025-06-29 09:25:08 -07:00
.gitignore Ignore the target/ directory 2023-12-19 11:13:41 -08:00
Cargo.lock Remove empty dependencies list from Cargo.lock 2025-06-17 16:42:17 -07:00
Cargo.toml Add a release-debug profile 2025-06-19 14:27:52 -07:00
ChessFriend.code-workspace Visual Studio Code workspace 2024-02-11 10:22:33 -07:00
Makefile WIP 2025-05-08 17:37:59 -07:00
README.md Add a README 2025-08-15 17:06:07 -07:00
rustfmt.toml Add style_edition to rustfmt.toml 2025-06-17 16:24:46 -07:00

ChessFriend

A chess engine written in Rust.

The project is divided into crates for major components of the engine. These crates are collected in a Cargo workspace. All crates have the chessfriend_ naming prefix. The directory structure omits this prefix, and I also frequently do when referring to them.

Engine Crates

The engine is divided into several crates, each providing vital types and functionality.

core

A collection of types for representing core concepts in a chess game and the engine. Types like Color (player or piece color), Shape (the shape of a piece: knight, etc), Piece (a piece of a particular color and shape), and Score (for scoring a board position) live here.

bitboard

Implements an efficient BitBoard type. Bitboards use a 64-bit bit field to mark a square on a board as occupied or free.

board

Implements a Board type that represents a moment-in-time board position. FEN parsing and production lives here.

moves

The Move type lives here, along with routines for encoding moves in efficient forms, parsing moves from algebraic notation, and recording moves in a game context. Additionally, the move generators for each shape of piece are here.

position

Exports the Position type, representing a board position within the context of a game. As such, it also provides a move list, and methods to make and unmake moves.

Support Crates

These crates are for debugging and testing.

explorer

This crate implements a small command-line application for "exploring" board positions. I meant for this program to be a debugging utility so that I could examine bitboards and other board structures live. It has grown over time to also support more aspects of interacting with the engine. So you can also use it to play a game!

perft

A small Perft utility that executes perft to a given depth from some starting position.

Building

Build the engine in the usual Rusty way.

$ cargo build

Testing

Test in the usual Rusty way.

$ cargo test

The engine has a fairly comprehensive unit test suite, as well as a decent pile of integration tests.

Authors

This engine is built entirely by me, Eryn Wells.