Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Funny project: Minimum legal chess

Author: Heiner Marxen

Date: 15:38:19 04/05/00

Go up one level in this thread


On April 05, 2000 at 14:08:01, Dann Corbit wrote:

>It might be funny to write the smallest possible chess program that produces
>legal moves for both sides.  If it plays against itself, it could have no I/O
>except to display the chosen moves.  It could more or less choose legal moves at
>random.  Basically, it could be nothing but a board representation, a move
>generator, and calls to rand().
>
>Can it be done in (for instance) ten lines of C?

Funny that you ask: I'm just about ready with an (n)awk script, that maps
a FEN string into a list of SAN moves and their corresponding FEN results.
I use this in a CGI script to look at some line of some given FEN.

Just now the script has 458 lines and 11KB, which could be shortened
heavily, since it is written in a human readable style.

But 10 (long) lines?  That would be another project, I suspect.
Although it might be fun :-)

Heiner Marxen   heiner@drb.insel.de     http://www.drb.insel.de/~heiner/



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.