]> git.sesse.net Git - stockfish/commit
Fix doubled pawns asymmetry
authorMarco Costalba <mcostalba@gmail.com>
Thu, 20 Nov 2014 11:13:00 +0000 (12:13 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 21 Nov 2014 19:40:25 +0000 (20:40 +0100)
commit84408e5cd68a9323292ddababec4d1183abeef2e
tree7b0096bb61258432629e9b41e9c3a96a70e95904
parent79232be02a03a5e2225b30f843e9597fd85951dc
Fix doubled pawns asymmetry

When evaluating double pawns we use always
lsb() to extract the frontmost square.

This breaks evaluation color symmetry as is
possible to verify with an instrumented evaluate()

  Value evaluate(const Position& pos) {

    Value v = do_evaluate<false>(pos);
    Position p = pos;
    p.flip();
    assert(v == do_evaluate<false>(p));
    return v;
  }

Passed no regression test:

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 21035 W: 4244 L: 4122 D: 12669

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 39839 W: 6662 L: 6572 D: 26605

bench: 8255966
src/pawns.cpp