Question: Polyglot books and Chess960

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
hgm
Posts: 26437
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Question: Polyglot books and Chess960

Post by hgm » Sat Dec 27, 2008 11:02 pm

But I cannot imagine what you have in mind that would need 32 keys, so I cannot judge if it is simple. In fact it makes me suspect that it must be very contrived. Imagine a ye of FEN where you would not only need the letters A-Ha-h to indicate castling rights, such as in Shredder FEN, but also I-Pi-p (32 letters total). It is hard to imagine how that could be simple.

What I have in mind I know to be simple:

There is a white and a black key for each board file, and if Rook on that file has castling rights, the corresponding key is ORed into the hash key.

What could be simpler?

Michel
Posts: 2236
Joined: Sun Sep 28, 2008 11:50 pm

Re: Question: Polyglot books and Chess960

Post by Michel » Sun Dec 28, 2008 4:54 am

You have a word of 4 letters chosen from a-h (or empty). So 4x8=32. This is like the current situation where you represent a word of 4 bits by 4x1 keys.

But i already said I agree to 16.

But you said you would want to reduce it further since every file indicator can take only 5 values (apart from kqKQ). So you need only extra 10 keys. I was objecting to that. I am sure you can reduce 10 even further but I don't see the point.

Michel

User avatar
hgm
Posts: 26437
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Question: Polyglot books and Chess960

Post by hgm » Sun Dec 28, 2008 7:59 am

You must have misunderstood me: I am not aware I ever proposed something with less than 16 keys (KQkq = HAha, plus 12 new for B-G and b-g). I don't even see how this could be done, anda gree hat it would be pointless. So I am happy with the 16-key solution.

I was wrong in sating that XFEN nd Shredder would be the same in a language where King is spelled with H nand Queen with A, though. They are only the same then for poitions where the Rooks start in the corners.

This shows that there is an altenative way to define a FEN standard for Chess960 that offer backwards compatibility for normal Chess than XFEN:

Only use KQkq for Rooks on the edge files, (in stead of any outer-most Rook), and the file letter otherwise.

This is simpler than XFEN, yet compatible with normal Chess.

Michel
Posts: 2236
Joined: Sun Sep 28, 2008 11:50 pm

Re: Question: Polyglot books and Chess960

Post by Michel » Sun Dec 28, 2008 1:31 pm

I included the Chess960 specification in

http://alpha.uhasselt.be/Research/Algeb ... ormat.html

Please have a look if there are any remaining ambiguities.

Michel

Michel
Posts: 2236
Joined: Sun Sep 28, 2008 11:50 pm

Re: Question: Polyglot books and Chess960

Post by Michel » Sun Dec 28, 2008 2:31 pm

Actually I see that you are now proposing a convention more akin to Shredder fen. This has as an advantage that the offset of a rook in the table of random numbers would not change if an outer rook became an inner rook.

But it would not be compatible with the way PG currently encodes Chess960 positions in which there is no castling ambiguity.

Post Reply