I agree with Andrew Wagner re: Haskell and AI. There are some relevant resources on Haskell, Maths, and Logic: *The Haskell Road To Logic, Maths And Programming (Paperback) * by Kees Doets <http://www.amazon.com/exec/obidos/search-handle-url/103-5196905-1677457?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Kees%20Doets> (Author), Jan van Eijck <http://www.amazon.com/exec/obidos/search-handle-url/103-5196905-1677457?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Jan%20van%20Eijck> (Author) http://www.amazon.com/Haskell-Road-Logic-Maths-Programming/dp/0954300696/ref... van Eijck has another book on Computational Semantics. Elsewhere, there is work on learning algorithms in Haskell. Broadly, we might start by gathering known resources, projects, and people. We could consider one of the standard AI books as a guide for chapters, sections, and problems to fill in with Haskell approaches. I'd be very interested to contribute to this. Cheers, Adam Wyner Message: 7 Date: Mon, 19 Mar 2007 12:51:19 -0400 From: "Andrew Wagner" <wagner.andrew@gmail.com> Subject: Re: [Haskell-cafe] Haskell Chess To: haskell-cafe@haskell.org Message-ID: <b8a8636e0703190951y21c7cb01qcb4f5b58089b169d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Here's my take on this: I've thought for a while now that Haskell needs a general toolkit for AI. After all, functional programming has long been recognized for being good at AI, yet you rarely hear about it being done in Haskell. Anyway, my suggestion would be to concentrate on methods of AI. For example, if we implement alpha-beta polymorphically enough, it should be trivial to use it for any game that it makes sense to use it on. This kind of thing is what I was thinking of when I talked about some "fundamental design" ideas I had. Things like writing a Board type-class, so that you can implement any board representation you want to for chess. Or writing alpha-beta in terms of positions and moves, regardless of what kind of game you're talking about (I also think you simply must use unfoldTree, as this is a beautiful instance of it). Things like learning, and other general strategies, should be developed independently of any particular game, IMHO.
From: "Andrew Wagner" <wagner.andrew@gmail.com>
After all, functional programming has long been recognized for being good at AI, yet you rarely hear about it being done in Haskell.
A small observation that might or might not be useful for implementing game AIs: 2 player games and their strategies form a monad in a non-trivial way. http://sigfpe.blogspot.com/2006/10/games-strategies-and-self-composition.htm...
Hi Dan, I just made the connection between you and your blog, by the way - great stuff, keep it up. This particular blog is fascinating, too, but I'm not sure how useful it is to look at more complex 2-player games this way. I'll have to think about it some more On 3/19/07, Dan Piponi <dpiponi@gmail.com> wrote:
From: "Andrew Wagner" <wagner.andrew@gmail.com>
After all, functional programming has long been recognized for being good at AI, yet you rarely hear about it being done in Haskell.
A small observation that might or might not be useful for implementing game AIs: 2 player games and their strategies form a monad in a non-trivial way. http://sigfpe.blogspot.com/2006/10/games-strategies-and-self-composition.htm...
Ok, I've done some more thinking about this. I think the primary difference between the games you cited in your article, and more complex games is that for more complex games, it's easier to think of a strategy as a function of the current board position, rather than the moves leading up to it. For games like Nim, it's not so hard to characterize the moves made thus far, and devise a strategy. Take chess for an example of a more complex game though. Let's just consider a couple of moves from the starting position (I'll assume you know or can work out the meaning of this basic notation). f2-f3, e7-e5, g2-g4. Now black has a mate-in-1 he can play: d8-h4#. This is relatively trivial to see from the given position - yet the 2 main pieces involved in the mate (the black queen and white king) haven't even been moved yet, and it's not at all easy to see just what the given moves have to do with the mate. It's much easier if you take the original position, make the moves, and then create a strategy that is a function of the current position. So, while I'm not necessarily disagreeing with anything you said in your article, I'm just not sure this is a viable way to model game-playing strategies for non-trivial games. I'd definitely like to hear more of your thoughts on this though. Thanks for all your great work! On 3/19/07, Andrew Wagner <wagner.andrew@gmail.com> wrote:
Hi Dan, I just made the connection between you and your blog, by the way - great stuff, keep it up. This particular blog is fascinating, too, but I'm not sure how useful it is to look at more complex 2-player games this way. I'll have to think about it some more
On 3/19/07, Dan Piponi <dpiponi@gmail.com> wrote:
From: "Andrew Wagner" <wagner.andrew@gmail.com>
After all, functional programming has long been recognized for being good at AI, yet you rarely hear about it being done in Haskell.
A small observation that might or might not be useful for implementing game AIs: 2 player games and their strategies form a monad in a non-trivial way. http://sigfpe.blogspot.com/2006/10/games-strategies-and-self-composition.htm...
participants (3)
-
Adam Wyner -
Andrew Wagner -
Dan Piponi