From: Summer Thomas
Subject: connect four
Date: 
Message-ID: <36CA6EE6.DEC0D8C7@home.com>
Hi all,

Has anyone ever designed the game connect 4 in Lisp. A friend of mine
wrote one in Java, and asked if it was possible to write on in
Lisp(minus the cool graphics). I have just started coding in Lisp, to
learn another language.
Any ideas on where I would start. I would like to stick to just the very
basic lisp commands, and to only use one or two variables (to hold
current state).
If anyone has any ideas, I'd appreciate them. No rush, this is just
something I would like to try. Now it is sort of a challenge.

                                    Thanks Summer

From: Lieven Marchand
Subject: Re: connect four
Date: 
Message-ID: <7ahnbh$hfj$1@nickel.uunet.be>
Summer Thomas <········@home.com> writes:

> Hi all,
> 
> Has anyone ever designed the game connect 4 in Lisp. A friend of mine
> wrote one in Java, and asked if it was possible to write on in
> Lisp(minus the cool graphics). I have just started coding in Lisp, to
> learn another language.

*sigh* Why shouldn't it be possible to write connect 4 in Lisp? It is
possible in Ada, Basic, C, Delphi, Eiffel, Fortran, ... and any other
Turing complete language. It is problably possible in vi or m4
macros. You can even have the cool graphics ;-) (in Lisp that is)

> Any ideas on where I would start. I would like to stick to just the very
> basic lisp commands, and to only use one or two variables (to hold
> current state).

This start to sound suspiciously like a homework problem. Why would
you care how many variables get used?

> If anyone has any ideas, I'd appreciate them. No rush, this is just
> something I would like to try. Now it is sort of a challenge.

Oh, yes, tree searching. It's a great challenge to do that in Lisp. No
one has ever used Lisp for that before.

Seriously, you can look up the paper that describes perfect play
(beginner wins) and implement that or you can implement a
search. Define an object that can hold a configuration of play, a
function that can generate all possible new configurations from an old
one. Construct the game tree (preferably lazily) and do an alpha-beta
search with a heuristic or a full search. As an alternative to
constructing the tree you could consider backtracking.

-- 
Lieven Marchand <···@bewoner.dma.be> 
------------------------------------------------------------------------------
It was six months of C++ that made me determined to find something else to do 
with my life. #:Eric Naggum 
From: Rainer Joswig
Subject: Re: connect four
Date: 
Message-ID: <joswig-1802992027070001@pbg3.lavielle.com>
In article <············@nickel.uunet.be>, Lieven Marchand <···@bewoner.dma.be> wrote:

> Seriously, you can look up the paper that describes perfect play
> (beginner wins) and implement that or you can implement a
> search. Define an object that can hold a configuration of play, a
> function that can generate all possible new configurations from an old
> one. Construct the game tree (preferably lazily) and do an alpha-beta
> search with a heuristic or a full search. As an alternative to
> constructing the tree you could consider backtracking.

For a description implementing something like "Othello"
in Lisp, see Peter Norvig's book "Paradigms of AI Programming".

-- 
http://www.lavielle.com/~joswig
From: Reini Urban
Subject: Re: connect four
Date: 
Message-ID: <36CC9892.4510485@sbox.tu-graz.ac.at>
btw, just download the free personal version of LWW 
(lisp works for windows) which includes othello 
with full source code and BETTER graphics than with java!)

http://services.harlequin.com/lisp/lww.nsf/RegistrationPersonal?OpenForm

Rainer Joswig wrote:
> For a description implementing something like "Othello"
> in Lisp, see Peter Norvig's book "Paradigms of AI Programming".

--
Reini
From: Christopher R. Barry
Subject: Re: connect four
Date: 
Message-ID: <87n22bndbv.fsf@2xtreme.net>
Reini Urban <······@sbox.tu-graz.ac.at> writes:

> btw, just download the free personal version of LWW 
> (lisp works for windows) which includes othello 
> with full source code and BETTER graphics than with java!)

"BETTER graphics", huh? So tell me Reini, why's that? 

Christopher
From: Neil Cohen
Subject: Re: connect four
Date: 
Message-ID: <ncohen-2002990755460001@isdn5-33.ip.realtime.net>
In article <············@nickel.uunet.be>, Lieven Marchand
<···@bewoner.dma.be> wrote:
> 
> Seriously, you can look up the paper that describes perfect play
> (beginner wins) and implement that or you can implement a


 I believe Victor Allis solved Connect four, but it hadn't been solved as
of the date of his disseration, in 1994.
From: Lieven Marchand
Subject: Re: connect four
Date: 
Message-ID: <7b1f45$t54$1@xenon.inbe.net>
······@bridgetrix.com (Neil Cohen) writes:

> In article <············@nickel.uunet.be>, Lieven Marchand
> <···@bewoner.dma.be> wrote:
> > 
> > Seriously, you can look up the paper that describes perfect play
> > (beginner wins) and implement that or you can implement a
> 
> 
>  I believe Victor Allis solved Connect four, but it hadn't been solved as
> of the date of his disseration, in 1994.

He did, but he solved it in his Masters thesis in 1989. I remember
hearing about the result in 1990. You can get his thesis from his home
page.

-- 
Lieven Marchand <···@bewoner.dma.be> 
------------------------------------------------------------------------------
It was six months of C++ that made me determined to find something else to do 
with my life. #:Eric Naggum 
From: Rainer Joswig
Subject: Re: connect four
Date: 
Message-ID: <joswig-1802990016510001@194.163.195.67>
In article <·················@home.com>, Summer Thomas <········@home.com> wrote:

> Hi all,
> 
> Has anyone ever designed the game connect 4 in Lisp. A friend of mine
> wrote one in Java, and asked if it was possible to write on in
> Lisp(minus the cool graphics).

It is possible *with* cool graphics.

-- 
http://www.lavielle.com/~joswig