Releases: Auzzy/1846-routes
Releases · Auzzy/1846-routes
Mail contract fix
Fixed bug that made applying the mail contract always fail.
Further algorithm improvements
Split route set calculation across a set of worker processes. This results in huge performance gains.
Algorithm improvements
There's still some work to be done, but this shows some marked improvements. It runs faster and consumes far less memory, and the amount consumed should stay roughly constant.
Roughly, the algorithm is now:
- For each possible combination of trains:
- sort the trains from biggest to smallest
- sort each train's routes
- perform an itertools.product()-like iteration over the train routes
- from biggest train to smallest, find the highest value route that doesn't overlap the previous selected routes
- if the current route and highest values in the next columns can't beat the best row, skip their iteration.
- for the smallest train, return the highest value non-overlapping route
- from biggest train to smallest, find the highest value route that doesn't overlap the previous selected routes
- after collecting route sets, return the one with the maximum total value
v0.2: Add support for private companies.
Each railroad can specify it possesses the Mail Contract, or where it placed the Steamboat or Meat Packing tile. When calculating tile value, the appropriate bonuses are applied based on for whom the route is being calculated, and if the included tiles have either token.
v0.1.2: Fixing incorrect method invocation.
Fixed incorrect method invocation which was only triggered on a specific path.
v0.1.1: Fixed some data entry errors.
Fixed some data entry issues.