Substitute

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.

Game modes
Controls
Tips & strategy
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.

Origins

Chaining machines that each transform a number so an input arrives at a target is function composition, taught in classrooms for decades as the "function machine".

The original emphasis is that the same machines in a different order give a different result.

Non-commutativity is the whole lesson and it is genuinely counter-intuitive, because the arithmetic operations children meet first — adding, multiplying — mostly are commutative. Composing functions is not, and a pipeline that must land exactly on the target is an unusually honest way to show it.

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.

PlayPendium
About this game ↓
PlayPendium · About · Contact · Privacy · Terms · Cookies · Accessibility · Copyright · Browse all games · Classic arcade games · © 2026