{"comment":{"url":"https://api.github.com/repos/mbootsector/Stockfish/comments/13419704","html_url":"https://github.com/mbootsector/Stockfish/commit/5258099ffd75a84ee48323a08301dc5e645e31bf#commitcomment-13419704","id":13419704,"user":{"login":"mbootsector","id":6428431,"avatar_url":"https://avatars.githubusercontent.com/u/6428431?v=3","gravatar_id":"","url":"https://api.github.com/users/mbootsector","html_url":"https://github.com/mbootsector","followers_url":"https://api.github.com/users/mbootsector/followers","following_url":"https://api.github.com/users/mbootsector/following{/other_user}","gists_url":"https://api.github.com/users/mbootsector/gists{/gist_id}","starred_url":"https://api.github.com/users/mbootsector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbootsector/subscriptions","organizations_url":"https://api.github.com/users/mbootsector/orgs","repos_url":"https://api.github.com/users/mbootsector/repos","events_url":"https://api.github.com/users/mbootsector/events{/privacy}","received_events_url":"https://api.github.com/users/mbootsector/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"5258099ffd75a84ee48323a08301dc5e645e31bf","created_at":"2015-09-24T16:41:18Z","updated_at":"2015-09-24T16:41:18Z","body":"My attempt at Lazy SMP for Stockfish. This implementation starts all threads immediately but uses an \"additionalDepth\" variable to set a different target depth for each thread. Some results for different values are below. The main thread is used for sending moves to the GUI.\r\nMultiPV is disabled, because it kept crashing for some reason. Also, I'm not sure if Skill works properly, have not tested.\r\n\r\nDuring development and testing I used this version: https://github.com/official-stockfish/Stockfish/commit/7f300a769848c695fb28da444b0c3f4c1d919945\r\n\r\nLocal testresults vs \"normal smp\", Conditions were 3 threads, 15+0.06 (close to 12+0.05 fishtest time):\r\n\r\n  th->additionalDepth = (Depth)th->idx;\r\n\tScore of dev vs base: 120 - 165 - 575  [0.474] 860\r\n\tELO difference: -18\r\n\r\n  th->additionalDepth = (Depth)th->idx/2;\r\n\tScore of dev vs base: 107 - 299 - 622  [0.407] 1028\r\n\tELO difference: -66\r\n\r\n  th->additionalDepth = (Depth)th->idx + (Depth)1;\r\n\tScore of dev vs base: 203 - 271 - 925  [0.476] 1399\r\n\tELO difference: -17\r\n\r\nI have now merged my changes with a newer version of master and have tested with some 2+0.05 games to make sure the engine doesn't crash or hang.\r\n     Score of dev vs base: 48 - 78 - 148  [0.445] 274\r\n     ELO difference: -38\r\n\r\nThis is my first attempt at understanding threads and mutexes in c++, and also the first attempt at SMP. I'm sure the implementation is not optimal."}}