Skip to content

aditya-arolkar-swe/sudoku_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Solver

Simple sudoku solver I made on flight BA177 from London Heathrow to New York's JFK on 2026-01-11.

I was playing the Sudoku game on the seatback screens and wanted to challenge myself to build this strategy without internet (no dependencies or AI assistance).

This solution implements strat A, with strat B needing implementation.

Strat A - Simple Guessing Elimination

  • Accumulates all possible legal numbers for each cell
  • If any cell has only 1 possible number, assign that to the board
  • repeat until either board is solved or there are no trivial assignments

Strat A works to solve medium difficulty instantly. Hard difficulty would involve more sophisticated logic

Strat B - Hypothesize then Pan out

  • hypothesize a number in a certain cell where 2 or more are possible
  • pan out the rest of the board's guesses using strat A
  • arrive at:
    • solved board
    • impossible board
      • revert back all moves after hypothesis and try another hypothesis
    • board with no trivial guesses
      • apply a second degree guess
  • repeat all possible hypotheses until solved

Needs implementation...

About

Sudoku solver built from scratch - no AI, no dependencies, no web search

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages