forked from official-stockfish/Stockfish
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extra Backward penalty for backward pawns if on rank 4/5/6.
Bench 3358030
- Loading branch information
xoto10
committed
Jul 15, 2019
1 parent
7090d25
commit 33b0718
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33b0718
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
White d6 e7 Black d7
a pawn on 6th rank an only be backward if it supports a passer.... do we really want to penalize it more ?
on the contrary, in SF9, the backward penalty was not given for ranks above 4, but eventually this was simplified away
Another side note
Backward + Backward * bool(SquareBB[s] & Adv)
could be written
Backward + Backward * bool(Adv & s)
or better:
Backward * (1 +bool(Adv & s))
Good luck
33b0718
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i was doubtful about including 6th rank, but opted to start with that included. I think it could be a phalanx formation on 6th rank?
I did think of the * (1 + ...) style but chose this, one reason being that the 2nd Backward term might change to use WeakUnopposed. I should have remembered that bitboard & s works, but didn't, my bad. Your last 2 look similar to me, + and * vs * and +, not sure there's any difference there other than style.
Cheers for the comments :-)
33b0718
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we score the pawn using the following order
we never give a backward bonus to a phalanx pawn.
if (support | phalanx)
...
else if (!neighbour)
...
else if (backward)
...
33b0718
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-) D'oh! True. I'd spotted that for isolated but missed that the same logic applied for phalanx. Sure enough my updated version has no change in bench. Think I need some sleep :-)