Is there a tool to find quiet, multiple best moves positions?

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

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Is there a tool to find quiet, multiple best moves positions?

Post by Laskos »

I remember I saw something on this forum awhile ago, was it Ferdy with Ed building it?

In short, I would need a tool which takes an EPD file of FEN entries and outputs another EPD file with positions satisfying the criteria:
The position is quiescent
There are several close in value of the eval (say Stockfish in multiPV mode shows first three lines at 0.72, 0.70, 0.69) best moves from that position. How many and how close in the eval is determined by the user of the tool
It would be useful if I could choose the analyzing engine.

I hope I somehow explained what I would need.

Thanks!
Dann Corbit
Posts: 12482
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Dann Corbit »

I could probably find something like that with database queries.
I have enormous volumes of analyzed EPD records, most of which have multiple evaluations.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Laskos »

Dann Corbit wrote: Sat Sep 12, 2020 6:36 pm I could probably find something like that with database queries.
I have enormous volumes of analyzed EPD records, most of which have multiple evaluations.
Could you find fairly balanced quiet positions analyzed to reasonable depth (time) with some top AB engine and having at lest 3 options as best move with differences between their evals no larger than 0.04cp (same engine)? I would need something like 5,000 such opening positions, 5,000 middlegame and 5,000 endgame positions. Is it doable with what you have? Thanks!
Dann Corbit
Posts: 12482
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Dann Corbit »

Give me a clear definition of opening, midgame and endgame for your needs.

I can't query with those words, but I can query by piece count, whether a side has castled, and any other feature that is fully described by an EPD record.

For most of my tables, I do not have ply, half move clock, or full move counter.
I do have depth, centipawn evaluation.

For some tables, I have engine names.
For some tables, I only have depth and score but 99.9% will be a top 3 engine of the time (but that varies a lot as time moves along. At one time, Rybka was a top three engine, and today it is smoked by a top 20 engine.)

I also have tables that only have win/loss/draw statistics because they are human games like correspondence chess players of 2400+ or OTB players of 2600+.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Laskos »

Dann Corbit wrote: Sun Sep 13, 2020 10:51 am Give me a clear definition of opening, midgame and endgame for your needs.

I can't query with those words, but I can query by piece count, whether a side has castled, and any other feature that is fully described by an EPD record.

For most of my tables, I do not have ply, half move clock, or full move counter.
I do have depth, centipawn evaluation.

For some tables, I have engine names.
For some tables, I only have depth and score but 99.9% will be a top 3 engine of the time (but that varies a lot as time moves along. At one time, Rybka was a top three engine, and today it is smoked by a top 20 engine.)

I also have tables that only have win/loss/draw statistics because they are human games like correspondence chess players of 2400+ or OTB players of 2600+.
Balanced openings means [-20; 50] centipawn interval.
Balanced midgames means [-60; 60] centipawn interval
Balanced endgames means [-80; 80] centipawn interval

Early openings --- number of pieces at least 30
Midgames --- number of pieces 20-24, Queens present (both).
Endgames --- number of pieces 7-12

Scores for at least 3 different best moves from a position do not differ by more than 5 cp (analyzed using the same engine)
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Ferdy »

Laskos wrote: Sat Sep 12, 2020 10:00 am I remember I saw something on this forum awhile ago, was it Ferdy with Ed building it?

In short, I would need a tool which takes an EPD file of FEN entries and outputs another EPD file with positions satisfying the criteria:
The position is quiescent
There are several close in value of the eval (say Stockfish in multiPV mode shows first three lines at 0.72, 0.70, 0.69) best moves from that position. How many and how close in the eval is determined by the user of the tool
It would be useful if I could choose the analyzing engine.

I hope I somehow explained what I would need.

Thanks!
You can try this https://github.com/fsmosca/Quiet-Position-Extractor.

It has some filters, but has no feature though to identify top move scores.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Laskos »

Ferdy wrote: Mon Sep 14, 2020 4:41 am
Laskos wrote: Sat Sep 12, 2020 10:00 am I remember I saw something on this forum awhile ago, was it Ferdy with Ed building it?

In short, I would need a tool which takes an EPD file of FEN entries and outputs another EPD file with positions satisfying the criteria:
The position is quiescent
There are several close in value of the eval (say Stockfish in multiPV mode shows first three lines at 0.72, 0.70, 0.69) best moves from that position. How many and how close in the eval is determined by the user of the tool
It would be useful if I could choose the analyzing engine.

I hope I somehow explained what I would need.

Thanks!
You can try this https://github.com/fsmosca/Quiet-Position-Extractor.

It has some filters, but has no feature though to identify top move scores.
Thanks, it is useful, running it now. Had problems setting "path" variables with python on my Windows 10 Pro, sometimes getting "administrative rights" over my own PC is hard :).
Dann Corbit
Posts: 12482
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Dann Corbit »

Here is an archive which meets most of your criteria for the opening set:
https://drive.google.com/file/d/1Mv6VlT ... sp=sharing
I forgot to filter for all of the ce scores within 5cp, but the cp scores are attached.
All of the other criteria should be met.
Note that most have differing depths.

to assess the relationships of different depths with an individual position, I usually use the formula
score of lesser depth = ( score of lesser depth ) * (depth of lesser score) / (depth of deepest score)
It's not terribly accurate, and a better option is probably just to rate the scores by depth first, and then ce.
For instance, if a certain position has bm1, acd 36, ce 20; bm2, acd 35, ce 25; bm3, acd 34, ce 34 then the best move is probably bm1 because it was analyzed the deepest. The analysis from this table that I used is 99% stockfish, but not all the same version of stockfish.
If you have an idea for a mathematically sound formula to assess two scores for the same position of different depths, then I am all ears.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Laskos »

Dann Corbit wrote: Mon Sep 14, 2020 2:12 pm Here is an archive which meets most of your criteria for the opening set:
https://drive.google.com/file/d/1Mv6VlT ... sp=sharing
I forgot to filter for all of the ce scores within 5cp, but the cp scores are attached.
All of the other criteria should be met.
Note that most have differing depths.

to assess the relationships of different depths with an individual position, I usually use the formula
score of lesser depth = ( score of lesser depth ) * (depth of lesser score) / (depth of deepest score)
It's not terribly accurate, and a better option is probably just to rate the scores by depth first, and then ce.
For instance, if a certain position has bm1, acd 36, ce 20; bm2, acd 35, ce 25; bm3, acd 34, ce 34 then the best move is probably bm1 because it was analyzed the deepest. The analysis from this table that I used is 99% stockfish, but not all the same version of stockfish.
If you have an idea for a mathematically sound formula to assess two scores for the same position of different depths, then I am all ears.
Thanks, can you filter for at least 3 ce scores to be within 5cp (or within 7cp is fine too, to have a bit more positions), it would take me a lot of time filtering very convoluted ways (I hardly ever use any specialized database query program).
Dann Corbit
Posts: 12482
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Is there a tool to find quiet, multiple best moves positions?

Post by Dann Corbit »

Here is an archive that has all three files, and I will write a filter for you, but you may want to rethink the width of the data band.
5 or 7 centipawns will give you plenty of data on the opening, but I (back of the envelope estimate) think you will get less than 500 distinct positions in the midgame or the endgame.
https://drive.google.com/file/d/1AIJye3 ... sp=sharing
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.