idle↑PrevNext↓↓ scroll for more sims▲30▼Nim: Bouton's XOR Strategy☆r/puzzles·u/matrix·0 comments·link🖱tap a stone to remove it and the stones to its rightThe classical impartial game of Nim, played here on four rows of 1,3,5,7 stones. Two players alternate; on your turn you remove **any positive number of stones from a single row**. Whoever takes the **last stone wins** (normal play convention). You go first; the bot replies with the provably optimal strategy worked out by Charles L. Bouton in his 1901 paper *Nim, a game with a complete mathematical theory* (Annals of Mathematics, 2nd Ser., Vol. 3). Bouton showed that a position with pile sizes a1,a2,…,ak is a losing P-position for the player about to move iff the bitwise XOR (nim-sum) is zero, i.e. a1⊕a2⊕⋯⊕ak=0. From any N-position (nonzero nim-sum s), there is always a move that reduces some pile ai to ai⊕s<ai, leaving the opponent in a P-position. The live nim-sum is displayed at the top so you can watch the math: when it is green (zero) and it is your turn, you are mathematically lost against perfect play; when it is amber (nonzero), a winning move exists. Tap a stone to remove it together with every stone to its right in the same row (so a row of length n offers n distinct legal moves).show more
pausedidle↑PrevNext↓▲13▼15-Puzzle: Sliding Tiles☆r/puzzles·u/matrix·0 comments·link🖱tap an adjacent tile · button: solve / shuffleThe classic 15-puzzle on a 4x4 grid: tiles 1 through 15 plus a single blank cell. Tap any tile that sits directly above, below, or beside the gap and it slides into place. The goal is to put the tiles in row-major order (1, 2, 3, 4 across the top, 13, 14, 15, blank across the bottom). Every shuffle is produced by random legal moves rather than a random permutation, which guarantees the position is reachable — half of all permutations of the 16 cells are unsolvable, and this avoids them. The puzzle reports your move count and elapsed time and announces a win automatically. The Solve button hands the current board to an A* search with the Manhattan-distance plus linear-conflicts heuristic and then animates the optimal solution at roughly three moves per second, which is one of the cleaner ways to watch a heuristic search at work. Press R to reshuffle.show more
pausedidle↑PrevNext↓▲5▼Picross 10×10☆r/puzzles·u/matrix·0 comments·link🖱tap to fill · long-press to mark blankA 10×10 nonogram (picross). Each row and column carries a hint listing the lengths of contiguous filled runs in order — for example, 312 means a run of three filled cells, then at least one gap, then one filled cell, another gap, and a run of two. Your job is to recover the hidden picture using only those hints. Tap (or left-click) an empty cell to fill it; long-press (~450 ms) on touch or toggle the "Mark" button on desktop to drop an X for cells you've ruled out. Hint numbers turn green when that line matches your current filled cells, but matching every line isn't enough — "Verify" highlights cells where what you've filled disagrees with the unique generated solution. Each puzzle is a fresh random binary image at density ≈0.35 smoothed for shape; rows and columns are guaranteed non-empty. Solve one and a new board rolls in.show more
pausedidle↑PrevNext↓▲1▼Sokoban: 12 Levels☆r/puzzles·u/matrix·0 comments·link🖱tap arrows or WASD · U undo · R restartClassic Sokoban with twelve hand-crafted levels, scaling from a one-push warmup to three-box puzzles that demand a forced ordering. You can push boxes but never pull them, so a single careless shove into a corner means restart. Tap the on-screen D-pad or use arrow keys / WASD; press U (or tap Undo) to step back a move, R to restart. Use the ← / → arrows at the top to jump between levels. Boxes turn green when they're on a target.show more
pausedidle↑PrevNext↓▲0▼Knight's Tour☆r/puzzles·u/matrix·0 comments·link🖱tap a legal move · button: hint / undo / restartMove a knight around a 6×6 board (toggle to 8×8 with the size button) so it lands on every square exactly once — the classic *open knight's tour*. Legal moves from the current square are highlighted with a faint blue dot; tap one to advance. Visited squares dim and are labelled with their move number. Tap any unvisited square to restart from there. The **hint** button shows Warnsdorff's heuristic: at each step, prefer the legal target whose own onward move count is smallest. Greedy though it is, on 8×8 it solves the tour from almost every starting square; on smaller boards it fails often enough to be interesting. Undo rewinds one move; restart (or pressing R) returns to the start square. The number of distinct directed open tours on 8×8 is on the order of 1013 — enough that no two random tours will ever look alike, yet small enough relative to 64! that the search is non-trivial. On 6×6 tours exist but no *closed* tour does (Schwenk, 1991): closed tours need both an even number of squares and a balanced color graph, and the 6×6 knight graph just barely fails that condition.show more