Sudoku — Aritro Saha Arcade

A logic-based 9x9 number-placement puzzle built natively in React with conflict detection, note-taking, and responsive input.

Game Objective & Rules

Fill the 9x9 grid so that every row, every column, and each of the nine 3x3 subgrids contains all digits from 1 to 9 without repetition. The game validates board state automatically and highlights conflicting cells.

Deterministic Recursive Backtracking Solver

The board generation and verification system leverages mathematical constraint satisfaction:

  • Recursive Backtracking Algorithm: The internal solver scans unassigned grid cells, testing candidate digits 1 through 9 against bitwise row, column, and 3x3 subgrid masks. If a conflict arises down the search branch, the algorithm backtracks up the call stack to test alternate branches.
  • Bitmask Candidate Computation: Fast bitwise operators (1 << (digit - 1)) maintain constraint sets in constant time O(1), enabling real-time error highlighting without lag.
  • Unique Solution Guarantee: Puzzles are validated to ensure only one deterministic solution exists for the given difficulty tier.

Features & Player Tools

  • Candidate Notes: Toggle pencil mode to record candidate digits in candidate cells.
  • Error Highlighting: Instantly detect duplicate digits in colliding rows, columns, or subgrids.
  • Auto-Save: Game state and timer automatically persist across browser refreshes.

Controls

Click any cell and use the on-screen numeric keypad or physical keyboard numbers 1-9. Use Backspace or Delete to clear a cell.

Frequently Asked Questions

How does the Sudoku solver validate boards?

The game uses a recursive backtracking algorithm with bitmask constraint checking across rows, columns, and 3x3 subgrids to guarantee puzzle validity.

Are games saved if I close my browser?

Yes, all cell values, pencil notes, and the game timer automatically synchronize to localStorage for seamless session resumption.