Sudoku strategyBy the Shapedoku TeamPublished 6 min read

What Is a BUG in Sudoku

A BUG is a warning sign that a puzzle is about to lose its single answer, and that warning points straight at the winning move waiting inside a wall of pairs.

The name, unpacked

BUG stands for Bivalue Universal Grave. A grave, in this sense, is a hypothetical end-state of a puzzle where every unsolved cell has exactly two candidates, and within every row, column and box each remaining candidate appears exactly twice. That perfectly balanced position is deadly because it always has more than one solution: you could swap the two possibilities throughout and still satisfy every rule. A proper Sudoku, which by definition has a single answer, can therefore never actually arrive at a full grave. It is a pattern the puzzle is forbidden to reach.

The BUG plus one

The technique lives one step before that grave. Look for a position where every unsolved cell is a bivalue pair except for a single cell that carries three candidates. This is called BUG plus one, the grave plus one extra candidate. That lone third candidate is the only thing standing between the puzzle and a second solution. If it were removed, the board would collapse into the deadly balanced grave. Because the puzzle must stay unique, that extra candidate cannot be a coincidence; it is forced to be the answer.

Finding the value that saves the puzzle

Within the three-candidate cell, you need to identify which of its three values must be placed. The rule is elegant: choose the candidate that appears an odd number of times among the cells of its row, its column and its box. Every other candidate on the board appears exactly twice per unit, keeping the grave balanced, so the digit that breaks that balance is the true one. Placing it removes the threat of a second solution and usually cracks the rest of the grid wide open.

A worked example

Suppose late in a solve every empty cell is a clean pair except r5c5, which reads 2/6/8. Scan the fifth row and count how many empty cells still list a 2, then a 6, then an 8. Do the same down the fifth column and around the centre box. Say 2 appears twice in each unit and 6 appears twice in each unit, but 8 appears three times in the row while the others stay even. The odd one out is 8, so r5c5 must be 8. Place it, and the paired cells around it resolve in a cascade.

  1. Confirm that every unsolved cell has exactly two candidates except one cell with three.
  2. In that three-candidate cell, examine each value in turn.
  3. Count how often each value appears across the cell row, column and box.
  4. The value that appears an odd number of times is the solution, so place it.

Only on puzzles you trust

Like the Unique Rectangle, the BUG is a uniqueness technique: it works only because the puzzle is promised to have exactly one solution. That promise is the entire engine of the argument. On a hand-made grid of unknown quality, or a puzzle that might have multiple answers, the reasoning collapses and can lead you astray. Every Shapedoku board is validated to have a single solution before it ever reaches you, so BUG logic is completely safe to use there. On an untrusted grid from an unknown source, treat all uniqueness tricks with a healthy dose of caution.

Why it is worth learning

The BUG has a reputation as an exotic technique, but it is one of the most satisfying moves in the game because it turns a near-hopeless-looking wall of pairs into an instant answer. It also deepens your intuition for uniqueness, the quiet property that underlies several advanced patterns. You will not meet a BUG in every puzzle; it only appears when a board thins down to almost all pairs, which tends to happen in harder solves. When it does show up, recognising it can save you a long, error-prone bout of trial and error. Because it resolves an entire cell in a single stroke and often sets off a chain of easy singles afterward, learning to see it is well worth the modest effort of counting candidates.

A quick way to sanity-check the pattern

Before you trust a BUG, it is worth confirming two things at a glance. First, that truly every unsolved cell is a pair except the one triple, since a single overlooked three-candidate cell elsewhere breaks the argument entirely. Second, that the digit you have chosen really does appear an odd number of times in all three of its units, not just one. Both checks take only a moment, and skipping them is the usual reason a BUG deduction goes wrong.

Building the habit with Notes

Spotting a BUG depends on seeing candidate counts clearly, which is exactly what a good notes system gives you. In Shapedoku, turn on Notes and let the smart cleanup prune candidates as you place shapes, and the moment the board reduces to pairs plus a single triple becomes easy to notice. Because the nine values are distinct shapes, counting how often a given shape appears in a row is a quick visual scan rather than a hunt through digits. Practise the count on a few Extreme boards and BUG plus one will start to jump out at you on sight.

Ready to put it into practice?

Play Shapedoku free in your browser. No download, no login, just colorful shape Sudoku.

Play the Web App

Keep reading