Permalink
Browse files

Don't allow negative FutilityMargins

bench: 4382045
  • Loading branch information...
1 parent 1566357 commit ea1b2d393044699752ab55eba51a1dc6552ae51c @mcostalba committed Apr 27, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/search.cpp
View
@@ -141,7 +141,7 @@ void Search::init() {
// Init futility margins array
for (d = 1; d < 16; d++) for (mc = 0; mc < 64; mc++)
- FutilityMargins[d][mc] = Value(112 * int(log(double(d * d) / 2) / log(2.0) + 1.001) - 8 * mc + 45);
+ FutilityMargins[d][mc] = std::max(Value(112 * int(log(double(d * d) / 2) / log(2.0) + 1.001) - 8 * mc + 45), VALUE_ZERO);
// Init futility move count array
for (d = 0; d < 32; d++)

0 comments on commit ea1b2d3

Please sign in to comment.