asdfjkl / jfxchess

JFXChess - Chess Program
https://asdfjkl.github.io/jfxchess
GNU General Public License v2.0
100 stars 22 forks source link

Irregular number of ply after analysis #94

Closed futurelauncher closed 3 years ago

futurelauncher commented 3 years ago

Hi! I noticed many times Jerry gives different plies after analysis. For some lines, it gives long variations and for some lines, it gives one or two moves only. I don't know whether this is a bug or setting. Confused! For e.g. jerry

asdfjkl commented 3 years ago

Sorry to query you again with question, but may I ask which engine? I am having trouble to pinpoint this issue. Some engines report just report like this "info Nc5 (some long complicated line" "info Nc5" // no further info given while calculating, just the first move that is known to be best. "info Nc5" "info Nc5" "info Nc5" "info Nc5" "info Nc5" "info Nc5 (another long line)"

If during timing/cutoff we pick "info Nc5" as the "latest" known bestline, we just get the bestmove.

but I want to make sure this is really the issue, and not some other subtle bug.

asdfjkl commented 3 years ago

very likely fixed in 87a949f92b8a6c24f829ceade98a25b9b8d2c6b8 was: some engines like Rubichess will add two psaces between moves, like "pv e2e4 e7e5 g1f3" which caused regexp to only match the first move.

futurelauncher commented 3 years ago

Hi, I always use Stockfish (latest version usually). I used same engine in various other programs like Fritz (various versions), SCID, Scid Vs. PC but never found this issue in those GUI. Though we get the best move, we must get "best" natural continuation of that move from both the sides to analyse any position.

asdfjkl commented 3 years ago

(more testing required if 87a949f fixed this)

asdfjkl commented 3 years ago

related https://github.com/niklasf/python-chess/issues/57

additional post-processing of info provided by engine seems necessary

asdfjkl commented 3 years ago

Can reproduce this with stockfish_20090216_x64_modern.exe , just start and "go infinite". Stockfish will output

info depth 19 seldepth 24 multipv 1 score cp 42 nodes 1163966 nps 361592 hashfull 537 tbhits 0 time 3219 pv e2e4 e7e5 g1f3 b8c6 d2d4 e5d4 f3d4 g8f6 d4c6 b7c6 b1c3 d7d5 e4d5 f6d5 c3d5 d8d5 d1d5 c6d5 f1b5 c8d7

... and then later frequently just....

info depth 20 seldepth 32 multipv 1 score cp 25 upperbound nodes 1536037 nps 355564 hashfull 669 tbhits 0 time 4320 pv e2e4 e7e5

or even just e2e4 if it hits another branch in the search tree. Not helpful.

thus implemented additional post processing of info to ignore such pv lines in 369842d91bb14d697aef410972a862655be408df