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

⚡ Avoid opposite side offset calculation #345

Merged
merged 14 commits into from
Aug 16, 2023

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Aug 16, 2023

  • Replace opposite side offset calculation. taking advantage that these two are equivalent:

    `(int) whitePieceIndex + oppositeSideOffset`;
    `(int) blackPieceIndex - offset`;
  • Simplify WasProducedByAValidMove since it doesn't need to check for king existence

8+0.08 (WIP)

Score of Lynx 1236 - nooffiset vs Lynx 1223 - main: 6711 - 6482 - 4287  [0.507] 17480
...      Lynx 1236 - nooffiset playing White: 4006 - 2587 - 2147  [0.581] 8740
...      Lynx 1236 - nooffiset playing Black: 2705 - 3895 - 2140  [0.432] 8740
...      White vs Black: 7901 - 5292 - 4287  [0.575] 17480
Elo difference: 4.6 +/- 4.5, LOS: 97.7 %, DrawRatio: 24.5 %
SPRT: llr 1.97 (66.8%), lbound -2.94, ubound 2.94

@eduherminio eduherminio marked this pull request as ready for review August 16, 2023 13:54
@eduherminio eduherminio enabled auto-merge (squash) August 16, 2023 13:54
@eduherminio eduherminio merged commit 9fd25f7 into main Aug 16, 2023
18 checks passed
@eduherminio eduherminio deleted the perf/more-oppositeoffset-improvements branch August 16, 2023 14:04
This pull request was closed.
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