minimize time-to-target across all resources using optimal trades
This tool calculates the optimal set of one-time trades to make right now, before production starts ticking, in order to reach all four resource targets in the minimum possible total time.
The objective is collective: the goal is to minimize the time at which the last resource hits its target. Fast resources should donate to slow ones.
Trade mechanics: you give 12 or more units of one resource and receive exactly ⌊given ÷ 3⌋ units of another. The minimum trade is 12 → 4. There is no cap on how many trades you can do, but all trades happen at the same time, before any production.
Storage cap: once a resource hits its storage limit, production is wasted. If a resource would hit its cap before its target without trades, its target is effectively unreachable without help — the optimizer will redirect surplus from faster resources to fix this.
Trade direction: each resource is either a net giver or a net receiver — never both. The optimizer works internally with net flows per pair, so circular trades (A→B and B→A) are structurally impossible.
Paste import: copy your resource summary from the game, paste it into the box below the input table, and hit "Parse pasted text". The parser recognises Wood, Stone, Iron (mapped to Iron here), and Food, along with Warehouse capacity and Food Cellar capacity. Targets are never overwritten by the paste.
Solver: coordinate descent with 100 random restarts. For 4 resources this finds the global optimum reliably, but results may vary slightly between runs on edge cases.