Skip to content

Stabilize route counts and missing subroutes

Latest
Compare
Choose a tag to compare
@Auzzy Auzzy released this 01 Aug 12:39

This release corrects two issues: a non-deterministic number of routes found, and generating an incomplete list of subroutes.

The non-deterministic number of routes was due to an incorrect hashing function. It was hashing the list of tile objects which make up a given route. Since the tiles were actually a set being converted to a list for hashing, their order was non-deterministic, meaning route collisions were not always detected. The solution was to instead hash cell coordinates, and to first sort them.

The incomplete list of subroutes was due to omitting the start coordinate when it was the last coorindate in a subroute. This was alright when subroutes was just used to increase the route options. But its use to determine that routes use a valid path through Chicago means we must include it.