From: sje@xylos.ma30.bull.com (Steven J. Edwards)
Newsgroups: rec.games.chess
Subject: Re: Endgamedatabases on CD-ROM wanted
Date: 27 Jul 92 15:29:00 GMT
Reply-To: sje@xylos.ma30.bull.com
Organization: Bull HN, Worldwide Information Systems, Billerica, Mass., USA

In article <1992Jul27.124651.1320@uni-paderborn.de> nick@uni-paderborn.de (Martin Koch) writes:
> a while ago there were some postings about endgame databases from
> K. Thompson on CD-ROM. Does anyone have the email adress of
> K. Thomson? How much does this CD cost? Any Infos wanted.
> Please send me an email, if possible.

Others might also be interested, so:

*From: fgg@gemini.gsfc.nasa.gov (Frank G. Gomez)
*Newsgroups: rec.games.chess
*Subject: K. Thompson's Endgame CDROM
*Date: 24 Sep 91 19:22:11 GMT
*Organization: NASA GSFC CDP VLBI
*Nntp-Posting-Host: gemini.gsfc.nasa.gov

Here is the information (Thanks, dss !):  

	This is from the "readme." file on the CD - the info you want
	is at the bottom:

This is a CDrom containing 5 piece chess endgames.
It has a one-level directory structure in ISO 9660 format.

The first file is this "readme" message.

Next is a source file "code.c" to show how to access the
data-bases. This is in ANSI C.

	This test program does NOT deal with the particular
	media that contains the data-bases. It calls the
	(missing) function "open" to get access to individual
	files. I suggest reviewing the UNIX system calls --
	open, close, seek, and read. The program also calls
	print (same as printf), exit, malloc, sprint and nrand.
	The last routine, nrand(int n), returns a pseudo-random
	integer between zero and n-1.

	If you get the program connected to the data-base, the
	output will be:

		0: 990
		opened Q_RB t2
		Kb2   990 999 990 999
		Kb1   990 990 990 990
		Kd1    91 990 990 990
		w: 91 Kd1
		b: 990
		bm[99] Kd1

		
		MOVE = Kd1


		43542176: 91
		Bb6   990 999  34 999
		Bc7   990 990  51  34
		Bd8   990 990  51  51
		Bb4   990 990  51  51
		Bc3   990 990  51  51
		Bd2   990 990  29  51
		Be1   990 990  36  51
		Rc5   990 990  18  51
		Rc6   990 990  51  51
		Rc7   990 990  53  51
		Rc8   990 990  53  53
		Rb4   990 990  56  53
		...

The file "posn" contains the starting
position and "best" play for a maximal position in each data-base.
For the pawn data-bases, there is a maximal position with a pawn
on 'a', 'b', 'c' and 'd' files. These will be helpful in debugging.

Then come the data-bases. The format is too complicated to describe,
but the programs should decode the data in a machine independent
way. The 'G' suffix in the names indicates the format. The name
consists of the White (strong side) pieces, '_' and the Black pieces.

	BB_N.G BN_N.G NN_N.G PN_N.G PQ_Q.G
	PR_R.G Q_BB.G Q_BN.G Q_NN.G Q_RB.G
	Q_RN.G Q_RR.G QB_Q.G QN_N.G QN_Q.G
	QQ_Q.G QR_Q.G QR_R.G RB_R.G RN_N.G
	RN_R.G RR_R.G 

Each file is a huffman encoded sequence of bytes. Each byte means
black-to-move and lose in some number of moves. The range of values
is as follows.

	0	Black does not lose. It could be a draw, Black
		win or even an illegal position.
	1-9	Not used.
	10	Btm and he is mated.
	11-49	Subgames -- btm and get mated in n-10.
	51-	All five pieces -- btm and convert to a
		subgame in n-50. For the pawn games, this
		will be a capture or promotion. The play
		after promotion is not contained in the
		pawn data-base, but all of the promotion
		data-bases are included.

Well, good luck. If this experiment is a success, I will generate
more CDroms covering all of the 5 piece games. The material here
is NOT copyrighted, but only a ratbag would copy it without
credit.

You may contact me for legitimate questions and especially
constructive criticism and feedback. Please contact me if
you use the data-bases for anything more interesting than
"best-play."

	Ken Thompson
	Room 2C519
	AT&T Bell Laboratories
	Murray Hill, NJ 07974
	USA
	...!research!ken
	ken@research.att.com
	+1 908 582-2394 office (rarely before GMT 1800)
	+1 908 582-5857 fax

 [The above opinions expressed are my own; not necessarily held by others.]
      == Steven J. Edwards           Bull HN Information Systems Inc. ==
      == (508) 294-3484              300 Concord Road         MS 820A ==
      == sje@xylos.ma30.bull.com     Billerica, MA 01821          USA ==
"That Government which Governs the Least, Governs Best." -- Thomas Jefferson
Newsgroups: rec.games.chess