Amateur chess engine programmer checking in. Very cool. A few suggestions:
Add a transposition table, you should get an enormous speed boost with barely any work (it's kind of surprising that it does anything at all in any reasonable amount of time without it).
Don't bother with MTD(f) -- there's no benefit over PVS. Even your plain alpha-beta should be sufficient, assuming you add transposition tables.
If you add quiescence search, you'll beat Sunfish one hundred times out of a hundred, no matter what your evaluation function. Sunfish isn't even the "hello, world" of chess programming, it's missing crucial parts.
Finally, the FICS dataset is not the best idea, I think -- it consists of very poor quality games for the most part (beginners playing blitz). The best free option would be MillionBase, most of those are tournament games under classical time controls. It's a much smaller dataset, but not nearly as noisy, and ~2mil*80 or whatever positions is still a pretty decent amount of data.
How does one go from following articles on reddit to being a chess engine programmer? Serious question.
I'm okay at programming and math with minimal background in Stats/ML/AI. I tried going by looking up unfamiliar terms (like alpha-beta pruning and PVS), but it gets out of control so fast...
You should look up blog posts on general min-max alghoritm (or negamax version) then add alpha-beta pruning and then you can move to different methods that are often found in chess engines: quiescence, null-move, board representation, hash tables ... Someone posted series of video tutorials on this topic recently: https://www.youtube.com/watch?v=bGAfaepBco4
In my case it didn't have much to do with articles on reddit -- I've been programming and playing chess for most of my life, so it was a pretty natural thing to try out.
The Chess Programming Wiki is an invaluable resource, contains just about every notable technique in existence. The programming forum on the Computer Chess Club is an excellent community, some of the smartest people in the field post there.
Other than that, it's like any other field -- just have to dig in.
30
u/goltrpoat Dec 02 '14
Amateur chess engine programmer checking in. Very cool. A few suggestions:
Add a transposition table, you should get an enormous speed boost with barely any work (it's kind of surprising that it does anything at all in any reasonable amount of time without it).
Don't bother with MTD(f) -- there's no benefit over PVS. Even your plain alpha-beta should be sufficient, assuming you add transposition tables.
If you add quiescence search, you'll beat Sunfish one hundred times out of a hundred, no matter what your evaluation function. Sunfish isn't even the "hello, world" of chess programming, it's missing crucial parts.
Finally, the FICS dataset is not the best idea, I think -- it consists of very poor quality games for the most part (beginners playing blitz). The best free option would be MillionBase, most of those are tournament games under classical time controls. It's a much smaller dataset, but not nearly as noisy, and ~2mil*80 or whatever positions is still a pretty decent amount of data.