inspired by Terje's great engine Weiss I implemented the exclusion of "bad squares" from mobility with following rules:
A "bad mobility square" is:
1) squares that are attacked by enemy's pawns.
2) friendly pawns blocked by any piece
3) friendly pawns on 2. rank
(I wanted to implement 1) since many years. I had 2) implemented in another way before, but didn't gain ELO. 3) is completely new for me.)
1) and 2) are illustrated by this position:
[d]8/5k1p/1p1pRp2/3P4/PpP3Pp/6bP/6K1/8 w - - 0 2 bm c4c5
yields to this MobilityBoard for white:
Code: Select all
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 0 1
0 1 0 0 0 1 0 1
1 1 1 1 1 1 1 1
0 1 0 1 1 1 0 0
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
Code: Select all
mn += _bitcnt(a & mobilityb) << 3;
Code: Select all
mn += _bitcnt(a) << 3;
But, actually, it's playing 20-30 ELO weaker with the mobility mask.
Who has an idea, why it doesn't work?
PS: Here the commit: https://github.com/olithink/OliThink/co ... 7536087b9b