[Haskell-cafe] Re: Code from "Why Functional Programming Matters"

Rene de Visser Rene_de_Visser at hotmail.com
Mon Sep 3 16:47:08 EDT 2007


"Andrew Wagner" <wagner.andrew at gmail.com> schrieb im Newsbeitrag 
news:b8a8636e0709031235p10ef93d8i28ce3b0b571878d8 at mail.gmail.com...
> current position (or, even more ideally, the so-called "principal
> variation", which is the best series of moves from the current
> position). Is there a good way to collect this, without mapping some
> sort of function over the tree that puts a list of moves on every node
> too?
>
> Hughes seems to completely ignore this, and I wonder if it's because
> it gets ugly to implement.

While Hughes code looks nice, the more efficient you make your search the 
uglier it is going to be (at least with my Haskell skills)
In reality you will at least want iterative deepening and principle 
variation search.

I posted code for PVS (ugly code)
http://www.haskell.org/haskellwiki/Principal_variation_search

I thought I had some code doing iterative deepening based on this, but it 
looks like I lost it somewhere.

If you want to use hash tables, history, killer moves, etc. Then I think you 
are going to have to monadize everything.

It is a pity that Hughes doesn't demonstrate adding some of these things. 
Maybe it is possible using arrows? (without making everything look like C, 
which would be my solution).

Rene. 





More information about the Haskell-Cafe mailing list