From: ianfab Date: Sat, 20 Oct 2018 12:53:06 +0000 (+0200) Subject: Cap king danger for all variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6ea5772d3014c3cb32912edff5e8c8b05365164c;p=fairystockfish.git Cap king danger for all variants Stabilize evaluation by limiting king danger. 3check STC LLR: -2.95 (-2.94,2.94) [0.00,10.00] Total: 12796 W: 5948 L: 5860 D: 988 http://35.161.250.236:6543/tests/view/5b7fa10c6e23db0fbab0dcc7 3check LTC LLR: 0.04 (-2.94,2.94) [0.00,10.00] Total: 10691 W: 4990 L: 4836 D: 865 http://35.161.250.236:6543/tests/view/5bc2d7a36e23db7639060bf5 crazyhouse STC LLR: -2.96 (-2.94,2.94) [0.00,10.00] Total: 7666 W: 3772 L: 3763 D: 131 http://35.161.250.236:6543/tests/view/5b7f1ad66e23db0fbab0dcbc crazyhouse LTC LLR: -2.95 (-2.94,2.94) [0.00,10.00] Total: 6868 W: 3341 L: 3342 D: 185 http://35.161.250.236:6543/tests/view/5baf76c46e23db0fbab0ddec chess STC ELO: 4.17 +-10.1 (95%) LOS: 79.0% Total: 2000 W: 454 L: 430 D: 1116 http://35.161.250.236:6543/tests/view/5b7fa0d96e23db0fbab0dcc5 chess LTC ELO: 1.91 +-9.5 (95%) LOS: 65.3% Total: 2000 W: 398 L: 387 D: 1215 http://35.161.250.236:6543/tests/view/5bbdbcff6e23db7639060be0 shogi ELO: 25.23 +-32.2 (95%) LOS: 93.9% Total: 400 W: 192 L: 163 D: 45 euroshogi ELO: 13.90 +-31.6 (95%) LOS: 80.6% Total: 400 W: 180 L: 164 D: 56 minishogi ELO: 24.36 +-27.6 (95%) LOS: 95.9% Total: 400 W: 145 L: 117 D: 138 bench: 5141418 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 6995e38..e985b8a 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -502,7 +502,7 @@ namespace { { int mobilityDanger = mg_value(mobility[Them] - mobility[Us]); kingDanger = std::max(0, kingDanger + mobilityDanger); - score -= make_score(kingDanger * kingDanger / 4096, kingDanger / 16); + score -= make_score(std::min(kingDanger * kingDanger / 4096, 3000), kingDanger / 16); } }