A Chess Engine written in Rust that runs natively and on the web!

Overview

About The Project

chess-rs is a Chess Engine written from scratch in Rust that runs natively and on web!

Live Demo: https://parthpant.github.io/chess-rs/

screenshot

Features

  • Move Generation using BitBoards (<8s perft results at depth 6 for starting position)
  • Supports all moves including en-passant, pawn promotion and castling
  • GUI gameplay
  • Perft Runner
  • Egui Integration
  • Board Evaluation (Matrial and Positional)
  • AI (NegaMax with Quiescence Search)
  • Move Ordering (MVV-LVA, Killer & History Heuristics)
  • Zobrist Hashing
  • Transposition Tables
  • Incremental Search Deepening
  • Opening Book

Getting Started

Prerequisites

Rust

You will require the rust toolchain to be installed on your system.

Follow: Rust Website

Note: If you only want to run natively you are good to go. To build for WASM you will also need to install the following.

Web Target

rustup target add wasm32-unknown-unknown

Trunk

cargo install --locked trunk

Build from source

Simply clone the Git repository and build using the cargo build system

git clone https://github.com/ParthPant/chess-rs.git
cd chess-rs
cargo build

Usage

# You can either start the Chess Engine with
cargo run

# Or you can run in the web browser with
trunk serve

# Or you can run perft analysis
cargo run -p chrs-perft -- 5 "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Parth Pant - @PantParth - [email protected]

Project Link: https://github.com/ParthPant/chess-rs.git

You might also like...
Play jungle chess on the linux terminal.
Play jungle chess on the linux terminal.

Jungle-Chess This is my first project written in Rust. Happy for contributors and feedback! The code is dirty. Play Jungle Chess on an Emoji-Enabled L

An (experimental) chess tactics trainer with spaced repetition
An (experimental) chess tactics trainer with spaced repetition

better-tactics A chess tactics trainer that with spaced repetition. New puzzles will be shown to you from the lichess puzzle db, according to your cal

A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the
A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the "ruscii" library.

Thrust - a terminal shooter game Originally created as a project for the "Missing Semester" course at JKU Linz (338.006). The game is entirely written

Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.
Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.

vx_bevy A voxel engine prototype made using the Bevy game engine. Goals and features Very basic worldgen Animated chunk loading (ala cube world) Optim

A no-frills Tetris implementation written in Rust with the Piston game engine, and Rodio for music.
A no-frills Tetris implementation written in Rust with the Piston game engine, and Rodio for music.

rustris A no-frills Tetris implementation written in Rust with the Piston game engine, and Rodio for music. (C) 2020 Ben Cantrick. This code is distri

Rustcraft is a simple Minecraft engine written in rust using wgpu.
Rustcraft is a simple Minecraft engine written in rust using wgpu.

Rustcraft is a simple Minecraft engine written in rust using wgpu.

A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor.
A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor.

A feature-rich, production-ready, general purpose 2D/3D game engine written in Rust with a scene editor.

A game of snake written in Rust using the Bevy game engine, targeting WebGL2

Snake using the Bevy Game Engine Prerequisites cargo install cargo-make Build and serve WASM version Set your local ip address in Makefile.toml (loca

My first Real-Time 3D Game Engine learning project written in Rust.

EyeEngine-Rust FOA, sry for my poor English. What is Eye Engine? Eye Engine is my first Real-Time 3D Game Engine learning project. There are two editi

Comments
  • Speed control of the opposition to be considered.

    Speed control of the opposition to be considered.

    Addition of feature to control the speed of opposition should be included. Since after playing 2-3 games, felt it was too quick since I was not able to see which move the opposition played.

    opened by swastkk 2
  • Board Orientation is Incorrect

    Board Orientation is Incorrect

    This project looks awesome, but the orientation of the board is not right on the demo. The bottom right square should always be white (h1 from white's perspective, a8 from the black side).

    It's a small detail but its a bit off putting for experienced players

    opened by RoJac88 1
Owner
Parth Pant
Electronics student at NIT Hamirpur GSoC'21 @ Inkscape
Parth Pant
Walleye is a chess engine written completely in rust.

Walleye is a UCI-compatible engine written using the classical alpha-beta style AI. It supports loading board positions from arbitrary FEN strings, Unicode pretty printing to the console, and UCI communication logs to help with debugging.

Mitchel Paulin 95 Dec 24, 2022
Blackmarlin is a chess engine fully written in Rust.

Blackmarlin WIP UCI Chess Engine Blackmarlin is a chess engine fully written in Rust. Make sure to compile the chess engine with cargo build --release

null 50 Oct 31, 2022
Pleco is a chess Engine & Library derived from Stockfish, written entirely in Rust

Pleco Pleco is a chess Engine & Library derived from Stockfish, written entirely in Rust. This project is split into two crates, pleco, which contains

Stephen Fleischman 225 Dec 18, 2022
A Chess Engine written in Rust .

Kelp Kelp is a UCI compatible chess engine written in Rust Using standard chess algorithms. Kelp is work in progress. Currently, it can be used as a U

Gautam 5 Sep 3, 2023
A dependency-free chess engine library built to run anywhere.

♔chess-engine♚ A dependency-free chess engine library built to run anywhere. Demo | Docs | Contact Me Written in Rust ?? ?? Why write a Chess engine?

adam mcdaniel 355 Dec 26, 2022
Stockfish/ - UCI chess engine

Overview Stockfish is a free, powerful UCI chess engine derived from Glaurung 2.1. Stockfish is not a complete chess program and requires a UCI-compat

null 7.5k Jan 8, 2023
Chess implemented entirely in the Rust and TS type systems.

Type System Chess This repo contains chess implemented entirely in the (stable) Rust and Typescript type systems. Both languages feature turing comple

null 170 Jul 12, 2023
A rust chess implementation using a neural network scoring function built on huggingface/candle + rust + wasm

Rusty Chess What is it? Rusty Chess aims to be a high quality embeddable chess engine that runs entirely locally in the browser (no backend required).

Gareth 3 Nov 3, 2023
Yet another shape chess game in Rust.

shape_chesss_in_rust Yet another shape chess game in Rust. Why the implementation is so slow? The main reason is performance of Vector iteration is ve

Simon Lee 1 Apr 10, 2022
Opening randomizer for Chess

chess-randomizer chess-randomizer is a simple opening randomizer written in Rust using WASM and the Lichess API. To build the project, you need Rust a

null 1 Jan 31, 2022