Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Symbolic: The KBNK recognizer

Author: Steven Edwards

Date: 21:44:45 02/24/04

Go up one level in this thread


On February 23, 2004 at 15:20:30, Dan Andersson wrote:

> I wonder if you see yourself implementing a Chess DSL in LISP, or implementing
>Chess Primitives in LISP? It might seem a trivial distinction. But I'm
>interested in your outlook.

Symbolic is implemented in ChessLisp, a subset of Common Lisp plus a couple of
hundred chess specific intrinsics.

The ChessLisp interpreter and all of its intrinsics are implemented using ANSI
C++ and the Chess Toolkit.

The Chess Toolkit is implemented using ANSI C++ and assumes POSIX support.

There is an executable file named "Symbolic"; it is a product of C++ compilation
of the Chess Toolkit and a driver main program.  When the file is started, it
boots a copy of the toolkit (class CTK).  Then, it tells the toolkit to create a
user command processor thread (class CTCommProcTask), and this thread manages
all of the user interaction and many other things.

When a non-trivial move selection is needed, the toolkit fires up a separate
thread of the class CTCogSearchTask.  This thread then creates an instance of
the class SyEnv (the ChessLisp interpreter), and then tells that instance to
load itself with Symbolic's ChessLisp source.  Finally, the CTCogSearchTask
tells Symbolic via the interpreter to select a move, and this starts the main
body of Symbolic.

All of this, except for the one-time toolkit initialization, currently takes
less than a second on a modest computer.

After Symbolic picks a move, the move is returned to the CTCogSearchTask thread
which in turn returns it and some statistics data to its caller.  The
CTCogSearchTask instance then tears down all the stuff that got created and
exits, while its caller (the CTCommProcTask  instance) displays the move to the
user.

It would be possible to eliminate the toolkit by writing all of the user
interface and other support routines in Common Lisp and writing a Common Lisp
version of the ChessLisp intrinsics.  The result of the effort could be ported
to any Common Lisp environment, although even a compiled version of this would
almost certianly run much slower than the ChessLisp equivalent.



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.