Crate littlewing[][src]

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.


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 { // Search from depth 1 to 15
    Some(m) => {
        assert_eq!(game.move_to_san(m), "Bxc4");

        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");


Bitboard type

Chess prelude

Clock controls

Color type

Evaluation algorithms

Forsyth–Edwards Notation support

Game engine

Portable Game Notation support

Piece type

Piece move generator

Piece move notation

Communication protocols

Search algorithms

Square type


Return Little Wing’s version