Starship Fuel Router
Every space lane burns a different amount of fuel. Your ship has to reach the target station on the least fuel possible. Learn the planner that finds the cheapest route every time.
π§ Before we start
Oasis Search Party counted stops to find the shortest way. Today the lanes have costs, and the route with fewer stops can burn far more fuel. A map with costs on its lanes is a weighted graph. The trick is to lock in the cheapest station first, then check whether its neighbors have a cheaper way. This planner is called Dijkstra's algorithm.
Build the planner routine
The planner repeats the same four moves. Tap the cards in the order the planner does them.
Fewest stops or least fuel?
The numbers on the lanes are fuel. Add up the lanes of each route and tap the route that burns the least fuel, even if it has more stops.
Run the planner yourself
Gold numbers are the cheapest fuel found so far for each station (β means no route found yet). Tap the unlocked station with the smallest number to lock it in. Its neighbors update automatically if the road through it is cheaper.
Why cheapest-first wins
Two flight rules race on three maps. Nearest next lane always takes the cheapest lane right in front of the ship. Cheapest total first is the planner you just ran. Replay both and compare the fuel.
π What you learned
- A weighted graph puts a cost on every lane, so the best route is the cheapest one, not the one with the fewest stops.
- The planner keeps a best-so-far number for each station and starts everything except the base at infinity.
- It locks in the unlocked station with the smallest number. That number can never be beaten later, so it is final.
- After each lock it checks the neighbors and lowers their numbers when the road through the new station is cheaper.
- Always grabbing the cheapest next lane can waste fuel or hit a dead end. Cheapest total first is guaranteed to work when no lane has a negative cost.