You've broken into a dungeon piled with gold — but the minotaur that guards it has woken, and it's coming down the hall. Your mine cart waits in the middle of each room. Fill it with as much treasure as you can, then shove it deeper into the mountain before the beast reaches you.
Drag to orbit the room. Raid all five rooms — they grow from a small antechamber to the deep hoard — then a real optimizer raids them back at you.
Five rooms, five routing puzzles — here's your loot next to the proven-best hauls.
You made round trips from a single depot — the cart — each one limited by how much you can carry, racing a deadline, choosing which loot is worth the steps. That is a real, named problem in Operations Research: the prize-collecting Capacitated Vehicle Routing Problem (a profitable-tour / team-orienteering cousin of the classic VRP).
You don't have to serve every stop. Each carries a prize. A fleet of capacity-limited routes leaves and returns to one depot. You maximize the prize you can bank within a travel budget.
Two hard problems are tangled together. Which loot to take is a knapsack-style selection; how to thread each trip is a routing problem (a little Travelling Salesman). Picking the richest gem first — the obvious move — wastes steps and leaves better hauls behind.
This game's optimizer is a mixed-integer program solved by HiGHS, live in your browser. A 0/1 variable decides whether each arc between cells is walked; a flow variable tracks the load carried on each arc. That single flow does double duty — it caps every trip at your carrying capacity and forbids stray loops disconnected from the cart:
maximize Σ prize · take[gem]
s.t. load out − load in = weight · take[gem]
load on arc ≤ capacity · walk[arc]
Σ steps · walk[arc] ≤ budget
take, walk ∈ {0,1}, load ≥ 0
Branch-and-bound with a relaxed lower bound prunes the search until what's left is provably the best haul — not a good guess.
Swap gems for parcels and the cart for a depot, and this is how delivery fleets are planned every day: limited vehicle capacity, a working-day time budget, and far more drop-offs than any one van can serve — so software chooses which stops, and which van, and in what order.
The same maths routes parcel and grocery vans, field-service technicians, waste-collection trucks and cash-in-transit runs — squeezing more value out of the same fleet and the same hours.
Use case: vehicle routing ▸ Follow me for more games ▸