zoku

A sudoku-solving web app

zoku is a web app written with Svelte, hosted using Vercel at https://zoku319.vercel.app.

Features

zoku has two main functionalities:

  • editing a sudoku grid
  • solving a sudoku puzzle

Each URL, e.g. this one, holds information about each of the 81 cells of a sudoku grid.

Editing a grid

Edit a grid by selecting a cell using the mouse cursor and:

  • pressing a digit (1 through 9) on the keyboard to enter a number into the cell
  • pressing Backspace or Delete on the keyboard to clear the cell
  • using the arrow keys (, , , ) to navigate between cells
  • pressing Escape on the keyboard to clear the selection

Then click the 'Analyze' button to solve the sudoku.

Analysis

Click the 'Solve' button to solve a sudoku. To view each step of the algorithm, select 'Show steps' before solving.

Algorithm

zoku uses a technique called Recursive Backtracking. Explained simply, it searches for the next empty cell of the grid, and tries all the valid numbers 1-9. It searches recursively down a 'tree' of possibilities, returning to the start of a 'branch' once it determines that a 'branchlet' doesn't work (hence the name backtracking), indicated by none of the nine digits being valid in a cell.

Top categories

Loading Svelte Themes