Skip to content

zS1L3NT/rs-tauri-chess

Repository files navigation

Tauri Chess Engine

License Languages Top Language Commit Activity Last commit

This is a chess engine written in Tauri, where the frontend (the board and pieces) is in React and the backend (move generation) is written in Rust. This is NOT a chess AI, meaning that all this repository contains is code to determine the next possible legal moves for a specific chess position.

In the future, I plan to improve the performance of this engine with bitboards and bitwise operations instead of using Vectors. I also plan to train a Supervised Learning model on games played by players above the LiChess rating of 1600 to be able the evaluate the score of chess positions, then use alpha-beta pruning to find the best move for a specific position. I could possibly add an evaluation function too to improve the performance of the engine. For now, these features will be put off so I can focus on other more important projects.

Motivation

I seriously love the game of Chess. This is my third repository where I attempt to rebuild a chess engine in yet another language. From Java, to Typescript and now to Rust. I was also heavily inspired by how Sebastian Lague implemented his chess engine in this video.

Features

  • React UI with drag & drop of pieces
  • Engine to determine all legal moves in a specific position

Credits

I did a LOT of referring to this website to get the perft results for the move generation testing. This is to test that my chess engine was producing the correct list of legal moves for any possible board configuration. I also did something similar but not exactly the same as how Sebastian Lague cached attack lines in this video. This video was my main inspiration for this project.

Tests

All tests, including perft and struct tests can be run with the command. The perft tests may take a long time to run (the longest perft tests takes about 7 minutes to run on my computer).

$ cargo test

Built with

  • Rust
    • Tauri
      • tauri
    • Miscellaneous
      • indexmap
      • serde
      • serde_json
  • Typescript
    • Typescript
      • @types/node
      • @types/react
      • @types/react-dom
      • typescript
    • React
      • react
      • react-dom
    • Redux
      • @reduxjs/toolkit
      • react-redux
    • Tauri
      • @tauri-apps/api
      • @tauri-apps/cli
    • Vite
      • @vitejs/plugin-react
      • vite
    • Miscellaneous
      • framer-motion
      • use-async-effect

About

A chess engine written in rust to determine legal moves of a specific position, paired with a react frontend to see the chessboard

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published