{"comment":{"url":"https://api.github.com/repos/zamar/Stockfish/comments/12920632","html_url":"https://github.com/zamar/Stockfish/commit/4b80422eaea2c5e7e74676caaf5baf81475c0760#commitcomment-12920632","id":12920632,"user":{"login":"mcostalba","id":1099265,"avatar_url":"https://avatars.githubusercontent.com/u/1099265?v=3","gravatar_id":"","url":"https://api.github.com/users/mcostalba","html_url":"https://github.com/mcostalba","followers_url":"https://api.github.com/users/mcostalba/followers","following_url":"https://api.github.com/users/mcostalba/following{/other_user}","gists_url":"https://api.github.com/users/mcostalba/gists{/gist_id}","starred_url":"https://api.github.com/users/mcostalba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcostalba/subscriptions","organizations_url":"https://api.github.com/users/mcostalba/orgs","repos_url":"https://api.github.com/users/mcostalba/repos","events_url":"https://api.github.com/users/mcostalba/events{/privacy}","received_events_url":"https://api.github.com/users/mcostalba/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"4b80422eaea2c5e7e74676caaf5baf81475c0760","created_at":"2015-08-27T08:20:32Z","updated_at":"2015-08-27T08:20:32Z","body":"In this case above depth 22 we don't go to zero but we keep going up (as is natural):\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1099265/9515837/8a972c3e-4ca4-11e5-947f-0aee57d58039.png)\r\n\r\nThe issue is that we have a sudden steering up of the curve at around depth 22, this is very visible with starting value 30000:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1099265/9515893/e760ee78-4ca4-11e5-94aa-f08cbe9146ec.png)\r\n\r\n\r\nWith starting value 50000 we have even an inversion:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1099265/9515903/019cc1d6-4ca5-11e5-95bd-6e19ef7bf7f5.png)\r\n\r\n\r\nTo overcome this I suggest to use 1024 instead of 512:\r\n\r\n    table[pc][to] -= table[pc][to] * std::min(abs(int(v)), 1024) / 1024;\r\n    table[pc][to] += int(v) * 64;\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1099265/9515915/318ca03c-4ca5-11e5-8341-6f727fc5231d.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1099265/9515917/3e272f42-4ca5-11e5-9a28-33d6729122e5.png)\r\n\r\n"}}