Skip to content

Sudoku solver that can create a graph of the solution _process_ #1

@sschwarzer

Description

@sschwarzer

Hello Thomas!

In April I attended your optimization course and that inspired me to write a Sudoku solver in Racket. :-) Different from other solvers, this one can create dot files which you can render with GraphViz to get a graph of the solution process! Here is an example for the Sudoku puzzle from Wikipedia. The README explains how to interpret the diagram.

You can see which digits enabled the algorithm to recurse further. Conversely, you can see where it didn't find any more promising branches and continued with others. As an alternative to the dot file, you can generate a text file that shows the solution process. This file uses indentation to show the recursion level.

Links:

By the way, I find it also interesting to try the program on "anormal" inputs, for example an empty puzzle without any digits to start with. This makes it even clearer how the algorithm works.

The software is MIT-licensed. Feel free to use it or the generated diagrams in your course. :-)

Of course, everyone else is also invited to use the program. Actually, that's why I entered a ticket here instead of writing an email. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions