Magnetic Polarity Puzzle Generator
This grid is already cut into dominoes — the walls are printed, never something you have to find. Every domino gets a plus and a minus, in either order, or is left entirely blank. The one rule linking neighbours: no two cells that touch edge to edge, even across a domino boundary, may carry the same sign — two pluses may never sit side by side, and neither may two minuses. A blank cell never conflicts with anything. Numbers along each row and column say exactly how many pluses and how many minuses that line must contain. Most grids are settled by the counts alone; in about one in four a domino or two is printed already filled in, because the counts on their own left more than one answer.
What this generator does
Draws a random domino tiling by shuffling the trivial row-pairs tiling with local 2x2 flips, leaves about one domino in four blank and gives each of the others a plus/minus pair (falling back to blank where both orders would touch a like neighbour), derives the row and column counts from that answer, then, only while more than one sign pattern still fits, reveals a domino the patterns disagree about, until the counts and anything revealed allow only the one answer.
How to use this tool
- Choose a grid size, then print or copy it.
- Give each domino a plus and a minus, in either order, or leave both halves blank.
- Keep any two touching cells from sharing a sign, even across a domino wall.
- Match every row and column to its printed plus and minus counts.
- Show the answer to check the finished grid.
Understanding the controls
- Grid
- 4, 6 or 8 squares a side. All three are measured at well under a hundredth of a second to build and prove unique.
- Seed (optional)
- Type anything to rebuild the same puzzle later, which is how you reprint a page you have lost. The seed makes the puzzle repeatable; it carries no cryptographic strength and is not a secret.
Common use cases
- A placement puzzle built from dominoes and signs rather than symbols or shading
- A printable page where the answer is checkable line by line, since every row and column has to meet two printed counts
- A change of pace from this site's shading and loop puzzles
- Reprinting the identical grid later from its seed
How this generator works
The domino partition is drawn first and independently of any sign: start from the trivial tiling of horizontal pairs (always available on an even-sided grid) and apply a few hundred random local flips — two horizontal dominoes sharing a 2x2 block traded for two vertical ones, or the reverse — which is the standard way to reach a well-mixed tiling, since any two tilings of a rectangle are connected by exactly this move. Every flip keeps the tiling valid by construction, so this step cannot fail. Each domino is then decided in reading order: about one in four is left blank outright, and the rest take a plus/minus pair, trying both orders and falling back to a blank pair when both would put a like pole next to an already-decided neighbour; a blank never conflicts with anything, so this pass always succeeds without ever needing to backtrack. The blanks are what make it a puzzle: a grid with none can only be the chessboard or its negative, and one that comes out that way is drawn again. The row and column counts are then read straight off that finished answer. Whether those counts alone pin the grid back down to one answer is a separate question, checked by a full search over every domino's possible pair, pruned the moment a row or column has already reached its printed count or can no longer reach it from what is left undecided. Measured over 500 seeded builds at each offered size, the counts alone were enough in about three puzzles in four; one in five needed one domino revealed as a printed given, and the rest two to four. At four squares a side every one of the 500 was also checked by listing every possible filling, and each had exactly one answer.
Randomness and fairness
The domino tiling and every domino's sign pair come from your browser's cryptographic random source. Giving a seed replaces that source with a repeatable one, so the same puzzle can be printed again; the seed is for reproducibility, not cryptographic strength.
For how randomness is produced across the whole site, see how Generate Random works.
Limitations and good to know
- The tiling and its polarity are only measured up to 8 squares a side; a bigger grid was neither built nor timed.
- Difficulty is not graded — a grid can be settled from its edges inward or need a section worked out before it opens up.
- A row or column count only ever states a total, never which cells it came from, so more than one placement can look plausible for a stretch before the adjacency rule rules one out.
- Not every grid is settled by its counts alone: measured over 500 seeded builds at each size, about one in four prints one or more dominoes already filled in (never more than four), which is a start the solver did not earn.
Privacy and your data
The tiling, the sign pattern and the check that they are unique are all done entirely in your browser. Nothing you type as a seed, and no puzzle made from it, leaves the device.
Related generators
- Visibility Shading Puzzle GeneratorPrints a grid where numbers count what they can see — shade squares so every number's line of sight matches, unshaded squares stay one piece — with exactly one answer.
- Pearl Loop Puzzle GeneratorPrints a pearl loop puzzle — one closed circuit obeying every white and black pearl it passes through — with exactly one answer.
- Shingoki Puzzle GeneratorDraw one loop that turns at every black circle and runs straight through every white one, where each circle's number is how far its own two straight stretches run before the next turn.
- Room Shading Puzzle GeneratorPrints a grid cut into numbered rooms — shade each room to its count, keep the rest connected, and never let a straight run of unshaded squares cross three rooms — with exactly one answer.
- Region Tetromino Puzzle GeneratorPrints a grid cut into irregular regions — shade an L, I, T or S tetromino in each one, with no printed number anywhere — and exactly one answer.
- Slant Puzzle GeneratorPrints a Slant puzzle — one diagonal in every square, numbers counting the ends at each corner, and no closed loop — with exactly one answer.