Skip to content

Fix and rescale correction history - #426

Merged
TheRealGioviok merged 3 commits into
official-clockwork:mainfrom
TheRealGioviok:retestmorecorrhist
Sep 14, 2026
Merged

TheRealGioviok merged 3 commits into
official-clockwork:mainfrom
TheRealGioviok:retestmorecorrhist

Conversation

@TheRealGioviok

@TheRealGioviok TheRealGioviok commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Our current correction history update is bugged: it checks the difference between ss->staticEval and search scores, but uses the difference with rawEval instead for the update. This has nasty effects, two of which are most evident:

  • Corrhist buckets tend to saturate to +- maxcorrection
  • Startposition score is negative (due to the corrhist values saturating)

Trying to fix this update was tested alone, but loses elo:

Test  | fixcorrhistupdate
Elo   | -5.91 +- 3.34 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | -3.02 (-2.94, 2.94) [-3.00, 0.00]
Games | N: 13986 W: 3550 L: 3788 D: 6648
Penta | [205, 1728, 3291, 1638, 131]

https://ob.cwchess.org/test/1594/

A very plausible reason why this happens is that our current correction magnitudes are low enough that the saturation of the buckets is less problematic than the saturation towards max values actually helps us.

Trying to increase the corrhist max correction alone loses copious amounts of elo, due to the bug now having a higher target to saturate.

Test  | retestmorecorrhist
Elo   | -45.02 +- 10.10 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | -3.05 (-2.94, 2.94) [0.00, 3.00]
Games | N: 1746 W: 369 L: 594 D: 783
Penta | [47, 301, 375, 130, 20]

https://ob.cwchess.org/test/1596/

Recognizing this, the patch applies both changes at once, allowing the fixed, lower magnitude corrhist to grow back on average to bigger evals, yielding very good results:

Passed STC:

Test  | retestmorecorrhist
Elo   | 17.39 +- 6.21 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | 2.95 (-2.94, 2.94) [0.00, 3.00]
Games | N: 4338 W: 1248 L: 1031 D: 2059
Penta | [46, 465, 960, 622, 76]

https://ob.cwchess.org/test/1598/

Passed LTC:

Test  | retestmorecorrhist
Elo   | 31.87 +- 7.84 (95%)
SPRT  | 40.0+0.40s Threads=1 Hash=64MB
LLR   | 2.95 (-2.94, 2.94) [0.00, 3.00]
Games | N: 2088 W: 613 L: 422 D: 1053
Penta | [8, 166, 511, 345, 14]

https://ob.cwchess.org/test/1599/

Bench: 12757393

@TheRealGioviok
TheRealGioviok merged commit 75fd25e into official-clockwork:main Sep 14, 2026
28 checks passed
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.

1 participant