Polyglot extension tool

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Jonathan003
Posts: 239
Joined: Fri Jul 06, 2018 4:23 pm
Full name: Jonathan Cremers

Re: Polyglot extension tool

Post by Jonathan003 »

Hi Ed
That's not the case. My source book is called white_3.bin
If I choose the option 'B' to calculate new weights everything works fine. And the moves are correctly displayed in SCID. It's only when I use the option 'V' that I got these strange characters. I will send you the bin books to your gmail adress so you can check for yourself.
Also a description of how I made them.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Polyglot extension tool

Post by Rebel »

Please do, you have made me curious.
90% of coding is debugging, the other 10% is writing bugs.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Polyglot extension tool

Post by Rebel »

There has been a silent update due to a bugfix.
90% of coding is debugging, the other 10% is writing bugs.
ChickenLogic
Posts: 154
Joined: Sun Jan 20, 2019 11:23 am
Full name: kek w

Re: Polyglot extension tool

Post by ChickenLogic »

Thank you for this great tool :)
I'd like to have an option to set the Syzygy path and contempt in the Poly gui - it would make it more convenient in my opinion (though only useful for very deep analysis).
I plan on doing a "Contempt book" with C=40 for very aggressive play :twisted:
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Polyglot extension tool

Post by Ferdy »

Rebel wrote: Mon Jan 21, 2019 8:30 pm There has been a silent update due to a bugfix.
Downloaded poly 1.2 today. Tried its feature to add score to polyglot book using poly.

1. I have polyglot book called d.bin
2. Use poly to generate epd file using 10.epd
3. The generated epd file is d.epd
4. Use poly to analyze d.epd at 2s/position
5. The epd with analysis is called new.epd
6. Use poly to import the analysis in new.epd to d.bin

I tried the book in Deuterium using BestScore move selection option and this is its log.

Code: Select all

>> position startpos
string received: go wtime 300000 btime 300000 winc 100 binc 100
>> go wtime 300000 btime 300000 winc 100 binc 100
Move   Weight(%)  Score  Depth  Learn
d2d4       36.00   0.03     20      0
e2e4       36.00   0.02     20      0
g1f3       12.00  -0.00     20      0
c2c4       12.00  -0.09     19      0
b2b3        1.00  -0.05     19      0
g2g3        1.00  -0.14     21      0
f2f4        1.00  -0.21     19      0
b1c3        0.00  -0.14     19      0
b2b4        0.00  -0.45     19      0
e2e3        0.00   0.00     21      0
d2d3        0.00  -0.21     19      0
a2a3        0.00  -0.11     18      0
g2g4        0.00   0.31     18      0
move g2g4 is selected having the best score!!
<< bestmove g2g4
The move g2g4 was selected because this move has the best score.

When I checked the new.epd, this is the file that was imported to d.bin, I cannot find a startpos epd with move g2g4. But I can find 2 epd from startpos.
Here are the 2 analyzed epd from new.epd

Code: Select all

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - po 5662400; id sf10x.exe; bm d2d4; ce 39; acd 19; c1 Threads 1, Hash 256, Time 2000ms;
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - po 710928; id sf10x.exe; bm e2e4; ce 78; acd 18; c1 Threads 1, Hash 256, Time 2000ms;
Its only d2d4 and e2e4. There is no g2g4. Could this be a bug in poly?

If I try ProDeo.bin I get this.

Code: Select all

>> position startpos
string received: go wtime 300000 btime 300000 winc 100 binc 100
>> go wtime 300000 btime 300000 winc 100 binc 100
Move   Weight(%)  Score  Depth  Learn
d2d4       51.00   0.06     20     14
e2e4       41.00   0.20     20     34
c2c4        4.00   0.06     20     60
g1f3        2.00  -0.01     20      0
move e2e4 is selected having the best score!!
<< bestmove e2e4
Looks normal.

Notes:
1. The d.epd generated by poly with the help of 10.epd generated duplicates. Duplicates should be removed before analyzing it. In my case I did not delete it, since I assume that poly will remove the duplicates in the generated epd file.
2. But there is a menu in poly that seemed to remove the duplicates, it is called Remove doubles.
Image
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Polyglot extension tool

Post by pedrox »

Opening book: prodeo.bin with my engine.

# key: 463b96181691fc9c
# random weight (0-100): 12.68%
# move=d2d4 weight=51.60% score= 4096 depth=20 learn=0
# move=e2e4 weight=41.96% score=12800 depth=20 learn=0
# move=c2c4 weight= 4.13% score= 3840 depth=20 learn=0
# move=g1f3 weight= 2.31% score=64767 depth=20 learn=0
0 0 0 0 (Book move)
Computer's move: d2d4

