Line up a row of function machines so a number fed in one end emerges as the target, but the order you chain them changes everything.
Was this fun?
How to play
You're given a starting input, a target output, and a set of function machines that each transform a number. Chain machines into a pipeline so the input flows through them and comes out exactly equal to the target. Because each machine alters the value, the sequence matters, the same machines in a different order give a different result. The output updates as you build the chain.
Each machine applies its own operation to whatever enters it.
Order is significant, rearranging the chain changes the output.
Watch the live output as you add or remove machines.
Match the target exactly to solve the puzzle.
Game modes
Daily (seeded): the same puzzle for everyone, in Easy, Medium, or Hard.
Practice (random): fresh puzzles at your chosen difficulty.
Controls
Desktop: click machines to add them to the chain and click to remove or reorder them.
Phone & tablet: tap machines to build the pipeline and tap to take them back out.
Tips & strategy
Trace the value forward after each machine to see exactly where it overshoots or falls short.
If you're close but off by a factor, try swapping a multiply machine earlier or later in the chain.
Think about inverse effects, a later machine can undo an earlier one's overshoot.
What you'll learn
Substitute builds intuition for function composition and order of operations by chaining visual machines that transform a value step by step.
Skills: function composition, order of operations, input–output reasoning, pre-algebra/algebra
Best for: roughly grades 7–10 (ages 12–16)
For parents & teachers: a visual on-ramp to functions before the formal notation.
About Substitute
Substitute is an original, free browser puzzle that builds intuition for function composition and order of operations through visual machine chains. Play instantly, no account needed.
A free, original browser game on PlayPendium. No download, no install.