Claus Reinke wrote:
Do you have an example of a mutable state/ IO bound application, like,
hmm, a window manager or a revision control system or a file system...?

If you're looking for a challenge, how about this one (there used to
be lots of Haskellers into this game, any of you still around?-):

http://computer-go.org/pipermail/computer-go/2008-October/016680.html

[ catching up with old haskell-cafe email ]

Interestingly, I did this a while ago.  Here's my results:

$ ./Bench 1 100000
b: 14840, w: 17143 mercy: 67982
elapsed time: 3.42s
playouts/sec: 29208


so, nearly 30k/sec random playouts on 9x9. That's using a hack that stops the game when the score is heavily in favour of one player, it drops to around 20k/sec with that turned off.

Not bad, but probably I'd guess an order of magnitude worse than you can do in tightly-coded C. The Haskell implementation isn't nice, as you predicted. Also the code is derived from some non-free internal MS code, so unfortunately I can't share it (but I could perhaps extract the free bits if anyone is really interested).

W wins slightly more often I think because komi 5.5 on a 9x9 board is a tad high.

It does parallelise too, of course:

$ ./Bench 8 100000 +RTS -N8
b: 14872, w: 17488 mercy: 67584
elapsed time: 1.00s
playouts/sec: 99908

though still room for improvement there.

Cheers,
        Simon
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to