{"action":"created","issue":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1579","repository_url":"https://api.github.com/repos/official-stockfish/Stockfish","labels_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1579/labels{/name}","comments_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1579/comments","events_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1579/events","html_url":"https://github.com/official-stockfish/Stockfish/pull/1579","id":319757297,"number":1579,"title":"More accurate depth output","user":{"login":"DU-jdto","id":6344802,"avatar_url":"https://avatars2.githubusercontent.com/u/6344802?v=4","gravatar_id":"","url":"https://api.github.com/users/DU-jdto","html_url":"https://github.com/DU-jdto","followers_url":"https://api.github.com/users/DU-jdto/followers","following_url":"https://api.github.com/users/DU-jdto/following{/other_user}","gists_url":"https://api.github.com/users/DU-jdto/gists{/gist_id}","starred_url":"https://api.github.com/users/DU-jdto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DU-jdto/subscriptions","organizations_url":"https://api.github.com/users/DU-jdto/orgs","repos_url":"https://api.github.com/users/DU-jdto/repos","events_url":"https://api.github.com/users/DU-jdto/events{/privacy}","received_events_url":"https://api.github.com/users/DU-jdto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-03T00:44:55Z","updated_at":"2018-05-06T08:59:49Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/pulls/1579","html_url":"https://github.com/official-stockfish/Stockfish/pull/1579","diff_url":"https://github.com/official-stockfish/Stockfish/pull/1579.diff","patch_url":"https://github.com/official-stockfish/Stockfish/pull/1579.patch"},"body":"When the search is stopped early (whether due to time management, the 'stop' command or any other reason) while searching with rootDepth X, a final 'info' command is sent before sending bestmove, and X is specified as the depth. However, in some cases this happens early enough in iteration X that the PV move hasn't actually been searched at depth X, and thus the printed PV and score is actually just the one from the (X-1) iteration. To me, it seems more accurate to report (X-1) as the depth in such cases, and that's what this patch does.\r\n\r\nI've submitted this in order to get feedback as to whether changing this behaviour is actually considered desirable, and whether there might be a better way of doing it if so. If this patch is considered acceptable, I'm also requesting feedback on whether anyone sees any obvious negative impact of this patch that I've overlooked, and whether any SPRT testing is necessary.\r\n\r\nThis PR also contains fixes for a few minor code style inconsistencies.\r\n\r\nNo functional change."},"comment":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/comments/386864636","html_url":"https://github.com/official-stockfish/Stockfish/pull/1579#issuecomment-386864636","issue_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1579","id":386864636,"user":{"login":"DU-jdto","id":6344802,"avatar_url":"https://avatars2.githubusercontent.com/u/6344802?v=4","gravatar_id":"","url":"https://api.github.com/users/DU-jdto","html_url":"https://github.com/DU-jdto","followers_url":"https://api.github.com/users/DU-jdto/followers","following_url":"https://api.github.com/users/DU-jdto/following{/other_user}","gists_url":"https://api.github.com/users/DU-jdto/gists{/gist_id}","starred_url":"https://api.github.com/users/DU-jdto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DU-jdto/subscriptions","organizations_url":"https://api.github.com/users/DU-jdto/orgs","repos_url":"https://api.github.com/users/DU-jdto/repos","events_url":"https://api.github.com/users/DU-jdto/events{/privacy}","received_events_url":"https://api.github.com/users/DU-jdto/received_events","type":"User","site_admin":false},"created_at":"2018-05-06T08:59:49Z","updated_at":"2018-05-06T08:59:49Z","author_association":"NONE","body":"rootMoves[0].score can never be -VALUE_INFINITE except before the first iteration. rootMoves[i].score can be in the multiPV case, and that's what the -VALUE_INFINITE check protects against, but that's not the same thing as what this patch addresses.\r\n\r\nAn easy way to demonstrate what I'm talking about is to open Stockfish, enter 'go infinite', then wait until you see 'info depth 26 currmove ____ currmovenumber 1' and immediately enter 'stop' (if the currmovenumber 2 has been received by then, you were too slow). You will get an 'info depth 26 ...' with the same PV and score as the output from the depth 25 search. With this patch, that will instead be reported as depth 25 (I've tested this)."}}
{"actor":{"display_login":"DU-jdto"}}