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

Evaluation/Search observation #7

Open
lewismj opened this issue Jun 28, 2023 · 4 comments
Open

Evaluation/Search observation #7

lewismj opened this issue Jun 28, 2023 · 4 comments

Comments

@lewismj
Copy link

lewismj commented Jun 28, 2023

Thanks so much for the YouTube tutorial. It was a pleasure following it.

One thing I noticed, with the custom eval, given this position:

r4rk1/p1p2ppp/1p1nb3/2p1n3/2P2P1N/BP2P3/P1B3PP/R3K2R b - - 0 1

The engine seems to pick (at any depth) e5c4

If I set the passed pawn bonuses to 0, then it gives more sensible, e5c6;. At the moment,
not sure if its the eval, size of the bonuses, or the search.

@tissatussa
Copy link

tissatussa commented Jun 28, 2023

..set the passed pawn bonuses to 0 ..

how to do that ?
there is no UCI option for it, and in the few source files i find no code line which sets such value ..

@lewismj
Copy link
Author

lewismj commented Jun 29, 2023

custom evaluation, that would be the early version 1.2 (or any version that uses the eval. function from that version)
there is a line of code:

https://github.com/maksimKorzh/bbc/blob/master/src/old_versions/bbc_1.2.c

const int passed_pawn_bonus[8] = { 0, 10, 30, 50, 75, 100, 150, 200 };

in the example I cited, where it seems to choose a strange move, its due to those values, set them to zero, or tweak them lower and it picks a better move, maybe its the size of the bonus, or something throwing off the search.

@lewismj
Copy link
Author

lewismj commented Jun 29, 2023

image
image

First is the custom eval, 1.2 vs 1.3 (note, I also replicated by putting back the original evaluation in 1.4 to reproduce it),
set the pawn bonuses lower and it picks the same as the NNUE version.

@lewismj
Copy link
Author

lewismj commented Jun 30, 2023

The one thing you notice, if you do play around with the passed_pawn_bonus array is that it can impact the nodes removed by the late move reduction... (just on the early versions that used the custom evaluation) interesting to see the trade offs. But you can see why NN evals are preferred these days, tweaking custom eval is clearly tricky.

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

No branches or pull requests

2 participants