TPToolpazar

Global Araç

Lights Out

Hamle: 0

Hedef: tüm ışıkları söndürün. Bir hücreye tıklamak onu ve 4 komşusunu değiştirir. Her rastgele tahta çözülebilir. En kısa çözüm genellikle 6–12 hamledir; uzmanlar 20 saniyenin altında çözebilir.

The classic Lights Out puzzle. A 5×5 grid of lights, some on and some off. Click any cell — it toggles itself and its 4 orthogonal neighbors (up, down, left, right; not diagonals; cells outside the grid are ignored). Goal: turn off every light. Most random boards are solvable in 6-12 moves with optimal play; novice solvers typically take 30-60 moves and discover the puzzle’s deeper logic over multiple attempts.

Lights Out was released by Tiger Electronics in 1995 as a handheld electronic puzzle (LCD-screen, plastic buttons, sold in toy stores). It became a sleeper hit and inspired multiple sequels (Lights Out 2000, Lights Out Cube, Lights Out Deluxe). The mathematical structure attracted academic attention: Lights Out is solvable using linear algebra over GF(2) (the field of integers mod 2) — each cell’s state can be expressed as a vector equation, and solving the puzzle reduces to inverting a 25×25 matrix in GF(2). Anderson and Feil’s 1998 paper “Turning Lights Out with Linear Algebra” documented the full mathematical analysis.

Key mathematical properties:

  • Click idempotence: clicking the same cell twice returns the board to original state. So in any solution, each cell is clicked 0 or 1 times.
  • Click independence: clicks commute (order doesn’t matter). So the solution is just a SET of cells to click.
  • Solvability: of the 2^25 ≈ 33 million possible board states, exactly 25% are solvable from the all-off target via legal clicks. The unsolvable 75% form a different equivalence class.
  • Light Chasing: a useful informal algorithm — work from top to bottom; use the bottom row of clicks to clean up patterns left by upper rows. Doesn’t always produce the optimal solution but always works.

Nasıl Kullanılır

  1. Click any cell. It and its 4 orthogonal neighbors (up/down/left/right) flip state — on becomes off, off becomes on.
  2. Continue clicking. Watch how each click affects multiple cells.
  3. Win condition: all 25 cells are off. The game announces victory.
  4. If stuck: 'light chasing' algorithm — go row by row, clicking cells in row N+1 directly below any lights still on in row N. The last row may have a residual pattern that requires clicks in row 1 to resolve.
  5. For optimal play, the puzzle has a closed-form solution via matrix algebra (out of scope for casual play). Just keep clicking; you'll converge.

Ne Zaman Kullanılır

  • Quick logic-puzzle break (typical solve: 5-10 minutes for casual play).
  • Teaching linear algebra in CS / math contexts (Lights Out is the canonical introduction to GF(2) systems).
  • Demonstrating cellular-automaton-style state propagation in algorithm courses.
  • Casual brain workout — different cognitive style than memory or word games.

Ne Zaman Kullanılmaz

  • When you want a quick game — Lights Out can take 5-15 minutes per round if you're learning. Try Wordle or Memory for shorter sessions.
  • If you find rule-discovery games frustrating — Lights Out's mechanics aren't obvious until you've played a few rounds.
  • Multiplayer — single-player only.

Yaygın Kullanım Senaryoları

  • Verifying a number or output before passing it on
  • Quick use during a typical workday
  • Pre-decision sanity-check on inputs and outputs
  • Educational use — demonstrating the underlying concept

Sık Sorulan Sorular

Are all boards solvable?

Yes in this implementation — we generate boards by toggling random cells from the all-off state. Each toggle uses the same legal click rule, so the resulting board is by construction reachable BACK to all-off using the same set of clicks (possibly fewer, since the same cell clicked twice cancels out). About 25% of all 2^25 possible 5×5 boards are solvable; we never generate the unsolvable 75%.

What's the best solving strategy?

'Light chasing': work top-to-bottom. For each cell in row N still on, click the cell directly below it in row N+1. This propagates the 'on' state down. After one full pass, only the bottom row may have residual lights. The bottom-row pattern determines which cells in row 1 must be clicked initially (a precomputed lookup table). For practical play: just experiment with light-chasing top-to-bottom and observe what bottom-row patterns are achievable.

What's the optimal move count?

Depends on the starting state. For the worst-case scrambled board, optimal solution is around 15 clicks. Many starting states have shorter solutions (6-10 clicks). With light-chasing, you typically take 1.5-2× the optimal count; with practice, expert players approach optimal.

What's GF(2) and why does it matter?

Galois Field of order 2 — the field of integers modulo 2 (so the only values are 0 and 1; addition is XOR). Lights Out's state space is a vector space over GF(2): each cell is a 0-or-1 component; clicks are linear transformations. The puzzle reduces to solving a system of linear equations in GF(2) — a 25×25 matrix problem. Anderson and Feil's 1998 paper showed this rigorously and computed the solvability statistics.

Are there variants?

Many: 4×4 (much smaller, easier — only ~16 states), 6×6, 7×7 (harder), Lights Out Cube (3D), Toggle (each click affects only the clicked cell — trivial), Inversion (click affects 8 surrounding cells, not just 4 orthogonal). The 5×5 plus-shape rule is the canonical version from the 1995 Tiger Electronics original.

Is the click pattern important?

Mathematically: no — clicks commute and are idempotent, so the solution is just a SET of cells to click in any order. Practically for human players: the order matters because it determines what intermediate states you see and how easy it is to figure out the next click. Light chasing prescribes an order that's easy to follow.