{"action":"created","issue":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/948","repository_url":"https://api.github.com/repos/official-stockfish/Stockfish","labels_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/948/labels{/name}","comments_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/948/comments","events_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/948/events","html_url":"https://github.com/official-stockfish/Stockfish/issues/948","id":198270472,"number":948,"title":"Analysis in the MultiPV mode doesn't take into account the possibility of repeating the root position","user":{"login":"atumanian","id":22194068,"avatar_url":"https://avatars.githubusercontent.com/u/22194068?v=3","gravatar_id":"","url":"https://api.github.com/users/atumanian","html_url":"https://github.com/atumanian","followers_url":"https://api.github.com/users/atumanian/followers","following_url":"https://api.github.com/users/atumanian/following{/other_user}","gists_url":"https://api.github.com/users/atumanian/gists{/gist_id}","starred_url":"https://api.github.com/users/atumanian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atumanian/subscriptions","organizations_url":"https://api.github.com/users/atumanian/orgs","repos_url":"https://api.github.com/users/atumanian/repos","events_url":"https://api.github.com/users/atumanian/events{/privacy}","received_events_url":"https://api.github.com/users/atumanian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-01-01T15:12:49Z","updated_at":"2017-01-13T17:40:21Z","closed_at":null,"body":"Recently a patch intended to correctly implement the 3-fold repetition rule has been applied. (See the discussion of #925) Although it indeed fixes the behaviour of the engine in the playing mode, of the two competing versions the one which doesn't completely fixes the issue in the analysis mode with MultiPV > 1 was chosen.\r\nThis mode isn't used for playing but is a very useful tool for analysis.\r\nThe difference between the applied version of the patch and the correct version (https://github.com/atumanian/Stockfish/commit/96cdf4b97ded31edcf56eddfd1f95fcdc771549c) is that the former doesn't allow a 2-fold repetition of the root position during a search while the latter does.\r\nI've invented a position to illustrate this.\r\n`5r1k/6n1/B1b4N/8/8/8/P4P2/1K5R w - - 0 1`\r\nIf you analyze it with the current version and with large enough MultiPV, you'll see that move 1.Rh4 is scored about 2 pawns while 1.Nf7+ is permanently scored as a draw. But if you play 1.Nf7+, the score will jump up to about 2! This is a more correct score because white can force returning to the initial position and play the continuation move: 1. Nf7+ Kg8 2. Kh6+ Kh8 3. Rh4. The current version doesn't see this move as winning because it incorrectly assumes a 2-fold repetition of the root position is an immediate draw. Moreover, the engine orders many moves before 1.Nf7+, e.g. move 1.Rd1 as 0.87, which is actually worse than 1.Nf7+.\r\nThe other version of the patch scores 1.Nf7+ about the same as 1.Rh4, which is correct.\r\nThere can also be practical reasons to play 1.Nf7+. For example, when a player is in a time pressure and has to play a few moves before a time control, they may decide to go for the repetition so that they can think more deeply about the continuation. Another possible reason: white can try to trap the opponent to play 1. Nf7+ Kg8 2. Nh6+ Kh7, which is replied by 3.Bd3+ and is a faster win."},"comment":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/comments/272499265","html_url":"https://github.com/official-stockfish/Stockfish/issues/948#issuecomment-272499265","issue_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/948","id":272499265,"user":{"login":"atumanian","id":22194068,"avatar_url":"https://avatars.githubusercontent.com/u/22194068?v=3","gravatar_id":"","url":"https://api.github.com/users/atumanian","html_url":"https://github.com/atumanian","followers_url":"https://api.github.com/users/atumanian/followers","following_url":"https://api.github.com/users/atumanian/following{/other_user}","gists_url":"https://api.github.com/users/atumanian/gists{/gist_id}","starred_url":"https://api.github.com/users/atumanian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atumanian/subscriptions","organizations_url":"https://api.github.com/users/atumanian/orgs","repos_url":"https://api.github.com/users/atumanian/repos","events_url":"https://api.github.com/users/atumanian/events{/privacy}","received_events_url":"https://api.github.com/users/atumanian/received_events","type":"User","site_admin":false},"created_at":"2017-01-13T17:40:21Z","updated_at":"2017-01-13T17:40:21Z","body":"I've scheduled a test to see how much the correct version is stronger at LTC."}}
{"actor":{"display_login":"atumanian"}}