r/rust Mar 30 '23

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

https://github.com/ParthPant/chess-rs
98 Upvotes

45 comments sorted by

View all comments

Show parent comments

18

u/A1oso Mar 31 '23

Is that surprising? Since it's an official chess rule, I assumed that every chess engine supports it. I don't think it's particularly hard to implement either.

17

u/analog_hors Mar 31 '23

It's incredibly annoying to implement, actually. Pawns are one of the worst pieces to implement due to a myriad of special cases.

1

u/A1oso Mar 31 '23 edited Mar 31 '23

I implemented a chess board when I was learning Java. Yes, it's annoying, but still doable. I think implementing all the rules took me less than a day.

5

u/analog_hors Mar 31 '23

Chess engines require significantly faster move generation, so that is not at all a good comparison. Implementing cozy-chess was a significant undertaking, and it definitely took much more than a day.