Please sign in to access this page

Chess engine - Rust

Chess engine - Rust

22 devlogs
23h 17m
•  Ship certified
Created by Shivam Maurya

Writing my own chess engine from scratch using rust!

Timeline

Ship 1

1 payout of shell 130.0 shells

Shivam Maurya

about 1 month ago

Shivam Maurya Covers 22 devlogs and 23h 17m

fixed a small issue with king movements and a failed attempt at transposition tables :(

Update attachment

corrected mistake in the castling logic (path of the king should not be attackable while castling)

Update attachment

The state now also efficiently keeps record of a hash representing the position (Zobrist hashing)
wasted a lot of time debugging only to find out javascript does not have a u64 type :/
Had to refactor a lot of already written code to make it work,
we will now use it make transposition tables next, which help prevent researching also searched positions

Update attachment

deployed a version on vercel, try it out!!

Update attachment

now uses alpha-beta pruning (negaMax) but it doesn't understand the difference between checkmate and stalemate now :(

Update attachment

fixed the checkmate issue!

Added position bonuses for the pieces and it is playing better no endless loops!
But it seems to give up right before checkmate LoL

finally!! moves show up on the site and we have got an incredibly dumb chess engine running :D

basic brute force search working (~depth 4 in 3s) but having a lot of trouble getting the engine moves to show up on the site ;(

Update attachment

mostly refactored the code,
implemented (very primitive) evaluation only based on the pieces present on the board

Update attachment

Pawn promotions ;)

can now set the board via FEN

Checking is in place!!
though very unoptimized right now will probably have to change the logic later

en passant 🥐

(semi-) valid moves!!

turn based moves but all moves are possible ;)

Pieces rendering

Update attachment

got the board rendering on the webpage

Update attachment

Setup basic structs and a way to Build states from fen strings and check there validity

Update attachment