5q0

Cost versus speed versus space in puzzle games

Three scores, all pulling against each other. The reason you cannot win them all, and how to choose where to lose.

by Laurens Dauchy, Builder of 5q0
In short

In an optimisation puzzle, cost, speed and space compete: the cheapest solution is rarely the fastest and almost never the smallest, so there is no single best answer, only a frontier of good tradeoffs. This is real mathematics, called a Pareto front, and 5q0 is the clearest place to feel it, scoring every machine on cost, cycles and footprint at once. Learning to choose where on that frontier you want to sit, instead of chasing one number, is the whole skill.

The first time an optimisation puzzle scores your solution three ways at once, the same thought arrives: fine, I will just make it best at all three. You cannot, and the reason you cannot is the entire point of the genre. Cost, speed and space pull against each other, so the cheapest solution is rarely the fastest and almost never the smallest, and there is no single best answer, only a set of good tradeoffs to choose between. The clearest place to feel this is 5q0, which scores every machine on cost, cycles and footprint at once and lets you watch the three fight. This article is about why they fight, what the frontier between them is called, and how to read it.

Why the three compete

Start with the mechanism, because the competition is not arbitrary. Making a machine faster usually means doing more things at once, which means more parts, which costs more and takes more room. Making it smaller usually means routing everything through a tighter space, which forces steps to wait their turn, which costs cycles. Making it cheaper usually means using fewer parts, which means each part does more work in sequence, which is slower. Every lever you pull to improve one score pushes at least one other the wrong way. That is not a flaw in the scoring; it is the scoring telling the truth about a real constraint.

Opus Magnum, the game that made this famous, scores exactly these three, cost, cycles and area, and its design invites you to improve any one of them after solving. 5q0 uses the same three under the names cost, cycles and footprint. The names vary across the genre; the three-way tension is constant, because it comes from the physics of building things, not from any one game.

The frontier has a name

What you are exploring when you chase better scores is a real mathematical object. In multi-objective optimization, a problem with several competing goals has no single optimum; it has a set of solutions that are each best in some direction. The membership rule for that set is Pareto efficiency: a solution belongs to it when you cannot improve any one score without making another worse. Those solutions form the Pareto front, and everything not on the front is simply worse than something on it in every way that matters.

This is worth knowing because it changes the question you are asking. A beginner asks “what is the best solution”. A player who has seen the frontier asks “which point on the front do I want”, which is a better question because it has an answer. The table shows how the three archetypal points differ.

Solution style Wins on Pays with Where it sits Best when
The cheapest Lowest cost Slow, sometimes large One end of the front You are scored on cost
The fastest Fewest cycles Expensive, often large Other end of the front Throughput is the goal
The smallest Tiniest footprint Slow, sometimes costly A third corner Space is the constraint
A balanced build None outright Nothing badly Middle of the front You want a solid all-rounder

Each row is a legitimate best solution; they just answer different questions. In 5q0 you can chase any of them, and the game records where you landed, which is what makes returning to an old level to hunt a different corner so satisfying.

How to read a front while you play

The practical skill is learning to feel where you are on the frontier without doing any maths, and it starts, as always, after you have a working solution, because your first solution is never the best one. The tell is simple: when every change you try makes some score worse, you are on the front, and when a change improves one score for free, you are not there yet. Chase the free improvements first, because those are pure wins that cost nothing. Once the free wins run out, every further step becomes a genuine trade, and that is where the real decision starts.

At that point the question is which score you care about for this attempt, and the honest answer is that it depends on what you are trying to prove, which is the good kind of “it depends”. If you want to see how cheap a level can go, push cost and accept the slowness. If you want the machine to fly, spend the parts. The broader skill of optimisation is exactly this habit of choosing a direction on purpose rather than drifting toward whichever number happened to move.

The same shape as real engineering

