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

Improve dangerzone calculation performance #8

Open
krestenlaust opened this issue Jan 27, 2023 · 1 comment · May be fixed by #9
Open

Improve dangerzone calculation performance #8

krestenlaust opened this issue Jan 27, 2023 · 1 comment · May be fixed by #9
Labels
Core (ChessGame) Related to Chess core enhancement New feature or request

Comments

@krestenlaust
Copy link
Owner

  • Right now, every time a single move has been made, either in a real move or a simulated move (all moves are simulated before being presented to the player), all pieces dangersquares are being recalculated.

Changing this approach to only update possibly affected pieces, should improve performance.

  • Performance analysis results of bots, shows that UpdateDangerzones() is a major hot path. Any improvements should improve calculation speed of bots.
@krestenlaust krestenlaust added enhancement New feature or request Core (ChessGame) Related to Chess core labels Jan 27, 2023
@krestenlaust krestenlaust linked a pull request Jan 27, 2023 that will close this issue
@krestenlaust
Copy link
Owner Author

I haven't had the time to look at this project, but this should probably be the highest priority when trying to improve the bot, as calculations expand considerately mid-game, and use a whole lot of computing power simply recalculating dangerzones of pieces that haven't changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ChessGame) Related to Chess core enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant