History: History file for the SAN Kit

Revised: 1994.02.22


1992.08.23: (sje@world.std.com)

The original documentation and code in this package was written by Steven J.
Edwards long ago as an offshoot of a chess programming project.  It was brought
together in a set of routines and tested using the Mark Williams C compiler
under the Coherent operating system.  The C sources are written using K&R old
style C, but are easily converted to full ANSI.  The code has been tested on
both 16 and 32 bit systems and is believed to be generally portable.


1992.08.26: (sje@world.std.com)

A bug was reported in the routine SANMLScanMate in file sanmlm.c; a few lines
are needed in case the C implementation does not guarantee clearing automatic
variables.  Where the variable mate is set to one, the variable draw should be
set to zero; where the variable draw is set to one, the variable mate should be
set to zero.  Extraneous entries and the mysterious -f flag have been removed
from the Makefile.

About fifty people have received copies of the SAN Kit.  This is more than I
can track of by memory, so I am going to create a mailing list from the e-mail
addresses of the recipients.  If you have something of interest to the other
experimenters, send it to me with a Subject line of "SANKit ML:
<topic-of-message>" and I'll try to redistribute it.  No guarantee of
promptness, I'm afraid.


1992.09.20: (sje@world.std.com)

The project has been reorganized into a directory structure to allow for
further elaboration of support files.  Various minor enhancements have been
made to most of the source files.

The "set value" routines (sanval.c) have been corrected and expanded.  These
are intended for use only when setting up a position; they clear all previous
history information to prevent move retraction past a set up position.

