Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Penalty for all enemy pawns xrayed by our bishop. #2662

Closed
wants to merge 1 commit into from

Conversation

xoto10
Copy link
Contributor

@xoto10 xoto10 commented May 5, 2020

Penalty for all enemy pawns xrayed by our bishop.

STC:
LLR: 2.93 (-2.94,2.94) {-0.50,1.50}
Total: 159760 W: 30229 L: 29813 D: 99718
Ptnml(0-2): 2659, 18309, 37534, 18713, 2665
https://tests.stockfishchess.org/tests/view/5eb1d5032326444a3b6d33ce

LTC:
LLR: 2.93 (-2.94,2.94) {0.25,1.75}
Total: 26496 W: 3908 L: 3656 D: 18932
Ptnml(0-2): 192, 2512, 7610, 2720, 214
https://tests.stockfishchess.org/tests/view/5eb1e2dd2326444a3b6d33f9

Bench 5185517

@xoto10
Copy link
Contributor Author

xoto10 commented May 5, 2020

The code here is the same as tested, I had intended to replace the attacks_bb call with PseudoAttacks after useful suggestion from 31m059 but it appears that I only put the new code into a comment.
I will update the PR with whichever version is preferred.

@Vizvezdenec
Copy link
Contributor

I think I see attacks_bb(s, 0) for the first time, how does it work?

@xoto10
Copy link
Contributor Author

xoto10 commented May 6, 2020

You can see it used at the start of the for loop. That 0 is just an empty bitboard, it returns all attacked squares with attacks stopped by marked squares in the bitboard. I give it Bitboard(0) so it returns the full diagonals the bishop is on.
I was originally thinking of fianchetto bishops being blocked by e.g. c6 and d5 (we have Bg2) but perhaps it is useful in closed positions when a bishop can't really move much.

@mstembera
Copy link
Contributor

attacks_bb(s, 0) is slower than PseudoAttacks[BISHOP][s] because it uses magic bitboards.

@vondele
Copy link
Member

vondele commented May 6, 2020

@xoto10 yes, please use the PseudoAttacks version (and verify same bench after the changes).

@vondele
Copy link
Member

vondele commented May 6, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants