Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
- Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+ Copyright (C) 2015-2019 Marco Costalba, Joona Kiiski, Gary Linscott, 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
{ V(-10), V(-14), V( 90), V(15), V( 2), V( -7), V(-16) }
};
- // Danger of blocked enemy pawns storming our king, by rank
- constexpr Value BlockedStorm[RANK_NB] =
- { V(0), V(0), V(66), V(6), V(5), V(1), V(15) };
-
#undef S
#undef V
int d = std::min(f, ~f);
safety += ShelterStrength[d][ourRank];
- safety -= (ourRank && (ourRank == theirRank - 1)) ? BlockedStorm[theirRank]
+ safety -= (ourRank && (ourRank == theirRank - 1)) ? 66 * (theirRank == RANK_3)
: UnblockedStorm[d][theirRank];
}