Author: Steven J. Edwards
Date: 15:28:37 05/18/99
Go up one level in this thread
On May 15, 1999 at 14:15:33, James Robertson wrote: >I have written a function that parses Nf3 type notation (what is it called? I >forget) beautifully, but... it sometimes thinks certain non-moves are moves. Is >there any place I can download a function that does this flawlessly so I can see >how it works? Standard Algebraic Notation (SAN) is used in the PGN and EPD specifications to denote chess moves. Only legal moves have well-defined notation. Sample code for SAN generation can be extracted form the file epd.c in the Crafty source distribution (among other places). There is also a SAN Kit (SAN.tar.gz and variants) which resides at a number of sites (try a search). Generating correct SAN for a position first requires a move generator that outputs no more and no less than the complete (legal) move set. Once this is done, it is fairly easy to generate the move notation strings. Of greater interest is the process by which non-SAN input is mapped onto the the generated move set. Various approaches are available ranging from "exact strgin matches only" to "minimum Hamming distance". A user should be given some leeway, but care is needed to avoid allowing misadventant entry of ambiguous move strings. -- Steven
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.