Expand description
Little Wing is a chess engine rated at 2050+ ELO, compatible with both UCI and XBoard protocols, with a nice CLI, and a documented library.
§Example
use littlewing::chess::*;
// Byrne vs Fischer (1956)
let fen = "r3r1k1/pp3pbp/1Bp1b1p1/8/2BP4/Q1n2N2/P4PPP/3R1K1R b - - 0 18";
let mut game = Game::from_fen(fen).unwrap();
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_lan());
},
None => {
println!("Engine could not find a move to play");
}
}
Modules§
- attack
- bitboard
- Bitboard type
- chess
- Chess prelude
- clock
- Clock controls
- color
- Color type
- eval
- Evaluation algorithms
- fen
- Forsyth–Edwards Notation support
- game
- Game engine
- pgn
- Portable Game Notation support
- piece
- Piece type
- piece_
move_ generator - Piece move generator
- piece_
move_ notation - Piece move notation
- protocols
- Communication protocols
- search
- Search algorithms
- square
- Square type
Functions§
- bold_
green - bold_
red - bold_
white - colorize
- version
- Return Little Wing’s version