Moderator: Andres Valverde
"row" and "file" are counted from 0 to 7. "kind_of_piece" is encoded as follows
If the opponent has pushed a pawn which can be taken en passant then "enpassant" is the entry from RandomEnPassant whose offset is the file of the pushed pawn (counted from 0 to 7).
Harald Lüßen wrote:"row" and "file" are counted from 0 to 7. "kind_of_piece" is encoded as follows
Could you explain the square mapping please. Which row and file is A1, H1 A8, H8?
If the opponent has pushed a pawn which can be taken en passant then "enpassant" is the entry from RandomEnPassant whose offset is the file of the pushed pawn (counted from 0 to 7).
Is it coded always or only when a second pawn exists to do the ep move?
I seriously doubt any program differentiates between these two positions. The program would have to generate all moves and see if there are any that preserve its castling rights. So yes, there is a difference.Teemu Pudas wrote:4k3/8/8/8/8/4q3/8/4K2R w K -
4k3/8/8/8/8/4q3/8/4K2R w - -
Could you explain the square mapping please. Which row and file is A1, H1 A8, H8?
Is it coded always or only when a second pawn exists to do the ep move?
Could you write explicitely that the zobrist value of castle and enpassant is 0
if the other values do not apply. Dito the whole zobrist value calculation
starts with 0, right?
Is this algorithm free to use in every engine?
Do you have any idea how 'good' these values are? Collisions? Hamming distance?
As for e.p., I don't know the specifics of the PG book format, but it likely follows the FEN standard, which is that the e.p. square is set iff a pawn is next to the pawn just moved, but it doesn't necessarily have to be legal to capture.
Zach Wegner wrote:I seriously doubt any program differentiates between these two positions. The program would have to generate all moves and see if there are any that preserve its castling rights.Teemu Pudas wrote:4k3/8/8/8/8/4q3/8/4K2R w K -
4k3/8/8/8/8/4q3/8/4K2R w - -
Michel wrote:I have written out the Polyglot opening book specification. You can find it on my Toga website
http://alpha.uhasselt.be/Research/Algebra/Toga/
When I find some more time I will provide tests and sample code.
In any case feedback is appreciated.
Regards,
Michel
PGmoveAdd.exe SomeBook.Bin someFenOrEPD SomeMoveInAlgebraicNotation ModifiedBook.bin
Michel wrote:A utility to insert a FEN in a PG book would be a good exercise.
Or rather a delete/insert/modify.
Michel
Michel wrote:Do you know how to compile things on Windows (e.g. using Cygwin or MinGW)? I normally use Linux and testing if things work properly on Windows takes some time (a reboot for starters!).
So it would be easier if I can just post sources of utilities.
Regards,
Michel
Denis P. Mendoza wrote:[
Try this (MSVC6) windows compile:
http://computerchessengines.mylivepage. ... ileid=3993
It's a good start for this polyglot project!
Many thanks Michel!
Denis
C:\ch\0 work>pg_key "rnbqkbnr/ppp1pppp/8/3p4/3P4/8/PPP1PPPP/RNBQKBNR w KQkq d6"
06649ba69b8c9ff8
C:\ch\0 work>pg_show performance.bin 06649ba69b8c9ff8
move=c2c4 weight=76.03%
move=g1f3 weight=20.66%
move=c1g5 weight= 3.31%
PGmoveAdd.exe SomeBook.Bin someFenOrEPD SomeMoveInAlgebraicNotation ModifiedBook.bin
$ fen="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
$ pg_query performance.bin "$fen"
move=e2e4 weight=33.33%
move=d2d4 weight=33.33%
move=c2c4 weight=33.33%
$ pg_add performance.bin "$fen" a2a4 more_performance.bin
$ ./pg_query more_performance.bin "$fen"
move=e2e4 weight=33.33%
move=d2d4 weight=33.33%
move=c2c4 weight=33.33%
move=a2a4 weight= 0.00%
Return to Winboard and related Topics
Users browsing this forum: No registered users and 16 guests