Author: Matthew Hull
Date: 08:16:15 03/13/04
Go up one level in this thread
On March 13, 2004 at 01:11:27, Steven Edwards wrote: >Symbolic: Progress report 2004.03.13 > >This past week saw a couple more hours of progress with Symbolic. As planned, >the effort was concentrated on fully automating and integrating the Lisp >interpreter (class SyEnv) with the toolkit's CTCogSearchTask class. This has >been accomplished, although the required work was a bit more than anticipated as >a few unforeseen subtleties with I/O stream switching caused some problems. > >The idea here is that the toolkit has to do the following for each position to >be handled by Symbolic: > >1. Create an instance of the SyEnv class (the ChessLisp interpreter) with the >proper stream and other constructor parameters. This completely initializes the >interpreter and takes less than 100 ms on a 700 MHz laptop. > >2. Boot Symbolic's Lisp code (a dozen or so Lisp source files) via the stream >interface. This is done by sending a ostrstream object containing a call of the >booting intrinsic "Boot". The actual Lisp expression is: > > (prog0 (Boot)) > >with the intrinsic "prog0" which evaluates its subforms in order, once, and >returns no value. It is a shorter alternative for: > > (progn (Boot) (values)) > >The prog0 intrinsic is an invention of mine and is a useful way of indicating >that no value is returned. All of the SyEnv/CTCogSearchTask text stream >interface calls use this as results, if any, are returned via Lisp stream output >during Lisp evaluation and not by Lisp printing the results of an evaluation. >This is a fine point and is really only important when calling Lisp from other >than an interactive interface. > >The (prog0 (Boot)) completely initializes Symbolic and takes less than 250 ms on >a 700 MHz laptop, although this number will surely increase as Symbolic's Lisp >code grows. > >3. Create and initialize a Lisp global symbol via the stream interface; this >symbol is the sole input parameter to Symbolic and also the sole output value. >The Lisp looks like: > > (prog0 (setf CSOptSym nil)) > (prog0 (setf CSFEN "the-current-position-FEN")) > (prog0 (setf CSHistory nil)) > (prog0 (push (HashDecode "hex-string-with-hash-1") CSHistory)) > > [One of these for each consecutive previous non capture/non pawn move] > > (prog0 (push (HashDecode "hex-string-with-hash-N") CSHistory)) > (prog0 (putprop 'CSOptSym 'FEN CSFEN)) > (prog0 (putprop 'CSOptSym 'History (reverse CSHistory))) > > [Option value passing details omitted] > > All of this takes less than 10 ms on a 700 MHz laptop. > >4. Launch Symbolic with: > > (prog0 (Symbolic 'CSOptSym)) > >5. Get the result move with: > > (prog0 (format t "%u" (getprop (getprop 'CSOptSym 'SelectedMove) 'SAN))) > >6. Get other search results; details omitted. > >The only remaining subtasks with the integration are the automated recovery of >the PV and perhaps some search statistics via the SyEnv/CTCogSearchTask text >stream interface. > >For the next week, I hope to put in some more work on the narration facility. >Alas, health issues are a permanent limiting factor here and that makes it hard >to predict how long (in calendar terms) any particular subtask will take. I am >also venturing on relatively untrodden paths and the signposts are few. > >The road is long. I read your progress reports with great interest. Thanks for sharing.
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.