Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

[Search] Sort moves one-by-one instead of in bulk #14

Open
dannyhammer opened this issue Aug 23, 2024 · 0 comments
Open

[Search] Sort moves one-by-one instead of in bulk #14

dannyhammer opened this issue Aug 23, 2024 · 0 comments

Comments

@dannyhammer
Copy link
Owner

Presently, moves are sorted in the search function with sort_by_cached_key(). This was fine initially, but will be a source of slowdowns in the future.

Because of how branches are pruned in the a/b search, we are not necessarily searching all available moves. We are likely (and ideally) only searching a small fraction. So, if we are not searching all moves, why are we sorting all of them?

Rustic has a good page about this in it's book. You can use a modified version of selection sort to do this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant