15jgme / shallow_red_engine

A chess engine written in rust
1 stars 0 forks source link
chess-ai chess-engine

Shallow Red engine

Rust

This repo houses the core Shallow Red chess engine. Operation of this engine is very simple, it uses jordanbray/chess for move generation, and general Chess classes. The engine takes in a board type and outputs a move type.

Features

Implemented

Not implemented

Running the engine

// Calling the enging can be done in only a few lines

use chess::Board;
use shallow_red_engine::engine::enter_engine;
use shallow_red_engine::utils::engine_interface::EngineSettings;

fn main() {
    // board with initial position
    let board = Board::default();

    // run the engine using board (in this case white will move)
    let (engine_move, _) = enter_engine(board, EngineSettings::default());

    // Print out the move we found
    println!(
        "The best move for white suggested by the engine is: {}",
        engine_move
    );

    // If you want to see more details about the engine, a second return of type EngineReturn is provided
    let (_engine_move, engine_data) = enter_engine(board, EngineSettings::default());
    println!(
        "The engine returned the following data: \n {:#?}",
        engine_data.unwrap()
    )
}

Playing the engine

The easiest way to play the engine is to check it out on Lichess @ShallowRedBot. You can also try the UCI wrapper, or play with the tauri GUI for Shallow Red.