]> git.sesse.net Git - stockfish/commit
Linear formula for w. Bench: 3328507 (#2239)
author31m059 <37052095+31m059@users.noreply.github.com>
Sun, 14 Jul 2019 12:40:45 +0000 (08:40 -0400)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Sun, 14 Jul 2019 12:40:45 +0000 (14:40 +0200)
commita0360cc2d4397edaad590cdf131fef95915b55c0
treec307afbd6ab3ecbdf8d9b1dc35d5362ac1b67ba5
parentff69d570d774c465b63ed65f8f14afdaac4eb107
Linear formula for w. Bench: 3328507 (#2239)

In Stockfish, both the middlegame and endgame bonus for a passed pawn are calculated as a product of two factors. The first is k, chosen based on the presence of defended and unsafe squares. The second is w, a quadratic function of the pawn's rank. Both are only applied if the pawn's relative rank is at least RANK_4.

It does not appear that the complexity of a quadratic function is necessary for w. Here, we replace it with a simpler linear one, which performs equally at both STC and LTC.

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 46814 W: 10386 L: 10314 D: 26114
http://tests.stockfishchess.org/tests/view/5d29686e0ebc5925cf0d76a1

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 82372 W: 13845 L: 13823 D: 54704
http://tests.stockfishchess.org/tests/view/5d2980650ebc5925cf0d7bfd

Bench: 3328507
src/evaluate.cpp