Simplify connected pawn scoring
authorprotonspring <mike@whiteley.org>
Mon, 23 Sep 2019 01:48:52 +0000 (19:48 -0600)
committerStéphane Nicolet <cassio@free.fr>
Mon, 23 Sep 2019 05:12:32 +0000 (07:12 +0200)
commit7e4c3256aab178f303578b4c4a31c59d43421640
tree9d5bbc08b592550a980b5515fa370423fa20cf38
parent64af5434ed2b775b054993de85aa015e5a120da3
Simplify connected pawn scoring

When scoring the connected pawns, replace the intricate ternary expressions
choosing the coefficient by a simpler addition of boolean conditions:

` value = Connected * (2 + phalanx - opposed) `

This is the map showing the old coefficients and the new ones:

```
phalanx and unopposed:     3x   -> 3x
phalanx and opposed:       1.5x -> 2x
not phalanx and unopposed: 2x   -> 2x
not phalanx and opposed:   1x   -> 1x
```

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 11354 W: 2579 L: 2437 D: 6338
http://tests.stockfishchess.org/tests/view/5d8151f00ebc5971531d244f

LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 41221 W: 7001 L: 6913 D: 27307
http://tests.stockfishchess.org/tests/view/5d818f930ebc5971531d26d6

Bench: 3959889

blah
src/evaluate.cpp
src/pawns.cpp