Skip to content

Sometimes change the (materialist, positional) balance #3492

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

Closed

Conversation

snicolet
Copy link
Member

@snicolet snicolet commented May 22, 2021

Our new nets output two values for the side to move in the last layer.
We can interpret the first value as a material evaluation of the
position, and the second one as the dynamic, positional value of the
location of pieces.

This patch changes the balance for the (materialist, positional) parts
of the score from (128, 128) to (121, 135) when the piece material is
equal between the two players, but keeps the standard (128, 128) balance
when one player is at least an exchange up.

Passed STC:
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 15936 W: 1421 L: 1266 D: 13249
Ptnml(0-2): 37, 1037, 5694, 1134, 66
https://tests.stockfishchess.org/tests/view/60a82df9ce8ea25a3ef0408f

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 13904 W: 516 L: 410 D: 12978
Ptnml(0-2): 4, 374, 6088, 484, 2
https://tests.stockfishchess.org/tests/view/60a8bbf9ce8ea25a3ef04101

closes #3492

Bench: 3856635

snicolet added a commit to snicolet/Stockfish that referenced this pull request May 22, 2021
Our new nets output two values for the side to move in the last layer.
We can interpret the first value as a material evaluation of the
position, and the second one as the dynamic, positional value of the
location of pieces.

This patch changes the balance for the (materialist, positional) parts
of the score from (128, 128) to (121, 135) when the piece material is
equal between the two players, and keeps the standard (128, 128) balance
when one player has at least a quality advantage.

Passed STC:
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 15936 W: 1421 L: 1266 D: 13249
Ptnml(0-2): 37, 1037, 5694, 1134, 66
https://tests.stockfishchess.org/tests/view/60a82df9ce8ea25a3ef0408f

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 13904 W: 516 L: 410 D: 12978
Ptnml(0-2): 4, 374, 6088, 484, 2
https://tests.stockfishchess.org/tests/view/60a8bbf9ce8ea25a3ef04101

closes official-stockfish/Stockfish#3492

Bench: 3856635
@snicolet snicolet force-pushed the entertainment_PR branch from 8a0108d to cefd5b3 Compare May 22, 2021 18:00
Our new nets output two values for the side to move in the last layer.
We can interpret the first value as a material evaluation of the
position, and the second one as the dynamic, positional value of the
location of pieces.

This patch changes the balance for the (materialist, positional) parts
of the score from (128, 128) to (121, 135) when the piece material is
equal between the two players, but keeps the standard (128, 128) balance
when one player is at least an exchange up.

Passed STC:
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 15936 W: 1421 L: 1266 D: 13249
Ptnml(0-2): 37, 1037, 5694, 1134, 66
https://tests.stockfishchess.org/tests/view/60a82df9ce8ea25a3ef0408f

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 13904 W: 516 L: 410 D: 12978
Ptnml(0-2): 4, 374, 6088, 484, 2
https://tests.stockfishchess.org/tests/view/60a8bbf9ce8ea25a3ef04101

closes official-stockfish/Stockfish#3492

Bench: 3856635
@snicolet snicolet force-pushed the entertainment_PR branch from cefd5b3 to 3a9a5c3 Compare May 22, 2021 18:33
@vondele
Copy link
Member

vondele commented May 22, 2021

as we use the output of the network in the pure form to check the implementation (see tools branch stockfish/script/cross_check_eval.py), it would probably be a good idea if we give the evaluate function a bool argument that is false by default, and only enables this from the adjusted_NNUE function.

@vondele
Copy link
Member

vondele commented May 22, 2021

I've given that a try on the above mentioned branch, that works for me.

@snicolet
Copy link
Member Author

I'm fine with it :-)

@vondele vondele closed this in a2f01c0 May 22, 2021
@snicolet
Copy link
Member Author

snicolet commented May 22, 2021

Another idea which could be useful in the future is to introduce a maximum bound for the positional twist, which could be adjusted via a private UCI parameter.

That way we could use the same binary twice during game generation, one player with a big twist and the other one with a zeroish twist, to have games with clashing styles using the same binary.

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

Successfully merging this pull request may close these issues.

2 participants