X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fendgame.cpp;h=90898e8341a58987b46cb0433018cb4d587484e8;hb=f90f810ac4de5ea2f5582ca05a9354c33971a953;hp=f82beef608e2a1772d0ce472847c62754edcead6;hpb=683595fee15a1d8ceeb1bbd577d96ed9c0f8aaaa;p=stockfish diff --git a/src/endgame.cpp b/src/endgame.cpp index f82beef6..90898e83 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008 Marco Costalba + Copyright (C) 2008-2009 Marco Costalba Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ #include #include "bitbase.h" +#include "bitcount.h" #include "endgame.h" @@ -377,7 +378,7 @@ Value EvaluationFunction::apply(const Position& pos) { result += Value(square_distance(bksq, nsq) * 32); // Bonus for restricting the knight's mobility - result += Value((8 - count_1s_max_15(pos.piece_attacks(nsq))) * 8); + result += Value((8 - count_1s_max_15(pos.piece_attacks(nsq))) * 8); return (strongerSide == pos.side_to_move() ? result : -result); }