}
-/// History::move_ordering_score() returns an integer value used to order the
+/// History::value() returns an integer value used to order the
/// non-capturing moves in the MovePicker class.
-int History::move_ordering_score(Piece p, Square to) const {
+int History::value(Piece p, Square to) const {
assert(piece_is_ok(p));
assert(square_is_ok(to));
void clear();
void success(Piece p, Square to, Depth d);
void failure(Piece p, Square to, Depth d);
- int move_ordering_score(Piece p, Square to) const;
+ int value(Piece p, Square to) const;
void set_gain(Piece p, Square to, Value delta);
Value gain(Piece p, Square to) const;
from = move_from(m);
to = move_to(m);
piece = pos.piece_on(from);
- cur->score = H.move_ordering_score(piece, to);
+ cur->score = H.value(piece, to);
}
}
cur->score = pos.midgame_value_of_piece_on(move_to(m))
- pos.type_of_piece_on(move_from(m)) + HistoryMax;
else
- cur->score = H.move_ordering_score(pos.piece_on(move_from(m)), move_to(m));
+ cur->score = H.value(pos.piece_on(move_from(m)), move_to(m));
}
}
// Incremental evaluation
Score value() const;
Value non_pawn_material(Color c) const;
- Score pst_delta(Piece piece, Square from, Square to) const;
+ static Score pst_delta(Piece piece, Square from, Square to);
// Game termination checks
bool is_mate() const;
Key compute_material_key() const;
// Computing incremental evaluation scores and material counts
- Score pst(Color c, PieceType pt, Square s) const;
+ static Score pst(Color c, PieceType pt, Square s);
Score compute_value() const;
Value compute_non_pawn_material(Color c) const;
return st->materialKey;
}
-inline Score Position::pst(Color c, PieceType pt, Square s) const {
+inline Score Position::pst(Color c, PieceType pt, Square s) {
return PieceSquareTable[piece_of_color_and_type(c, pt)][s];
}
-inline Score Position::pst_delta(Piece piece, Square from, Square to) const {
+inline Score Position::pst_delta(Piece piece, Square from, Square to) {
return PieceSquareTable[piece][to] - PieceSquareTable[piece][from];
}