A basic web assembly chess engine written in rust.

Overview

WASM-CHESS

What is it?

This library is a basic implementation of a chess min-max algorithm with alpha-beta pruning (Algorithm Info). It is designed to be compiled down to WebAssembly and used for web applications.

How strong is it?

Honestly, it's not very strong. The algorithm is currently designed to evaluate positions based on piece count, whether it's checkmate, and the number of pieces a player has on the central four squares (the latter being treated as an order of magnitude less important).

The algorithm does not currently use an opening book, nor does it possess an endgame tablebase. These are features that I may add at a later date.

How do I use it?

To build the WebAssembly version, first ensure that you have cargo installed. Then install wasm-pack via:

cargo install wasm-pack

Once you have installed wasm-pack, navigate to the root directory and run:

wasm-pack build --target web

The output is contained in the newly created pkg directory.

How do I run the UTs?

cargo test
You might also like...
Opening randomizer for Chess
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

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 basic RUST RPG created by arukovic.

Rust RPG! Hello this is a RUST RPG created by arukovic! This is just a simple RPG created by purely Rust... feel free to run it! Manually running 1st

A basic raytracer implementation in Rust based on the Ray Tracing in One Weekend book.
A basic raytracer implementation in Rust based on the Ray Tracing in One Weekend book.

Raytracer A basic raytracer implementation in Rust based on the Ray Tracing in One Weekend book. Live Demo Result How to Run Standalone Binary $ cargo

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.

Owner
null
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
Basic first-person fly camera for the Bevy game engine

bevy_flycam A basic first-person fly camera for Bevy 0.4 Controls WASD to move horizontally SPACE to ascend LSHIFT to descend ESC to grab/release curs

Spencer Burris 85 Dec 23, 2022
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
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