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

Pre-Compute Non-Pawn Move Masks #54

Open
Bonifatius94 opened this issue Apr 21, 2022 · 0 comments
Open

Pre-Compute Non-Pawn Move Masks #54

Bonifatius94 opened this issue Apr 21, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Bonifatius94
Copy link
Owner

Issue:

  • computing king / knight / sliding piece masks may be expensive
  • it can be pre-computed and stored in an array, improving the overall draw-gen performance

Suggested Solution:

  • run pre-computation when loading the module, caching common move masks in arrays
  • for king / knight moves: replace the computation by a simple lookup
  • for sliding piece moves: combine a lookup with some bit hacks like hyperbola quintessence to determine blocking pieces
@Bonifatius94 Bonifatius94 added the enhancement New feature or request label Apr 21, 2022
@Bonifatius94 Bonifatius94 self-assigned this Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant