Author: Robert Hyatt
Date: 07:00:57 05/16/01
Go up one level in this thread
On May 16, 2001 at 02:02:44, Andy Serpa wrote: >On May 15, 2001 at 21:33:31, Robert Hyatt wrote: > >>On May 15, 2001 at 18:34:59, guy haworth wrote: >> >>>No, it's ok. >>> >>>Per position of the two Kings, the index is an n-cube where 'n' is the number of >>>types of pieces after the King ... and where the length of each dimension can be >>>worked out based on the type of piece and the number of them (and the positions >>>of the two Kings). >>> >>>You also need to know the order in which pieces are 'placed' on the board after >>>the Kings to make up the position you are looking at. >>> >>>The formulae are in the paper - and eminently computable: no combinatorics >>>required. >> >> >>The thing that tripped me up was the illegal positions that get squeezed out >>serially. IE place the two kings, then when you place the third piece, there >>are squares that are not allowable for it. Ditto for the fourth and then the >>fifth. I couldn't think of any quick way to go backward... it seemed easier >>to enumerate positions, encode and see if the index maps to the entry you want >>to find the position for. > > > >Hmmm... > >Sounds too complicated. I was basically looking for a way to grab random >positions out of the tablebase, but I guess I need to generate a random >position, make sure it is legal, and then query the tablebase. Of course, I >don't know how to do the query either -- is that documented somewhere or do I >need to figure it out from looking at C code (which I am not good at)? > > >Andy Serpa The code to probe is provided in the tablebase generator source code, all you have to do is fill in a few blanks and call it...
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.