From: Chris Caino Date: Tue, 22 Oct 2013 21:02:38 +0000 (+0200) Subject: Simplify futility move count formula X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=72f7282ad4da0584c87163aed85bd5ff4d633cd3;hp=72f7282ad4da0584c87163aed85bd5ff4d633cd3;ds=sidebyside Simplify futility move count formula Simpler formula but introduces some slight changes if d >= 10 Original code grows like 0.225 * d^1.8 New code grows like 0.222 * d^1.8 Full list of values: d old new diff -------------- 0 2 2 0 1 2 2 0 2 3 3 0 3 4 4 0 4 5 5 0 5 6 6 0 6 7 7 0 7 9 9 0 8 11 11 0 9 13 13 0 10 15 16 1 11 18 19 1 12 21 21 0 13 24 24 0 14 27 28 1 15 31 31 0 16 35 35 0 17 39 38 -1 18 42 42 0 19 47 46 -1 20 51 51 0 21 55 55 0 22 60 60 0 23 65 65 0 24 70 70 0 25 75 75 0 26 81 80 -1 27 87 86 -1 28 92 91 -1 29 98 97 -1 30 104 103 -1 31 111 109 -2 Test code: int main() { for(int d=0; d<32; d++) { int a = int(3 + 0.3 * pow(double(d), 1.8)) * 3/4 + (2 < d && d < 5); int b = int(2.4 + 0.222 * pow(d + 0.0, 1.8)); std::cout << d << " " << a << " " << b << " " << b-a << std::endl; } return 0; } bench: 8350690 ---