Skip to content
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

⚡ Move Move serialization to Writer thread #999

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Sep 11, 2024

  • Transform engine -> uci channel into a Channel<object>, moving info command serialization to writer thread

  • Stop using InfoCommand as wrapper

6+0.06 - [0, 5]

Score of Lynx-experiment-move-info-string-to-writer-thread-3818-win-x64 vs Lynx 3815 - main: 3972 - 3964 - 5820  [0.500] 13756
...      Lynx-experiment-move-info-string-to-writer-thread-3818-win-x64 playing White: 2882 - 1082 - 2913  [0.631] 6877
...      Lynx-experiment-move-info-string-to-writer-thread-3818-win-x64 playing Black: 1090 - 2882 - 2907  [0.370] 6879
...      White vs Black: 5764 - 2172 - 5820  [0.631] 13756
Elo difference: 0.2 +/- 4.4, LOS: 53.6 %, DrawRatio: 42.3 %
SPRT: llr -2.27 (-78.5%), lbound -2.25, ubound 2.89 - H0 was accepted

After
Remove MiscellaneousCommand, stop using InfoCommand and wrapper and u…

Test  | experiment/move-info-string-to-writer-thread
Elo   | 1.04 +- 3.35 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 2.91 (-2.25, 2.89) [-5.00, 0.00]
Games | 17082: +4807 -4756 =7519
Penta | [395, 1926, 3852, 1969, 399]
https://openbench.lynx-chess.com/test/708/

@eduherminio eduherminio marked this pull request as ready for review September 12, 2024 09:17
@eduherminio eduherminio merged commit 792ca3c into main Sep 12, 2024
27 checks passed
@eduherminio eduherminio deleted the experiment/move-info-string-to-writer-thread branch September 12, 2024 09:20
eduherminio added a commit that referenced this pull request Sep 12, 2024
Add non-thread safe cache for uci move strings
After #999, we can guarantee the `Move.UCIString()` calls related to `info` commands to happen in a single thread, so we can re-try with a regular dictionary.
We also move here the serialization of `bestmove` command to the Writer thread to be able to do the same with `UCIString()` invocations there.
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