mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Use MVV/LVA in score_evasions()
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
d087b0a34a
commit
3e275680d5
1 changed files with 20 additions and 15 deletions
|
@ -251,21 +251,26 @@ void MovePicker::score_noncaptures() {
|
|||
}
|
||||
}
|
||||
|
||||
void MovePicker::score_evasions() {
|
||||
|
||||
for (int i = 0; i < numOfMoves; i++)
|
||||
{
|
||||
Move m = moves[i].move;
|
||||
if (m == ttMove)
|
||||
moves[i].score = 2*HistoryMax;
|
||||
else if (!pos.square_is_empty(move_to(m)))
|
||||
{
|
||||
int seeScore = pos.see(m);
|
||||
moves[i].score = (seeScore >= 0)? seeScore + HistoryMax : seeScore;
|
||||
} else
|
||||
moves[i].score = H.move_ordering_score(pos.piece_on(move_from(m)), m);
|
||||
}
|
||||
// FIXME try psqt also here
|
||||
void MovePicker::score_evasions() {
|
||||
|
||||
Move m;
|
||||
int hs;
|
||||
|
||||
// Use MVV/LVA ordering
|
||||
for (int i = 0; i < numOfMoves; i++)
|
||||
{
|
||||
m = moves[i].move;
|
||||
|
||||
if (m == ttMove)
|
||||
hs = 2*HistoryMax;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
void MovePicker::score_qcaptures() {
|
||||
|
|
Loading…
Add table
Reference in a new issue