Magic Box — free browser game
Discover the hidden math rule — probe, observe, predict. A single wrong answer ends the run.
Controls
Number keys 0-9 · Enter: submit · ⌫: delete · R: restart
How to play
Tips and detailed strategy
Magic Box is a logic-and-inference puzzle in which every level hides a mathematical function ƒ(x) on screen, and you must deduce it by probing. You feed the box an input and watch the output: you type 3 and the box answers 7; you try 5 and it answers 11 — the pattern looks like double-plus-one, so ƒ(x) = 2x + 1. To test that, you have 4 probes per level: pick an input between 0 and 9 you have not tried yet, press PROBE, and the result lands in the history. When you think you have enough evidence, press SWITCH TO PREDICT; the box now hands you a fresh random x you did not probe, and you must enter ƒ(x). Two correct predictions in a row clear the level; a single wrong answer ends the game and your highest cleared level is stored as your best in the browser. As you climb, the function family gets harder: first simple add/subtract (x + 3, 9 − x), then multiplier-and-constant (2x + 1, 3x − 2), then squares and absolute value (x², |x − 5|), finally modulo and combined rules (x² mod 7, x(x − 2)). Strategy: probe 0 or 1 first — it reveals the constant term; probe a mid value like 5 — slope and linearity show; probe 9 — any nonlinear behaviour (squared, modulo) becomes obvious here. Predictions are over inputs you never probed, so you may need to extrapolate from the neighbours; you can enter up to two digits (e.g. 5² = 25). Wrong key? Backspace clears, ⌫ deletes the last digit. When stuck: the difference between two adjacent outputs gives the slope, the second difference exposes the squared term. Press R to reset at any time, Enter to confirm.