Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a small bug in rook pawn evaluation

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
  • Loading branch information...
commit 9b87d151bcdda4c8992f97582b974dc7c4c84686 1 parent cbfbf25
@mcostalba authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/evaluate.cpp
View
4 src/evaluate.cpp
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.