Transcribe the hard 9x9 Sudoku puzzle from the provided image into the
plain-text example format accepted by the solver. The new example gives users a
ready-made input file for manual CLI checks.
Document the example directory in the README project decomposition and include a
command showing how to run the solver against this puzzle.
Test Plan:
- cargo run -- sudoku-examples/hard.sudoku
Refs: none
Add a command-line Sudoku solver that reads a whitespace-separated puzzle file,
uses zeroes as empty cells, and prints a solved grid. The parser accepts any
square Sudoku size whose block shape is also square, including 9x9 with 3x3
blocks and 16x16 with 4x4 blocks.
The solver represents candidate sets as u128 bit masks and precomputes row,
column, block, and peer relationships for each cell. It repeatedly applies
human-style deterministic deductions by placing naked singles and hidden singles.
When those deductions stall, it falls back to a constrained trial search: choose
the unsolved cell with the fewest candidates, try high-impact values first, and
resume deduction after each assumption.
The public library API keeps parsing, solving, and formatting testable outside
the CLI. The README documents usage and the top-down project decomposition so
future changes have an architectural map.
Known limitation: the solver returns one valid completion for puzzles with
multiple solutions; it does not currently prove uniqueness.
Test Plan:
- cargo clippy
- cargo clippy --benches
- cargo clippy --tests
- cargo test
- cargo +nightly fmt
- cargo clippy
- cargo clippy --benches
- cargo clippy --tests
- cargo run -- /tmp/sudoku-ai-smoke.txt
- timeout 5 cargo run -- /tmp/sudoku-ai-underconstrained.txt
Refs: none
Add the initial Cargo package, formatter configuration, ignore rules, lockfile,
and placeholder binary entry point. This establishes the repository baseline so
future solver work can be reviewed as focused behavior changes.
The scaffold intentionally contains no Sudoku behavior yet. It only captures the
starting point of the project as generated and configured locally.
Test Plan:
- cargo clippy
- cargo clippy --benches
- cargo clippy --tests
- cargo +nightly fmt
- cargo clippy
- cargo clippy --benches
- cargo clippy --tests
Refs: none