The FEN (Forsyth Edwards Notation) processing module (sanfen.c) has been added.
Test suites (used by my program Spector) that use FEN are provided in the test
directory.  These currently include two files: 1: BK.comm: This is the famous
Bratko-Kopec test suite of twelve tactical problems and twelve lever problems.
This is well known in computer chessplaying research literature and still
undergoes revision from time to time.  2: WAC.comm: This is the even more
famous _Win at Chess_ test suite of three hundred tactical positions taken from
master games.  This has been used by researchers for about two decades and has
been floating around the net in various formats for years.  I have translated
it into FEN to help save others the mind numbing hours of retyping and
reformatting.  Nearly all of the famous research program efforts have published
their results on this test; my program Spector manages to solve 235 of the 300
at three minutes per move on a 33 MHz 486.  Big iron programs get nearly all of
them right while typical human amateurs are expected to solve about half of
them.  The material is based on the late Fred Reinfeld's book _Win at Chess_
published by Dover back in the 1940s.  Note that only the positions and key
moves are presented in the file; Reinfeld's commentary is copyrighted and so
should not be considered public domain (which is why it's not included).


1992.09.29: (ath@linkoping.trab.se)

A missing dereference in sanmlm.c is supplied.  A correction for black pawn
misplacement detection in sanmsc.c is performed.


1992.09.29: (sje@world.std.com)

The cpptrT type is correctly declared.  This type, like some other types and
definitions in the SAN Kit may not be used at present, but are reserved for
future use.  As such, these names should not be overridden by other developers.


1992.10.06: (sje@world.std.com)

The SANMemResize routine is changed to detect if realloc() moves allocated
storage while resizing it downward.  While it may be legal for realloc() to do
such, it is probably not a good idea to do so.  The change notes such unusual
behavior and terminates the program.  If this is a problem, it can be further
revised if enough people really want it adjusted further.

A new chunk of sample code has been added to the main program.  This
conditionally compiled sequence provides a sample game list reformatter
program.  It reads in a file of game paragraphs and reproduces these game by
game on an output file using an older GNUish notation.  Of course, the input
moves are flexibly decoded and tested for legality.  Other notations could be
substituted in this code template.  A sample input file is given in the test
directory as "game_list" and the results of conversion are placed in the file
"gnu_list".  Note that I do not recommend use of nonstandard notation; the
above reformatter is just a sample of what can be done for building general
reader programs.


1992.10.11: (sje@world.std.com)

All of the SAN C source files have been converted to use ANSI C prototypes for
both static and nonstatic functions.  Note that the header files have prototype
declarations as well, and that these include the formal parameter names as well
as their types.  All of the definitions were checked using the THINK C compiler
ANSI testing facilities.  This was done on a Macintosh Plus running System 7
software and represents my usual coding style.  My apologies to the K&R C
users; perhaps they may be more motivated to move towards the current standard.

Instead of version numbers, the version of the SAN Kit is given by the date in
the "revised" entry in the file sandef.h.  The SAN Kit has been successfully
ported to many different architectures, although a few had some minor problems
with implementation specific issues.  I hope that the ANSI prototyping effort
will handle these difficulties where they may still exist.  If some
experimenters are still having porting problems, please let me know and I will
try to help.


1992.10.31: (sje@world.std.com)

Several minor corrections have been made and the sandef.h definitions file has
been detabbed for better display on those systems that don't have tab stops at
every fourth column.

There has been a minor change in the move notation.  The use of a trailing
equals sign for drawing moves has been made optional instead of the default
standard.  It was felt by the developers that this brought SAN more into line
as the use of this drawing indicator was about the only questionably
nonstandard part of the notation generation.  The SAN Kit move decoding system
will still handle decoding of such moves correctly for those that choose to use
such drawing indicators.

The tag environment subsystem has been introduced.  This currently doesn't do a
great deal, but it does form part of the upcoming standardized ASCII game
recording import/export format.  The general export capability should arrive in
about a month and the general import facility should come about a month after
that.  Eventually, the toolkit game I/O will provide a universal standard for
ASCII game exchange among different chess software.


1992.11.02: (sje@world.std.com)

A few minor typographical corrections were made to the various text documents.


1993.01.28: (sje@world.std.com)

More typographical corrections along with expansions were made to the various
text documents.  Also, the release file tree has been changed.  Corrections to
memory allocation have been made to fix problems encountered on some platforms
(Commodore Amiga).  The SAN Kit mailing list has been discontinued in favor of
newsgroup traffic in rec.games.chess and other groups as appropriate.


1993.02.07: (sje@world.std.com)

Even more typographical errors in the text documents have been fixed.

The older file pair sanctl.c/sanctl.h has been split into the two file pairs
sanint.c/sanint.h (initialization) and santrm.c/santrm.h (termination).

The command processor has been added in the file pair sancmd.c/sancmd.h along
with the command dispatch target file pair sandci.c/sandci.h.  The contents of
the main.c file have been replaced with a simple command loop.


1993.03.07: (sje@world.std.com)

Even more typographical errors in the text documents have been fixed.

More diligent checking is being made from here on out for questionable C
programming practices such as unused variables and dubious initializations.

Two initializations are added to sanfen.c; one in the castling availability
parser and one in the en passant target square parser.  It is not clear why the
lack of either was not noticed in earlier testing.

A new file pair, sanpce.c/sanpce.h has been added to support command parameter
checking and evaluation.  These routines are mostly called by the targets of
the command dispatch.

A new file pair, sanopt.c/sanopt.h has been added to support run time boolean
program control options.


1993.04.07: (sje@world.std.com)

Many, many changes appear in this version; the C source now includes 70 files
for a total of about 10 K lines or about 182 K bytes.  Future releases with be
somewhat less expansive in nature and easier to digest.

There are now some 49 different commands, nearly all of which are fully
implemented.  Those not yet finished issue appropriate warnings when called.
These command implementations are found in the file sandci.c.  New commands may
be easily added.  The SAN command set forms the basis for the upcoming IPCC
(Inter Program Chess Communication) command standard.

The "help" command gives one line abstracts for each command and option.

Perhaps the most significant addition to the SAN Kit is the search strategy
selector modules (files sansel.c and sansss.c) and the associated strategy
modules.  The program allows one of several strategies to be chosen for each
player.  Each strategy is implemented by a separate, user written module.
Three modules are included: "eat" (file x_eat.c), "ran" (file x_ran.c), and
"scp" (file x_scp.c).  New strategies are easily integrated.  The "eat" playing
strategy is very simple.  It tries to either checkmate immediately or else to
capture the highest valued piece.  If no captures are available, it moves
randomly.  The "ran" strategy plays randomly.  The "scp" strategy, far from
being implemented, represents a port of the selection routines of the SCP
(Stanback Chess Program).  The SCP served as a basis for GNUchess from long
ago, and its basic search is being reimplemented using the SAN Kit interface
and manipulation routines for support.  Currently, the "scp" strategy plays
randomly, except if a mating move is available in which case the mate is
chosen.  Much more work is expected with the "scp" strategy module in the near
future.

Two of the new commands are "play" and "rtmv".  Both take an optional positive
integer argument (default value of one if not present).  The "play" command
causes the program to select and play the next N moves, stopping early if an
end of game is reached.  The "rtmv" command causes the program to retract the
previous N moves, stopping early if the beginning of history is reached.

Another command, "game", causes the program to select and play moves until the
end of the game.

The "srch" command searches for one or more target moves, but does not play the
result of the search.  It is not yet fully implemented.  When finished, it will
support benchmark test such as the BK and WAC sets included with the Kit.

There are some eight boolean program options.  One of these options, "emde",
replaces the old "edflag" variable; this option controls the extra move
disambiguation effort for SAN move decoding.  New options are easily added.
These options, like the command set, also help define the upcoming IPCC
standard.

The parameter checking routines have been expanded to include all possible
command actual parameter kinds (e.g., squares, colors, short integers).  The
tag subsystem has (finally) been integrated.

Tag values can be set, cleared, and displayed by use of the appropriate
commands.  Some unused tag manipulation routines were deleted.

The PGN (Portable Game Notation) report writer has been implemented in the file
sanpgn.c.  There are two main entries: one to produce a correspondence report
(player names, game score, and board display) and one to produce a standard PGN
format event report (Generic Seven Tag Format plus the game score).  These
reports may be written either to the display or to a designated file.  The PGN
file reader (file sanrdr.c) is now available.  It is able to parse PGN event
reports and store the information internally.

The newly implemented "tfgg" (translate files: games to games) command uses
both the PGN reader and the PGN writer to translate and otherwise compile large
collections of games.  The "tfgv" command reads PGN games and produces Lisp
style data text.

A nasty deallocation bug with command token storage has been fixed.

Numerous files in the SAN_DOC directory have been revised; some of the older
items have been removed.  The file pair sanclk.h/sanclk.c has been introduced
to handle the upcoming clock related development.  The file pair
sangtc.c/sangtc.h is added to support game termination codes.  The file pair
sansrt.h/sansrt.c has been added to handle move list sorting.

Move generation has been changed to not use dynamic memory allocation for each
call; this is expected to speed operations on most platforms.

The kit now keeps track of material sums for each side.  Also for each side: a
piece count vector (plnv) and a piece location vector (plv); a square-to-index
vector (biv) is used to index the piece location vector given an occupied
square coordinate.  These items are expected to help considerably with writing
chess move selector modules.

The documentation files have been reformatted for better fit with eighty column
output devices.  The PGN (Portable Game Notation) files FS2.pgn
(Fischer/Spassky II) and RJF60.pgn (Fischer's "60 Memorable Games") have been
included in the documentation directory.  These are given as examples of the
information needed to produce game data files for the MGR (Master Game
Repository) archive project.

The file gc.c is included as a sample program that sorts PGN data files output
from SAN Kit.

The SAN Kit now has a default command initialization file.  If the text file
"ci.txt" is present at start-up, the kit will read from it and execute the
commands within.  A sample ci.txt file is supplied in the documentation
directory.  The package now supports game termination marker input.  Usual game
termination markers include "0-1", "1-0", and "1/2-1/2".  These may be entered
when a move is expected and so acts to terminate the game.  A marker can later
be cleared by the "cvgt" command.


1993.04.28: (sje@world.std.com)

The file "Manifest" has been added to the documentation directory; it gives a
brief description of each of the documentation files.

Some storage allocation corrections have been made to the PGN game sorting
program gs.c in the documentation directory.

New material has been included for further integration of search strategies.
The file sansss.c contains information about integrating these and any new
strategies.  Also, the file "Integration" in the documentation directory is now
present; this gives a step-by-step method for selector module integration.
There are now five different search strategy modules, each of which has its own
name, playing style, and implementation.  More information about these can be
found in the family of files with names of the form "x_???.[hc]" where "???" is
the three letter strategy mnemonic label.  Some of these strategies are not yet
fully implemented.

Strategies:

* eat: A simple strategy that loves to eat opponent's pieces.

* gtp: A reincarnation of the Gillogly TECH program.  (Under development.)

* ran: Select a move randomly.

* sc0: An internal implementation of the 1987 Stanback Chess program using the
SAN Kit routines for all functions except search and evaluation.  (Under
development.)

* sc1: An external implementation of the 1987 Stanback Chess program that uses
only a few SAN Kit routines for bidirectional translation of passed data.
(Under development.)

Some of the example files in the documentation directory have been deleted to
save space.  These include the PGN listing of the Fischer-Spassky return match
and the old main program that contained sample calling sequences.  The ICCA
file in the documentation directory has been updated.  The file "FEN" has been
added to the documentation directory; it has a complete specification for
Forsyth-Edwards Notation.  The file "PGN" has been added to the documentation
directory; it will soon have a complete specification for Portable Game
Notation.  The file "SAN" has been added to the documentation directory; it has
a complete specification for Standard Algebraic Notation.

Although it may not have been a problem for many, the use of the toupper and
tolower macros has been brought into strict compliance with the ANSI standard.
This correction covers those cases where use of either of the above two macros
on a non-alpha character argument is undefined.

The "auto" command has been introduced.  This command is designed for use with
the Uniform Platform Chess Tournament (UPCT) chess program communication system
as given by Don Beal.  This should help encourage entries into the annual UPCT
event.  At a later date, this command will be supplanted by the IPCC (Inter
Program Chess Communication) subsystem; the change will not affect properly
implemented chess strategy modules.

The "srch" command has been fully implemented.  This command uses the newly
supplied string list management routines found in the new file sanslm.c.  The
city of Portoroz has been moved from Spain to Yugoslavia; this site had been
incorrectly given in an earlier version of the RJF60.pgn games file.


1993.05.16: (sje@world.std.com)

Numerous revisions were made to the text files in the documentation directory.
The option "namd" (no auto move display) is added.  It is similar to the "nabd"
(no auto board display) option; it suppresses the usual display of played and
unplayed numbered SAN move output.


1993.08.29: (sje@world.std.com)

After a considerable hiatus, work resumes on the Kit.

The major addition is the file pair sanhsh.h/sanhsh.c which implement a hash
code facility.  The idea is to demonstrate an integrated hash generation
algorithm that is both fast and portable.  The hash subsystem provides, for any
given chess position, a 32 bit hash address code and a 32 bit hash signature
code.  Furthermore, the codes for a given position remain unchanged between
separate invocations of the Kit, so it is possible to store codes as table
entries in a persistent fashion.

The hash subsystem provides an important part in the following future features:

* High speed position repetition detection

* High speed opening library access with a full transposition facility

* Transposition table indexing

The documentation file "Suffixes" has been added to describe file name suffix
conventions.

The C source program "srch.c" has been added to the documentation directory.
This program reads "srch" dribble files and produces comprehensive statistical
reports of program performance.

The file "Preview" in the documentation directory gives some information about
work in progress.

The BK.ci and WAC.ci test suites have been updated.  Copies of these and other
test suites in the same format can be found in at the ftp site chess.uoknor.edu
[129.15.10.254] in the directory /pub/chess/SAN_testsuites.


1993.09.24: (sje@world.std.com)

Incremental updates of castling and en passant hash code processing have been
added to the sanmer.c module along with a correction for updates for regular
moves.

The new command "dvhg" has been added; it is used to display the raw table data
used to generate hash codes.  Naming of the hash codes have been changed
slightly; the two 32 bit codes are called the "HAC" (hash address code) and the
"HSC" (hash signature code).  The command "dvas" is used to display the current
values of both.

The active color indicator letter in FEN routines is now generated as lower
case output instead of upper case.  This is the convention used for both board
display and the "svsq" (set value: square) command.

The castling availability indication in FEN routines for an empty castling
availability has been changed from "nil" to "-" due to popular demand.

The en passant target square indication in FEN routines for an empty en passant
target square has been changed from "nil" to "-" due to popular demand.

The SAN Kit has now been tested under the Linux operating system using the gcc
2.4.5 compiler.


1993.12.05: (sje@world.std.com)

The documentation directory contains a significantly expanded version of the
PGN (Portable Game Notation) specification document.  This document also
contains a version of the SAN specification as well.  Some slight changes in
the earlier PGN format have been made; these have been reflected in an updated
version of the sample RJF60.pgn file.

With the arrival of new document processing software (Nisus Compact and QUED/M)
and a Macintosh PowerBook for running them, the overall quantity and quality of
the documentation is expected to improve over time.

Although not part of the SAN Kit, the SAN/FEN test suite initiative continues
with new files for chess researchers.  These are available from the ftp site
chess.uoknor.edu in the pub/chess/SAN_testsuites directory.


1994.02.22: (sje@world.std.com)

Most of the files that used to be in the documentation directory have been
merged with the PGN (Portable Game Notation) "Standard" file.  This file is
also available as the file "Standard" in the pub/chess/PGN directory at the
chess.uoknor.edu ftp site.  This latter copy of the file tends to be updated
more frequently than the copy in the SAN Kit documentation directory.

The directory "SAN_MSC" has been added to hold non-source text files that
aren't part of the documentation.

Work on the PGC (PGN Coded Binary) format has begun; the file pair used for its
implemenation is "sanpgc.[ch]".


History: EOF
