From 97fe0ac77737bfd97b8d53acacb71d38af3020e6 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 7 Feb 2010 13:19:10 +0100 Subject: [PATCH] Small code style triviality No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index c13431bc..01412276 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -164,8 +164,8 @@ namespace { int32_t FutilityMarginsMatrix[14][64]; // [depth][moveNumber] int FutilityMoveCountArray[32]; // [depth] - inline Value futility_margin(Depth d, int mn) { return (Value) (d < 14? FutilityMarginsMatrix[Max(d, 0)][Min(mn, 63)] : 2*VALUE_INFINITE); } - inline int futility_move_count(Depth d) { return (d < 32? FutilityMoveCountArray[d] : 512); } + inline Value futility_margin(Depth d, int mn) { return Value(d < 7*OnePly ? FutilityMarginsMatrix[Max(d, 0)][Min(mn, 63)] : 2 * VALUE_INFINITE); } + inline int futility_move_count(Depth d) { return d < 16*OnePly ? FutilityMoveCountArray[d] : 512; } /// Variables initialized by UCI options @@ -527,8 +527,7 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, } -/// init_search() is called during startup. It initializes various -/// lookup tables. +/// init_search() is called during startup. It initializes various lookup tables void init_search() { @@ -1544,7 +1543,8 @@ namespace { // Value based pruning Depth predictedDepth = newDepth - nonpv_reduction(depth, moveCount); //FIXME: We are ignoring condition: depth >= 3*OnePly, BUG?? - futilityValueScaled = ss[ply].eval + futility_margin(predictedDepth, moveCount) + H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45; + futilityValueScaled = ss[ply].eval + futility_margin(predictedDepth, moveCount) + + H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45; if (futilityValueScaled < beta) { -- 2.39.2