
Using Haskell to debug a C chess engine - mrkgnao
http://www.michaelburge.us/2017/09/27/delta-debugging-in-haskell.html
======
nandemo
Personally, I think an engine written in Haskell would be more interesting.
Given how ridiculously strong some engines are when running on commodity
hardware, a little performance hit wouldn't be the end of the world.

~~~
MichaelBurge
I probably won't do an article on it, but I did have a couple-years old Shogi
engine in Haskell:

Implementation:
[https://bitbucket.org/MichaelBurge/shogi/src/f2370832b328ae1...](https://bitbucket.org/MichaelBurge/shogi/src/f2370832b328ae16e56681fe4123d6912299b1b4/src/Shogi/Rules.hs?at=master&fileviewer=file-
view-default)

Tests:
[https://bitbucket.org/MichaelBurge/shogi/src/f2370832b328ae1...](https://bitbucket.org/MichaelBurge/shogi/src/f2370832b328ae16e56681fe4123d6912299b1b4/tests/Tests/Shogi/Rules.hs?at=master&fileviewer=file-
view-default)

The code & style are pretty similar between the Haskell and the C. I found the
C easier to write: The C engine was written and debugged within about 3 days,
while the Haskell Shogi engine has a couple weeks of commits.

~~~
thomasvarney723
Why do you think the C was easier to write?

~~~
mrkgnao
I looked a few things up after Michael's post, and it seems there are a lot of
resources and codified idioms around writing chess engines in C. (E.g. tons of
bit-twiddling hacks, many related to the fortuitous existence of 64-bit
integers. [Not that you can't do those in Haskell.])

------
icantrank
do it with checkers