This is not a toy version of thinking, it is a compressed version of a real one. An engineer balancing weight against cost against strength, or latency against throughput against memory, is standing on the same kind of frontier, choosing a point rather than seeking a mythical solution that wins everything. Puzzle games strip the domain away and leave the structure bare, which is why the tradeoff feels familiar to people who build things for a living, and why practising it on a machine-puzzle is genuinely the same move, just with lower stakes and faster feedback.

When you can ignore all of this

There is a real case for not caring at all, and it is worth stating so the frontier does not feel like an obligation. If you only need a level solved, solve it however you like and move on; the three-way squeeze is entirely optional. In 5q0 you can finish the whole game without once chasing a better score, because the frontier is a playground, not a gate. The tradeoff only starts to matter the moment you decide you want it to, which is the healthiest way for a difficulty to work: available when you are curious, invisible when you are not.

Key takeaways: reading the three-way tradeoff

Cost, speed and space compete because improving one usually spends another, so there is no single best solution, only a Pareto front of good tradeoffs. Learning to see the front, chase the free wins first, then choose a direction on purpose, is the actual skill an optimisation puzzle trains, and it is the same shape as real engineering. 5q0 is the clearest place to practise it, scoring every machine on cost, cycles and footprint at once, and letting you hunt whichever corner you like or none at all. The best players are not the ones chasing one number; they are the ones who know which number they are chasing and why.

Quick answers

Why can’t one solution be best at cost, speed and space?

Because the three usually pull against each other: making a solution faster often means adding parts, which raises cost and footprint, and shrinking it often costs speed. In 5q0 the cheapest machine, the fastest machine and the smallest are typically three different machines. This is not a game quirk but real multi-objective optimisation, where no single solution wins on every measure and the best you can do is choose a good tradeoff.

What is a Pareto front in a puzzle game?

A Pareto front is the set of solutions where you cannot improve one score without making another worse. In 5q0, a solution is on the front when it is, say, the cheapest possible for its speed: any cheaper and it gets slower. The front is the collection of all such best-tradeoff solutions, and the interesting puzzle work happens there, choosing which point on it fits the goal rather than chasing a single number.

Should I optimise for cost, speed or space first?

Optimise for whichever the puzzle or your curiosity cares about, but solve it first without optimising at all. In 5q0 the practical order is to get any working machine, then pick one axis, usually cost or cycles, and push it while watching what the others do. There is no universally correct priority, because the right point on the frontier depends on what you are trying to prove, which is exactly what makes the choice interesting.

Is the cost-speed-space tradeoff real engineering?

Yes. Balancing competing objectives, weight against cost against strength, latency against throughput against memory, is the daily reality of engineering and a formal field of mathematics. Puzzle games like 5q0 compress it into cost, cycles and footprint, so the thinking you practise on a machine-puzzle is the same shape an engineer uses on a real design. The stakes differ; the structure of the decision does not.

When does the tradeoff not matter?

When you only need a solution to work and do not care how efficient it is, the tradeoff is irrelevant: solve it any way you can and move on. The three-way squeeze only matters once you decide to optimise, which is optional. In 5q0 you can finish every level without ever chasing a better score; the frontier is there for when you want it, not a wall you have to climb to progress.

read as markdownthe plain source of this article, for people and for machines

Keep reading

Craft5 June 20269 minpillar

What optimisation puzzle games actually teach you

Optimisation puzzles teach a specific, real way of thinking, and the honest evidence on whether it transfers is more mixed than the marketing suggests.

Solving1 July 20267 min

Why your first solution is never the best one

In an optimisation puzzle the game starts after you solve it. Here is why the first working answer is only a draft, and how the compression pass actually works.

Guides29 June 20268 min

Games that improve spatial reasoning, and how they work

Games that make you rotate, fit and route things in your head genuinely exercise spatial reasoning. Here is which ones, how it works, and what to expect.

The game this blog is about

5q0 is a free deterministic machine-puzzle game. You build compact mechanisms that transform tokens under three competing constraints: cost, cycles and footprint. Thirty levels, a solver that proves every one of them solvable, and no accounts, ads, energy timers or paid hints, permanently.

BEGIN THE COMMISSIONING