Skip to content

Conversation

@SFisGOD
Copy link
Contributor

@SFisGOD SFisGOD commented Sep 4, 2020

If there is a slight to moderate imbalance, use classical eval randomly for 1/16 or around 6.3% of the time.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 32320 W: 3562 L: 3377 D: 25381
Ptnml(0-2): 144, 2609, 10478, 2776, 153
https://tests.stockfishchess.org/tests/view/5f520615ba100690c5cc5f80

LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 21032 W: 1116 L: 974 D: 18942
Ptnml(0-2): 20, 837, 8664, 971, 24
https://tests.stockfishchess.org/tests/view/5f522eaaba100690c5cc5f8c

Bench: 3696738

@SFisGOD
Copy link
Contributor Author

SFisGOD commented Sep 4, 2020

We already use classical eval for large imbalances so this patch is a natural extension of that idea to smaller imbalances albeit we do it randomly. And of course, we only do it rarely.

Also this patch essentially passed twice since the contempt tweak is just about neutral
https://tests.stockfishchess.org/tests/view/5f519cc3ba100690c5cc5f49

STC: (with contempt=12)
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 30816 W: 3348 L: 3165 D: 24303
Ptnml(0-2): 146, 2449, 10050, 2602, 161
https://tests.stockfishchess.org/tests/view/5f51db79ba100690c5cc5f70

LTC: (with contempt=12)
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 19744 W: 984 L: 850 D: 17910
Ptnml(0-2): 18, 743, 8221, 867, 23
https://tests.stockfishchess.org/tests/view/5f51fef0ba100690c5cc5f7c

I initially thought that the contempt change is necessary for this to work but the tests suggests that it is not.

@ddugovic
Copy link

ddugovic commented Sep 4, 2020

Who is going to update the evaluation guide to specify that evaluations are nondeterministic?

@FauziAkram
Copy link
Contributor

Does the "analyze" feature benefit from this kind of patches? or is this just for games?

@Vizvezdenec
Copy link
Member

it does @FauziAkram

@vondele
Copy link
Member

vondele commented Sep 4, 2020

@FauziAkram I would say, of course.... makes the engine find better moves more quickly, that ought to be good for analysis as well.

@ddugovic this is not so different from e.g. dynamic contempt where the evaluation result depends on the search state.
Note that the evaluation is still deterministic, is just depends on the node counter.
This is very similar to value_draw() which returns a draw value for 3-fold positions that is similarly node counter dependent.

@vondele vondele added the to be merged Will be merged shortly label Sep 4, 2020
@vondele vondele closed this in d539da1 Sep 4, 2020
lucabrivio pushed a commit to lucabrivio/Stockfish that referenced this pull request Sep 4, 2020
If there is a moderate imbalance, use classical eval with small probability (1/16),
as derived from the node counter.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 32320 W: 3562 L: 3377 D: 25381
Ptnml(0-2): 144, 2609, 10478, 2776, 153
https://tests.stockfishchess.org/tests/view/5f520615ba100690c5cc5f80

LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 21032 W: 1116 L: 974 D: 18942
Ptnml(0-2): 20, 837, 8664, 971, 24
https://tests.stockfishchess.org/tests/view/5f522eaaba100690c5cc5f8c

closes official-stockfish/Stockfish#3107

Bench: 4109324
@gonzalezjo
Copy link

Is this safe for search stability?

@locutus2
Copy link
Member

locutus2 commented Sep 6, 2020

@gonzalezjo
One test of investigation this using: use the same "random" behavior for a position in all searches.
https://tests.stockfishchess.org/tests/view/5f54bd3b2d02727c56b36d61

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.

8 participants