Retire history.h

And move the contents to movepick.cpp, where they are
mostly used.

Idea from DiscoCheck.

No functional change (bench 5379503)
This commit is contained in:
Marco Costalba
2013-02-02 16:04:41 +01:00
parent 9f94d22801
commit 53051eefc7
5 changed files with 51 additions and 81 deletions

View File

@@ -26,7 +26,6 @@
#include "book.h"
#include "evaluate.h"
#include "history.h"
#include "movegen.h"
#include "movepick.h"
#include "notation.h"
@@ -1071,13 +1070,13 @@ split_point_start: // At split points actual search starts from here
// Increase history value of the cut-off move
Value bonus = Value(int(depth) * int(depth));
H.add(pos.piece_moved(bestMove), to_sq(bestMove), bonus);
H.update(pos.piece_moved(bestMove), to_sq(bestMove), bonus);
// Decrease history of all the other played non-capture moves
for (int i = 0; i < playedMoveCount - 1; i++)
{
Move m = movesSearched[i];
H.add(pos.piece_moved(m), to_sq(m), -bonus);
H.update(pos.piece_moved(m), to_sq(m), -bonus);
}
}
}