MarkZH/Genetic_Chess

Move sorter partitioning

MarkZH opened this issue · 1 comments

MarkZH commented

Check whether successively (stable-)partitioning all moves with the least significant sorter first results in the same move order as the current algorithm:

// C++23 version
for(sorter : sorters | std::ranges::views::take(sorter_count) | std::views::reversed_view)
{
    std::ranges::stable_partition(moves, sorter);
}
MarkZH commented

This is good for practice, but it's probably not as good as the current algorithm since stable_partition requires extra memory to be allocated.