News for hackers. Stuff that matters.
Re:Sunfish: A simple but strong chess engine written in Python by thom on Saturday June 01, 2019 @05:31PM (#20071829)
This engine appears to have neither an interesting evaluation of positions, nor any of the performance tweaks that make traditional engines powerful. You're likely to learn more in an afternoon on https://www.chessprogramming.org, but all chess engines are beautiful in their own way, and I have certainly created nothing better.
Re:Sunfish: A simple but strong chess engine written in Python by thomasahle on Saturday June 01, 2019 @06:46PM (#20072203)
It actually has quite a few performance tweaks that make traditional engines powerful.

For starters:

- A 12x10 Mailbox board representation.

- Killer move heuristic.

- QSearch.

- Null move pruning.

- Move sorting based on captures and positioning.

- MTD-bi search.

- Mate testing based on king capture.

- Transposition tables.

The Chess Programming Wiki is a great place to learn more about all of these though.

Re:Sunfish: A simple but strong chess engine written in Python by Recursing on Saturday June 01, 2019 @05:49PM (#20071907)
It's not meant to be a competitive engine, after all, it's written in 111 lines of python.

I think it could be very useful for didactic purposes, or for getting started. Not having all the extra complexities needed for efficient board representation, position evaluation, move generation etc... makes the big picture much clearer imvho

Re:Sunfish: A simple but strong chess engine written in Python by thom on Saturday June 01, 2019 @05:53PM (#20071927)
Yeah, I totally agree that eval + search is the first step to learn, in terms of overall structure. And this includes lots of important concepts like quiescence search etc. I just think it's worth being honest: you either need really good eval or really fast search just to give _yourself_ a good game.
Re:Sunfish: A simple but strong chess engine written in Python by Recursing on Saturday June 01, 2019 @06:39PM (#20072150)
You are welcome to try to play my rust rewrite of this exact engine on lichess https://lichess.org/@/sunfish_rs

If you're not a top 5% player, it can absolutely give you a good game (especially on fast time controls)

Re:Sunfish: A simple but strong chess engine written in Python by thomasahle on Saturday June 01, 2019 @06:47PM (#20072211)
That is cool! I've thought about making a rust version of Sunfish, and I didn't even know this existed!