Skip to content

Python application to solve sudoku puzzles either in headless or GUI mode

License

Notifications You must be signed in to change notification settings

crowz-fx/sudoku_solver

Repository files navigation

Tests

sudoku_solver

Python application to solve sudoku puzzles

Info

Sudoku solver that can operate in two modes headless and gui

Common

  • Solves sudoku duh!
  • Displays time taken to solve
  • Operation counts

GUI

  • Ability to input a puzzle to be solved
  • Can generate a new puzzle that you can input or ask to be solved

gui demo

Headless

  • Can supply a puzzle in two ways
    • oneliner - one continuous csv string of the puzzle
      • headless oneliner demo
    • file - file with puzzle within
      • headless file demo
  • Will output the solved puzzle to either console or a file depending on parameter supplied

Compatability

Built and tested with python 3.11.6, all dependencies are frozen and pinned in requirements.txt

Running

Follow the steps in Setup first

Help

There is argument parsing at all levels, just tack on -h to see usage instructions, examples:

python main.py -h
python main.py gui -h
python main.py headless oneliner -h

GUI

python main.py gui

Headless

OneLiner

python main.py headless oneliner 0,0,1,2,6,0...

File

python main.py headless file puzzle.txt

Setup

  1. Setup python virtual environment
python -m venv venv
  1. Activate and install dependencies
source venv/bin/activate && \
pip3 install -r requirements.txt

Executing Tests

python -m unittest discover -s tests -v

About

Python application to solve sudoku puzzles either in headless or GUI mode

Topics

Resources

License

Stars

Watchers

Forks

Languages