Simplify pawn asymmetry (remove use of semiopen files). (#2054)

This is a functional simplification.

To me, the exclusive OR of semiopenFiles here is quite convoluted. Looks like it can be removed.

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 43885 W: 9731 L: 9653 D: 24501
http://tests.stockfishchess.org/tests/view/5c9041680ebc5925cfff10ea

LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 68437 W: 11577 L: 11533 D: 45327
http://tests.stockfishchess.org/tests/view/5c9101740ebc5925cfff1cbf

bench 3575627
This commit is contained in:
protonspring
2019-03-24 10:41:25 -06:00
committed by Marco Costalba
parent 2f11c03bbf
commit 7133598a98
3 changed files with 6 additions and 7 deletions

View File

@@ -743,12 +743,12 @@ namespace {
&& (pos.pieces(PAWN) & KingSide);
// Compute the initiative bonus for the attacking side
int complexity = 9 * pe->pawn_asymmetry()
int complexity = 9 * pe->passed_count()
+ 11 * pos.count<PAWN>()
+ 9 * outflanking
+ 18 * pawnsOnBothFlanks
+ 49 * !pos.non_pawn_material()
-121 ;
-103 ;
// Now apply the bonus: note that we find the attacking side by extracting
// the sign of the endgame value, and that we carefully cap the bonus so
@@ -776,7 +776,7 @@ namespace {
if ( pos.opposite_bishops()
&& pos.non_pawn_material(WHITE) == BishopValueMg
&& pos.non_pawn_material(BLACK) == BishopValueMg)
sf = 8 + 4 * pe->pawn_asymmetry();
sf = 16 + 4 * pe->passed_count();
else
sf = std::min(40 + (pos.opposite_bishops() ? 2 : 7) * pos.count<PAWN>(strongSide), sf);