]> git.sesse.net Git - stockfish/commitdiff
Fix a small bug in rook pawn evaluation
authorMarco Costalba <mcostalba@gmail.com>
Tue, 6 Jan 2009 15:10:22 +0000 (16:10 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 6 Jan 2009 15:10:22 +0000 (16:10 +0100)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/evaluate.cpp

index 2bfe52384e4048bfad5aecb812d5640b9a95b6e1..4b98a13c5fc5cfe0f26f0e52798f45db9547882c 100644 (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;