Skip to main content
📜 WAYPOINT LESSON

The Experiment Loop

⭐⭐⭐ advanced⏳ 12 min read📍 Lesson 216 of 281

Small cases → table → pattern → statement → proof. Never trust an unproven pattern.

The Experiment Loop

When the structure is not visible, compute. The loop:

  1. Brute-force tiny inputs by hand (n = 1, 2, 3, 4 — on paper).
  2. Tabulate the answers in a grid (input → answer).
  3. Stare: which quantity is constant? Which changes monotonically? Which flips with parity?
  4. State a conjecture precisely, in one sentence.
  5. Prove it — usually by induction or an exchange/involution argument. If you cannot prove it, treat it as a hypothesis to test further, never as a fact.

A worked unlock

"There are n piles of stones; each second you may take any positive number of stones from exactly one pile. Players alternate; the player unable to move loses. Who wins?"

Experiments: one pile → first player takes all, wins. Two unequal piles → first equalizes, wins. Two equal piles → every move breaks the equality and the opponent re-equalizes: second player wins. The invariant candidate: position value = XOR of pile sizes; zero ⇔ losing. Provable by induction on moves. One experiment table, one theorem.

Why the proof step matters

An unproven pattern is a guess that fails exactly on adversarial tests — the ones contest setters write because solvers trust patterns. The proof is not academic ceremony; it is what survives the worst case.