1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

Fix a small bug in rook pawn evaluation

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-01-06 16:10:22 +01:00
parent cbfbf25d1b
commit 9b87d151bc

View file

@ -1018,8 +1018,8 @@ namespace {
// value if the other side has a rook or queen.
if (square_file(s) == FILE_A || square_file(s) == FILE_H)
{
if( pos.non_pawn_material(them) == KnightValueMidgame // FIXME should be <= ???
&& pos.piece_count(them, KNIGHT) == 1)
if( pos.non_pawn_material(them) <= KnightValueMidgame
&& pos.piece_count(them, KNIGHT) <= 1)
ebonus += ebonus / 4;
else if(pos.rooks_and_queens(them))
ebonus -= ebonus / 4;