Crate littlewing [−] [src]
Little Wing
Little Wing is a bitboard chess engine.
It has been a work in progress since 2014 and the library is not stabilized yet, but the goal is to have an engine with modern algorithms, a simple API and a great CLI with support for XBoard and UCI protocols.
Example
use littlewing::game::Game; use littlewing::fen::FEN; use littlewing::clock::Clock; use littlewing::search::Search; use littlewing::moves_generator::MovesGenerator; // Byrne vs Fischer (1956) let fen = "r3r1k1/pp3pbp/1Bp1b1p1/8/2BP4/Q1n2N2/P4PPP/3R1K1R b - - 0 18"; let mut game = Game::from_fen(fen); game.clock = Clock::new(1, 5000); // Search 1 move in 5 seconds match game.search(1..15) { // Search from depth 1 to 15 Some(m) => { assert_eq!(game.move_to_san(m), "Bxc4"); game.make_move(m); game.history.push(m); // Keep track of the moves played println!("Engine played {}", m.to_can()); }, None => { println!("Engine could not find a move to play"); } }
Modules
bitboard |
Bitboard type |
clock |
Clock controls |
color |
Color type |
eval |
Evaluation algorithms |
fen |
Forsyth–Edwards Notation support |
game |
Game engine |
moves_generator |
Moves generator |
piece |
Piece type |
protocols |
Communication protocols |
search |
Search algorithms |
square |
Square type |
Functions
version |
Return Little Wing's version |