Similarize pruning code in search() and sp_search()

Use futility pruning also in split points.
Do not use history pruning in split points when
getting mated.

After 1000 games on Joona QUAD
Orig - Mod: 496 - 504

Added an optimization to avoid a costly lock in the
very common case that sp->futilityValue <= sp->bestValue.
A test on a dual CPU shows only 114 hits on 23196 events,
so avoid a lock in all the other cases.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Joona Kiiski
2009-10-17 08:42:42 +03:00
committed by Marco Costalba
parent 4dd7fccfd1
commit f0b0a3b135
2 changed files with 42 additions and 9 deletions

View File

@@ -50,7 +50,8 @@ struct SplitPoint {
SearchStack *parentSstack;
int ply;
Depth depth;
volatile Value alpha, beta, bestValue;
volatile Value alpha, beta, bestValue, futilityValue;
Value approximateEval;
bool pvNode;
Bitboard dcCandidates;
int master, slaves[THREAD_MAX];