X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=e6b16cc495d238ff078324bf9057e85ca09aa6df;hp=794fbde9b83366eb33e074e7b0b7fa921a5e4625;hb=ddbe6082c47befcfe2bd2e778866c8fbda33b8e2;hpb=e82382703c96cfc480555e9db29d999e1f54a38f
diff --git a/src/movepick.cpp b/src/movepick.cpp
index 794fbde9..e6b16cc4 100644
--- a/src/movepick.cpp
+++ b/src/movepick.cpp
@@ -18,7 +18,6 @@
along with this program. If not, see .
*/
-#include
#include
#include "movegen.h"
@@ -59,7 +58,7 @@ namespace {
/// move ordering is at the current node.
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
- Search::Stack* s, Value beta) : pos(p), H(h), depth(d) {
+ Search::Stack* s, Value beta) : pos(p), Hist(h), depth(d) {
assert(d > DEPTH_ZERO);
@@ -92,7 +91,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
}
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
- Square sq) : pos(p), H(h), cur(moves), end(moves) {
+ Square sq) : pos(p), Hist(h), cur(moves), end(moves) {
assert(d <= DEPTH_ZERO);
@@ -124,7 +123,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
}
MovePicker::MovePicker(const Position& p, Move ttm, const History& h, PieceType pt)
- : pos(p), H(h), cur(moves), end(moves) {
+ : pos(p), Hist(h), cur(moves), end(moves) {
assert(!pos.checkers());
@@ -180,7 +179,7 @@ void MovePicker::score_noncaptures() {
for (MoveStack* it = moves; it != end; ++it)
{
m = it->move;
- it->score = H.value(pos.piece_moved(m), to_sq(m));
+ it->score = Hist[pos.piece_moved(m)][to_sq(m)];
}
}
@@ -198,12 +197,12 @@ void MovePicker::score_evasions() {
{
m = it->move;
if ((seeScore = pos.see_sign(m)) < 0)
- it->score = seeScore - History::MaxValue; // Be sure we are at the bottom
+ it->score = seeScore - History::Max; // Be sure we are at the bottom
else if (pos.is_capture(m))
it->score = PieceValue[MG][pos.piece_on(to_sq(m))]
- - type_of(pos.piece_moved(m)) + History::MaxValue;
+ - type_of(pos.piece_moved(m)) + History::Max;
else
- it->score = H.value(pos.piece_moved(m), to_sq(m));
+ it->score = Hist[pos.piece_moved(m)][to_sq(m)];
}
}