Zannick / logic-graph

Tools for video game logic representation and analysis, particularly routing and beatability checks for speedruns and randomizers.
MIT License
3 stars 0 forks source link

Retrieve from segments no longer in the heap #129

Closed Zannick closed 8 months ago

Zannick commented 8 months ago

After some time, the earlier buckets become empty, but the db min still indicates that those progress levels have elements that are better than the smallest item in the heap. Currently, the only way we would retrieve those elements is by running out of heap elements and retrieving from the smallest progress bucket, then processing those, and noticing the results are higher than the db min at that level.

Instead we should check the db minimums for those empty buckets and retrieve from the lowest one if it's sufficiently smaller than the heap minimum. "Sufficiently smaller" could either be a percentage of the heap minimum, of the current limit, or of the remaining time (limit - heap min).