Skip to content

Conversation

@pb00068
Copy link
Contributor

@pb00068 pb00068 commented Jan 16, 2020

Currently on a normal bench run in ~0,7% of cases 'improving' is set to true although the static eval isn't improving at all, just keeping equal. It looks like the gt-operator is more appropriate here,
since it returns to 'improving' its literal meaning without having other side effects.

STC {-1.00,3.00} failed yellow:
https://tests.stockfishchess.org/tests/view/5e1ec38c8fd5f550e4ae1c28
LLR: -2.93 (-2.94,2.94) {-1.00,3.00}
Total: 53155 W: 10170 L: 10109 D: 32876
Ptnml(0-2): 863, 6282, 12251, 6283, 892

non-regression LTC passed:
https://tests.stockfishchess.org/tests/view/5e1f1c0d8fd5f550e4ae1c41
LLR: 2.98 (-2.94,2.94) {-1.50,0.50}
Total: 23961 W: 3114 L: 3018 D: 17829
Ptnml(0-2): 163, 2220, 7114, 2298, 170

bench: 4561386

Currently on a normal bench run in ~0,7% of cases 'improving' is set to
true although the static eval isn't improving at all, just keeping
equal. It looks like the gt-operator is more appropriate here,
since it returns to 'improving' its literal meaning without sideffects.

STC {-1.00,3.00} failed yellow:
https://tests.stockfishchess.org/tests/view/5e1ec38c8fd5f550e4ae1c28
LLR: -2.93 (-2.94,2.94) {-1.00,3.00}
Total: 53155 W: 10170 L: 10109 D: 32876
Ptnml(0-2): 863, 6282, 12251, 6283, 892

bench: 5216925

non-regression LTC passed:
https://tests.stockfishchess.org/tests/view/5e1f1c0d8fd5f550e4ae1c41
LLR: 2.98 (-2.94,2.94) {-1.50,0.50}
Total: 23961 W: 3114 L: 3018 D: 17829
Ptnml(0-2): 163, 2220, 7114, 2298, 170

bench: 4561386
@pb00068
Copy link
Contributor Author

pb00068 commented Jan 16, 2020

Beforehand:
I do not claim/believe this change being a significant simplification.
Neither I claim/believe this being an (significant) elo-gain.

This is rather a cosmetic change solving a small code smell.

I don't like that currently 'improving' is set to true, even if the eval isn't improving at all. This contratdicts the Principle of Least Surprise.
We could rename the variable into 'asGoodAs' or 'noWorse' but that is not satisfying since in more that 99% the eval is effectively improving (or just coming out from a longer check-sequence where we have no evals to compare)
On the other hand renaming the variable into something like improving_or_equalizing leads to a long complicate name which is not satisfying either.
Therefore I asked myself why there's a ge-operator instead of a gt-operator, if there's a good reason to prefer the ge-operator over the gt-operator?
Test results IMO show that there is no reason to prefer ge-operator over the gt-operator,
so that we just can use the latter simplifying the conception behind 'improving'

@vdbergh
Copy link
Contributor

vdbergh commented Jan 16, 2020

Improving is just an empirical heuristic which AFAICS does not have any theoretical foundation. So as long as this heuristic is not understood better, I would say it doesn't matter whether < or <= is used, as long as they are equivalent Elo wise.

@Alayan-stk-2
Copy link

Alayan-stk-2 commented Jan 16, 2020

I'd be in favour of merging this, considering the test results and the code change. Using >= instead of > also failed to show any gain in other engines I saw it tested for. If we want to be sure it's not worth a little something to keep it (or better, that it gains a tiny something to remove it), a 3rd test might be needed.

@snicolet
Copy link
Member

Looks good to me.

Currently on a normal bench run in ~0,7% of cases 'improving' is set to
true although the static eval isn't improving at all, just keeping
equal. It looks like the gt-operator is more appropriate here,
since it returns to 'improving' its literal meaning without sideffects.

STC {-1.00,3.00} failed yellow:
https://tests.stockfishchess.org/tests/view/5e1ec38c8fd5f550e4ae1c28
LLR: -2.93 (-2.94,2.94) {-1.00,3.00}
Total: 53155 W: 10170 L: 10109 D: 32876
Ptnml(0-2): 863, 6282, 12251, 6283, 892

non-regression LTC passed:
https://tests.stockfishchess.org/tests/view/5e1f1c0d8fd5f550e4ae1c41
LLR: 2.98 (-2.94,2.94) {-1.50,0.50}
Total: 23961 W: 3114 L: 3018 D: 17829
Ptnml(0-2): 163, 2220, 7114, 2298, 170

bench:  4561386
@snicolet snicolet closed this in f63d112 Jan 23, 2020
@snicolet
Copy link
Member

Merged via f63d112, thanks!

snicolet pushed a commit to snicolet/Stockfish that referenced this pull request Jan 29, 2020
Currently on a normal bench run in ~0,7% of cases 'improving' is set to
true although the static eval isn't improving at all, just keeping
equal. It looks like the strict gt-operator is more appropriate here,
since it returns to 'improving' its literal meaning without sideffects.

STC {-1.00,3.00} failed yellow:
https://tests.stockfishchess.org/tests/view/5e1ec38c8fd5f550e4ae1c28
LLR: -2.93 (-2.94,2.94) {-1.00,3.00}
Total: 53155 W: 10170 L: 10109 D: 32876
Ptnml(0-2): 863, 6282, 12251, 6283, 892

non-regression LTC passed:
https://tests.stockfishchess.org/tests/view/5e1f1c0d8fd5f550e4ae1c41
LLR: 2.98 (-2.94,2.94) {-1.50,0.50}
Total: 23961 W: 3114 L: 3018 D: 17829
Ptnml(0-2): 163, 2220, 7114, 2298, 170

CLoses official-stockfish/Stockfish#2496

bench: 4561386
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.

4 participants