[Haskell-cafe] Haskell and AI

Andrew Wagner wagner.andrew at gmail.com
Mon Mar 19 21:00:30 EDT 2007

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

On 3/19/07, Andrew Wagner <wagner.andrew at 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 at gmail.com> wrote:
> > > From: "Andrew Wagner" <wagner.andrew at 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.html
> >

More information about the Haskell-Cafe mailing list