How do I pass the score to centipawns?
Where do I find prodeo.bin with numbers in learning?

Thank you.
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Polyglot extension tool

Post by pedrox »

I found prodeo.bin with learn on poly.

# key: 463b96181691fc9c
# random weight (0-100): 1.97%
# move=d2d4 weight=51.60% score= 4096 depth=20 learn=14
# move=e2e4 weight=41.96% score=12800 depth=20 learn=34
# move=c2c4 weight= 4.13% score= 3840 depth=20 learn=60
# move=g1f3 weight= 2.31% score=64767 depth=20 learn=0
0 0 0 0 (Book move)
Computer's move: d2d4

score a cp?
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Polyglot extension tool

Post by Ferdy »

pedrox wrote: Thu Mar 07, 2019 3:59 pm I found prodeo.bin with learn on poly.

# key: 463b96181691fc9c
# random weight (0-100): 1.97%
# move=d2d4 weight=51.60% score= 4096 depth=20 learn=14
# move=e2e4 weight=41.96% score=12800 depth=20 learn=34
# move=c2c4 weight= 4.13% score= 3840 depth=20 learn=60
# move=g1f3 weight= 2.31% score=64767 depth=20 learn=0
0 0 0 0 (Book move)
Computer's move: d2d4

score a cp?
Score in pawn unit.

Code: Select all

double score = entries[i].score >= 32768 ? (double)entries[i].score / 65536 - 1.0 : (double)entries[i].score / 65536;
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Polyglot extension tool

Post by Rebel »

Ferdy wrote: Thu Mar 07, 2019 11:25 am
Rebel wrote: Mon Jan 21, 2019 8:30 pm There has been a silent update due to a bugfix.
Downloaded poly 1.2 today. Tried its feature to add score to polyglot book using poly.

1. I have polyglot book called d.bin
2. Use poly to generate epd file using 10.epd
3. The generated epd file is d.epd
4. Use poly to analyze d.epd at 2s/position
5. The epd with analysis is called new.epd
6. Use poly to import the analysis in new.epd to d.bin

I tried the book in Deuterium using BestScore move selection option and this is its log.

Code: Select all

>> position startpos
string received: go wtime 300000 btime 300000 winc 100 binc 100
>> go wtime 300000 btime 300000 winc 100 binc 100
Move   Weight(%)  Score  Depth  Learn
d2d4       36.00   0.03     20      0
e2e4       36.00   0.02     20      0
g1f3       12.00  -0.00     20      0
c2c4       12.00  -0.09     19      0
b2b3        1.00  -0.05     19      0
g2g3        1.00  -0.14     21      0
f2f4        1.00  -0.21     19      0
b1c3        0.00  -0.14     19      0
b2b4        0.00  -0.45     19      0
e2e3        0.00   0.00     21      0
d2d3        0.00  -0.21     19      0
a2a3        0.00  -0.11     18      0
g2g4        0.00   0.31     18      0
move g2g4 is selected having the best score!!
<< bestmove g2g4
The move g2g4 was selected because this move has the best score.
That's odd indeed.

A possible explanation can be that you haven't cleared the scores (the "Clear Analysis" function) and the "g2-g4" comes from a previous session, although I must say that a score of 0.31 remains suspect.

Maybe you can run it again with "Clear Analysis"?
Could this be a bug in poly?
If the above doesn't work mail me so I can reproduce it.
Notes:
1. The d.epd generated by poly with the help of 10.epd generated duplicates. Duplicates should be removed before analyzing it. In my case I did not delete it, since I assume that poly will remove the duplicates in the generated epd file.
2. But there is a menu in poly that seemed to remove the duplicates, it is called Remove doubles.
Image
I always run "Remove doubles", can save much analysis time.
90% of coding is debugging, the other 10% is writing bugs.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Polyglot extension tool

Post by Ferdy »

Rebel wrote: Fri Mar 08, 2019 10:17 am A possible explanation can be that you haven't cleared the scores (the "Clear Analysis" function) and the "g2-g4" comes from a previous session, although I must say that a score of 0.31 remains suspect.

Maybe you can run it again with "Clear Analysis"?
Tried but still same result, I sent a PM with d.bin and new.epd download link.

BTW I tried to import a single epd to d.bin by Import Analysis.
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - bm e2e4; ce 20; acd 22;
But after checking with Poly statistics, Analyzed Positions is 0. So this was not imported. So what is the requirement of the epd format that can be imported?