mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43: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
|
@ -253,19 +253,24 @@ void MovePicker::score_noncaptures() {
|
||||||
|
|
||||||
void MovePicker::score_evasions() {
|
void MovePicker::score_evasions() {
|
||||||
|
|
||||||
|
Move m;
|
||||||
|
int hs;
|
||||||
|
|
||||||
|
// Use MVV/LVA ordering
|
||||||
for (int i = 0; i < numOfMoves; i++)
|
for (int i = 0; i < numOfMoves; i++)
|
||||||
{
|
{
|
||||||
Move m = moves[i].move;
|
m = moves[i].move;
|
||||||
|
|
||||||
if (m == ttMove)
|
if (m == ttMove)
|
||||||
moves[i].score = 2*HistoryMax;
|
hs = 2*HistoryMax;
|
||||||
else if (!pos.square_is_empty(move_to(m)))
|
else if (!pos.square_is_empty(move_to(m)))
|
||||||
{
|
hs = int(pos.midgame_value_of_piece_on(move_to(m)))
|
||||||
int seeScore = pos.see(m);
|
-int(pos.type_of_piece_on(move_from(m))) + HistoryMax;
|
||||||
moves[i].score = (seeScore >= 0)? seeScore + HistoryMax : seeScore;
|
else
|
||||||
} else
|
hs = H.move_ordering_score(pos.piece_on(move_from(m)), m);
|
||||||
moves[i].score = 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() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue