- Windows/Mac/Linux x86 device.
- git
- zig (0.12.1) https://ziglang.org/download/
- Vulkan compatible graphics driver. (Most modern GPUs are compatible)
- On windows the MSVC / Clang compiler is required.
Ensure you are in the root directory of the project (Where this file is).
First get all dependencies by running the following command:
git submodule update --init --recursive
zig build -Doptimize=ReleaseFast
You can choose between running via the zig CLI, or invoking the binary directly. The binary files are generated by build.
zig build -Doptimize=ReleaseFast run
# Or (after build)
./zig-out/bin/Sudoku
- Use your mouse and WASD to move around the world.
- Arrow keys to move green "cursor" on board to select input cell.
- Use numbers 1-9 to input numbers into the selected cell.
- Use
P
to solve the current board state. - Use
N
to generate a new good random puzzle - Use
R
to generate a puzzle you can undo. - Use
C
to clear the board. - Use
Z
to undo the last move. - Use
Y
to redo the last move. - Use
H
to generate one hint you can undo.
Run the CLI
zig build -Doptimize=ReleaseFast run-sudoku
# Or (after build)
./zig-out/bin/sudoku-backend
The Sudoku CLI allows you to run a variety of tests, generate puzzles, solve puzzles from an input format etc.
zig build -Doptimize=ReleaseFast run-sudoku -- 9x9 MRV fuzz 5
# Or (after build)
./zig-out/bin/sudoku-backend 9x9 MRV fuzz 5
From here on out i will just refer to the CLI as
sudoku-backend
remember to use the correct path to the binary ( including -- if using zig build).
Keeps generating good random puzzles (up to 4 billion) and solves them.
sudoku-backend 9x9 MRV gen_100k_bench
How long it takes to generate 100k good random puzzles.
See all available commands by running:
sudoku-backend