Skip to content

Commit

Permalink
Shuffle movepicker score
Browse files Browse the repository at this point in the history
Believed to be a speed optimization as benched
on Windows with bench realtime affinity 0x1 deleting
highest and lowest runs:

Base	Test
1549259	1608202
1538115	1583934
1543168	1556938
1536365	1554179
1533026	1582010

Signature remains unchanged and gives anywhere from 1-2% nps
boost in analysis depending on number of cores used.

No functional change.
  • Loading branch information
jcalovski authored and mcostalba committed Apr 24, 2014
1 parent a89b26b commit f70cef3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/movepick.cpp
Expand Up @@ -167,11 +167,11 @@ void MovePicker::score<CAPTURES>() {
it->value = PieceValue[MG][pos.piece_on(to_sq(m))]
- Value(type_of(pos.moved_piece(m)));

if (type_of(m) == PROMOTION)
it->value += PieceValue[MG][promotion_type(m)] - PieceValue[MG][PAWN];

else if (type_of(m) == ENPASSANT)
if (type_of(m) == ENPASSANT)
it->value += PieceValue[MG][PAWN];

else if (type_of(m) == PROMOTION)
it->value += PieceValue[MG][promotion_type(m)] - PieceValue[MG][PAWN];
}
}

Expand Down

0 comments on commit f70cef3

Please sign in to comment.