X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=19c5b0b8c6c45c97d89d5538095ed447680c8c15;hp=ac11b76e5f9568bc6b8d8c0ed8418c504c251104;hb=30418a3cfcdcdd4195e8f87c656dd0106f8ff9e5;hpb=4554d8b2ac1ad260c3f7123b2a7d3a3385fa8306 diff --git a/src/endgame.cpp b/src/endgame.cpp index ac11b76e..19c5b0b8 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-2010 Marco Costalba, Joona Kiiski, Tord Romstad + Copyright (C) 2008-2012 Marco Costalba, Joona Kiiski, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -369,7 +369,7 @@ Value Endgame::operator()(const Position& pos) const { result += Value(square_distance(bksq, nsq) * 32); // Bonus for restricting the knight's mobility - result += Value((8 - count_1s(pos.attacks_from(nsq))) * 8); + result += Value((8 - popcount(pos.attacks_from(nsq))) * 8); return strongerSide == pos.side_to_move() ? result : -result; }