mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 08:37:44 +00:00
Further simplify KingDanger init
And remove a tale whitespace while there. No functional change.
This commit is contained in:
+5
-5
@@ -555,7 +555,7 @@ namespace {
|
|||||||
b &= ~pos.pieces()
|
b &= ~pos.pieces()
|
||||||
& ~ei.attackedBy[Them][PAWN]
|
& ~ei.attackedBy[Them][PAWN]
|
||||||
& (ei.attackedBy[Us][ALL_PIECES] | ~ei.attackedBy[Them][ALL_PIECES]);
|
& (ei.attackedBy[Us][ALL_PIECES] | ~ei.attackedBy[Them][ALL_PIECES]);
|
||||||
|
|
||||||
if (b)
|
if (b)
|
||||||
score += popcount<Full>(b) * PawnSafePush;
|
score += popcount<Full>(b) * PawnSafePush;
|
||||||
|
|
||||||
@@ -917,14 +917,14 @@ namespace Eval {
|
|||||||
|
|
||||||
void init() {
|
void init() {
|
||||||
|
|
||||||
const int MaxSlope = 87;
|
const int MaxSlope = 8700;
|
||||||
const int Peak = 12800;
|
const int Peak = 1280000;
|
||||||
int t = 0;
|
int t = 0;
|
||||||
|
|
||||||
for (int i = 0; i < 400; ++i)
|
for (int i = 0; i < 400; ++i)
|
||||||
{
|
{
|
||||||
t = std::min(Peak, std::min(i * i * 27 / 100, t + MaxSlope));
|
t = std::min(Peak, std::min(i * i * 27, t + MaxSlope));
|
||||||
KingDanger[i] = apply_weight(make_score(t / 10, 0), Weights[KingSafety]);
|
KingDanger[i] = apply_weight(make_score(t / 1000, 0), Weights[KingSafety]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user