fsmosca / EPD-Analyzer

Read epd file, analyze positions and save it to pgn and epd files.
GNU General Public License v3.0
8 stars 3 forks source link

specify number of moves to gain a decisive advantage #7

Open ChessOTB opened 4 years ago

ChessOTB commented 4 years ago

Is it possible to specify in the settings something like the maximum number of analyzed moves up to 6 (for example), gaining a decisive advantage (upper than a given value)? Maybe this enhancement would be included in the version of the tool that analyses by depth instead of time.

pgnismy commented 4 years ago

Thank you very much fsmosca. I think this tool "EPD-Analyzer" will have a great application. Your fan

pgnismy

fsmosca commented 4 years ago

Is it possible to specify in the settings something like the maximum number of analyzed moves up to 6 (for example), gaining a decisive advantage (upper than a given value)? Maybe this enhancement would be included in the version of the tool that analyses by depth instead of time.

Can you give an example situation?

pgnismy commented 4 years ago

Excuse me. I can't wait for an answer from ChessOTB! I have such a huge request. My file is analyzed using this great epd-analyzer. Positions are analyzed in greater depth than needed and are unnecessarily long. Would it be possible to do something about it? I understand that this is a great challenge, but its application would be huge. These positions were selected from the end games I analyzed last time.

I have not yet used this tool for material gain combinations. I'm drying it out tonight. Your big fan

example fsmosca.TXT

pgnismy commented 4 years ago

and example from tactics.

Double Attack (EPD-Analyzer).TXT Double Attack.TXT

Thank you very much for your sacrificed time.

I am looking forward to your opinion, proposal and solution. In any case, I am very grateful for this tool and I will use it even if you cannot find a solution to such a problem.

Your fan pgnismy

ChessOTB commented 4 years ago

I am happy to see more fans found this amazing tool. I see the user pgnismy seems to use an earlier version since it does not display the number of the position and sometimes SF gets only one move... but still, I think he gave examples of what I tried to say... to limit the depth, but not always at a fixed depth, when it is possible to stop before when one side has a decisive advantage. If it is too difficult... all is great already!

fsmosca commented 4 years ago

Be aware that pv length is different from depth.

Example send command to engine. go depth 12

Output: info depth 12 seldepth 20 multipv 1 score cp 79 nodes 105334 nps 650209 tbhits 0 time 162 pv d2d4 d7d5 c2c4 d5c4 e2e4 e7e5 g1f3 e5d4 d1d4 d8d4 f3d4 c8d7 c1f4 b8c6 d4b5

The pv length is 15. d2d4 d7d5 c2c4 d5c4 e2e4 e7e5 g1f3 e5d4 d1d4 d8d4 f3d4 c8d7 c1f4 b8c6 d4b5

While the depth is 12. info depth 12

In this example,

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "1-0"]
[Annotator "Stockfish 11 64 POPCNT"]
[SetUp "1"]
[FEN "R4N2/8/8/7p/4p3/6p1/8/3K3k w - - 0 1"]
[PlyCount "49"]

1. Ra5 h4 2. Rh5 h3 3. Rxh3+ Kg2 4. Rh6 Kf2 5. Rf6+ Ke3 6. Ke1 g2 7. Rg6 Kf3 {
clear advance. Stop analyze.} 8. Rg5 Ke3 9. Rxg2 Kd3 10. Rg3+ Kc4 11. Ke2 Kd4
12. Rg4 Ke5 13. Ke3 Kd6 14. Rxe4 Kc5 15. Ng6 Kd5 16. Re5+ Kc6 17. Kd4 Kd6 18.
Kc4 Kc6 19. Re6+ Kd7 20. Kd5 Kc7 21. Kc5 Kc8 22. Re7 Kb8 23. Kc6 Ka8 24. Kb6
Kb8 25. Re8# 1-0

It is possible to control the pv length by playing engine vs engine game from R4N2/8/8/7p/4p3/6p1/8/3K3k w - - 0 1. If one side is already winning by a score of 200cp or so, the match can be stopped, and save the game. Is this what you want?

The output could be,

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "1-0"]
[Annotator "Stockfish 11 64 POPCNT"]
[SetUp "1"]
[FEN "R4N2/8/8/7p/4p3/6p1/8/3K3k w - - 0 1"]
[PlyCount "49"]

1. Ra5 h4 2. Rh5 h3 3. Rxh3+ Kg2 4. Rh6 Kf2 5. Rf6+ Ke3 6. Ke1 g2 7. Rg6 Kf3 1-0

The moves 1. Ra5 h4 2. Rh5 h3 3. Rxh3+ Kg2 4. Rh6 Kf2 5. Rf6+ Ke3 6. Ke1 g2 7. Rg6 Kf3 are generated from engine vs engine match and not from the pv analysis of the engine.

Currently epd-analyzer only creates pgn from engine pv output. If the engine shows a mate score in the pv, it is better to save the whole pv and output it in pgn.

Be warned about the command, eap.exe --depth 100 --movetimems 0 that may take more time depending on the position.

If I will support engine vs engine match to analyze the epd and create meaningful pv, I will use --engine-match flag telling the analyzer to create engine match. This may take time, but is possible.

ChessOTB commented 4 years ago

I don't know about pgnismy, but I was indeed confusing depth and pv lenght. Now I understand that, for each halfmove in a pv, the engine analyzes at a different depth, just to finish the job in the specified fixed amount of time. If you make a version that would tell the engine to analyze at a specified depth, of course, the time would become different for each position.

Though, there is another confusion in my case. I thought until now that the result of any engine analysis, including this pv output from your tool, is actually the result of the engine playing with itself and taking alternative sides. From your above statements it is a totally different situation. Well, thank you for this enlightenment!

pgnismy commented 4 years ago

It is possible to control the pv length by playing engine vs engine game from R4N2/8/8/7p/4p3/6p1/8/3K3k w - - 0 1. If one side is already winning by a score of 200cp or so, the match can be stopped, and save the game. Is this what you want?

. That's exactly what I was thinking. The position is clear, not a single move leads to a win. The analysis should end with a move by the side, which will gain a clear advantage. If the score of 200cp is a good limit, please do so.

I think this limit will be similarly good for tactical examples in "Double Attack.TXT"

fsmosca thank you very much. Thanks to you, this Saturday is much more beautiful for me.

pgnismy