1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

Use MVV/LVA in score_evasions()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-11-02 08:47:27 +01:00
parent d087b0a34a
commit 3e275680d5

View file

@ -253,19 +253,24 @@ void MovePicker::score_noncaptures() {
void MovePicker::score_evasions() { void MovePicker::score_evasions() {
for (int i = 0; i < numOfMoves; i++) Move m;
{ int hs;
Move m = moves[i].move;
if (m == ttMove) // Use MVV/LVA ordering
moves[i].score = 2*HistoryMax; for (int i = 0; i < numOfMoves; i++)
else if (!pos.square_is_empty(move_to(m))) {
{ m = moves[i].move;
int seeScore = pos.see(m);
moves[i].score = (seeScore >= 0)? seeScore + HistoryMax : seeScore; if (m == ttMove)
} else hs = 2*HistoryMax;
moves[i].score = H.move_ordering_score(pos.piece_on(move_from(m)), m); else if (!pos.square_is_empty(move_to(m)))
hs = int(pos.midgame_value_of_piece_on(move_to(m)))
-int(pos.type_of_piece_on(move_from(m))) + HistoryMax;
else
hs = H.move_ordering_score(pos.piece_on(move_from(m)), m);
moves[i].score = hs;
} }
// FIXME try psqt also here
} }
void MovePicker::score_qcaptures() { void MovePicker::score_qcaptures() {