Simplify ThreatByKing to be a single Score.
author31m059 <37052095+31m059@users.noreply.github.com>
Thu, 5 Jul 2018 02:18:52 +0000 (22:18 -0400)
committerStéphane Nicolet <cassio@free.fr>
Thu, 5 Jul 2018 23:34:01 +0000 (01:34 +0200)
commit0f480957595cc5a20d314211e19b86f1beb44f87
treea1eb9e4d10b8c772738096b857dadb90672c374b
parent3279655f12ff64603b62a99fe9d7e2c9ea6fb4ef
Simplify ThreatByKing to be a single Score.

In the current master, ThreatByKing is an array of two Scores, one for
when we have a single attack and one for when we have many. The latter
case is very rarely called during bench and was recently given a strange
negative value during a tuning run, as pointed out by @candirufish on
commit efd4ca2.  Here, we simplify away this second case entirely, and
increase the remaining ThreatByKing to compensate.

Although I derived the parameter tweak independently, with the goal of
preserving the same average bonus, I later noticed that a very similar
Score had already been derived by an ongoing SPSA tuning session.
I therefore recognize @candirufish for first discovering these values.

I would also like to thank @Rocky640 for valuable feedback that pointed
me in the direction of ThreatByKing.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 7677 W: 1772 L: 1623 D: 4282
http://tests.stockfishchess.org/tests/view/5b3db0320ebc5902b9ffe97a

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 108031 W: 18329 L: 18350 D: 71352
http://tests.stockfishchess.org/tests/view/5b3dbf4b0ebc5902b9ffe9db

Closes https://github.com/official-stockfish/Stockfish/pull/1666

Bench: 4678861
src/evaluate.cpp