lynx-chess / Lynx

Chess Engine, written in C#
https://lichess.org/@/Lynx_BOT
MIT License
47 stars 4 forks source link

⚡ Make eval params `static readonly` fields instead of properties #907

Closed eduherminio closed 3 months ago

eduherminio commented 3 months ago

Can't explain this, but:

Test  | perf/eval-params-static-readonly
Elo   | -7.47 +- 5.76 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | -2.29 (-2.25, 2.89) [-5.00, 0.00]
Games | 6654: +1975 -2118 =2561
Penta | [220, 804, 1393, 719, 191]
https://openbench.lynx-chess.com/test/540/

The key seems to be to create a separated class:

Test  | perf/eval-params-separated-class
Elo   | 0.02 +- 1.89 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | -2.27 (-2.25, 2.89) [0.00, 3.00]
Games | 61812: +18851 -18848 =24113
Penta | [1983, 6899, 13095, 6990, 1939]
https://openbench.lynx-chess.com/test/542/