1. Input Output Games Online
  2. Function Machine Games

Function Machine Games

Each of these function machine games hides one rule. Feed it numbers, watch what comes out, and crack the rule.

Machine 1 of 5 · 0 cracked

What came out so far
InputOutput
No numbers yet

How to play: type a number from 0 to 100 on the keypad and press Run. The machine shows what comes out and adds the pair to your table. After two different numbers you can press Guess the rule and pick it from four choices.

Each round has 5 machines. Choose One-step for rules that add, subtract, multiply or divide, or Two-step for rules that multiply and then add or subtract.

How a function machine works

A function machine does the same job to every number it gets. A × 3 − 2 machine multiplies by 3 and then takes away 2, so 1 comes out as 1, 2 comes out as 4 and 10 comes out as 28. You cannot see inside, so you learn the rule the way a scientist would: run a test, write down the result, and look for a pattern.

Four runs through a hidden machine
Input12510
Output141328

Pick inputs that are easy to compare. Going from 1 to 2, the output jumps from 1 to 4, a jump of 3. So the machine multiplies by 3. Then 1 × 3 = 3, but only 1 came out, so the machine also takes away 2. The rule is × 3 − 2, and it works for 5 and 10 as well: 5 × 3 − 2 = 13 and 10 × 3 − 2 = 28.

Read the machine's messages. The machines here only give whole numbers of 0 or more. When a number "does not come out even", the rule divides, so try numbers from the times tables such as 10, 20 or 30. When a number would go "below zero", the rule takes something away, so try a bigger number.

Guess with evidence. Two different numbers are enough to tell the four choices apart, but testing a third number is a good habit. If a guess is wrong, the machine keeps your table, so you can run more numbers and try again. After two wrong guesses you can ask it to show the rule.

Same skill, different name

Children in different countries meet this puzzle under different names. The skill is the same everywhere: find the one rule that turns every input into its output.

  • England: the Department for Education's Key Stage 3 mathematics guidance (for ages 11 to 14) says that "function machines are commonly used to sequence the transformations made in equations and to focus on the inverse operations needed to find a solution".
  • Australia: the Australian Curriculum (version 9) for Year 6 gives "using function machines to model operations" as an example for content description AC9M6A03, creating and using rules to generate sets of numbers.
  • United States: worksheets and games more often say input output table, function table, or in and out boxes. The Common Core standards describe the skill as patterns that follow a given rule (4.OA.C.5).

So a child who plays our input output games online, where the table is given and the blanks need filling, is practicing exactly what these function machine games practice from the other direction. For practice away from the screen, the input output worksheets are printable tables with answer keys.

Frequently asked questions

What is a function machine?

A function machine is a pretend machine that does the same thing to every number you put in. Put in 4 and a "× 3" machine gives back 12; put in 5 and it gives back 15. In function machine games the rule is hidden, and your job is to work it out from what goes in and what comes out.

How do you find the rule of a function machine?

Put in two numbers that sit next to each other, like 1 and 2, and see how much the output jumps. If it jumps by 1, the rule adds or takes away. If it jumps by more, that jump is what the machine multiplies by. Then compare one input and its output to find anything added or taken away, and test your rule on every number you tried.

Are function machines the same as input output tables?

Yes, they practice the same skill. A function machine lets you choose the inputs yourself, and an input output table gives you the inputs and asks you to fill in what is missing. Both come down to finding one rule that works for every pair of numbers.

Why does the machine refuse some numbers?

Every machine on this page only gives whole numbers of 0 or more. If a number would come out as a fraction, it tells you to try another number, which is a clue that the rule divides. If a number would come out below zero, it asks for a bigger number, which is a clue that the rule takes something away.