X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=e1a000c6323d081a2458285083c2c38a4b0910b8;hp=0fef0258b1de329d7d6bede6a11d933cb6ba6f69;hb=86c20416c85ac93ab982dda404fc268a92636fa6;hpb=c9e396b5424802b80e80394979ca84688b523244 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 0fef0258..e1a000c6 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -915,12 +915,12 @@ namespace Eval { Weights[KingDangerUs] = weight_option("Cowardice", "Cowardice", WeightsInternal[KingDangerUs]); Weights[KingDangerThem] = weight_option("Aggressiveness", "Aggressiveness", WeightsInternal[KingDangerThem]); - const int MaxSlope = 30; - const int Peak = 1280; + const double MaxSlope = 30; + const double Peak = 1280; for (int t = 0, i = 1; i < 100; ++i) { - t = std::min(Peak, std::min(int(0.4 * i * i), t + MaxSlope)); + t = std::min(Peak, std::min(0.4 * i * i, t + MaxSlope)); KingDanger[1][i] = apply_weight(make_score(t, 0), Weights[KingDangerUs]); KingDanger[0][i] = apply_weight(make_score(t, 0), Weights[KingDangerThem]);