Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sschwarzer opened this issue Nov 14, 2021 · 0 comments
Open

Comments

@sschwarzer
Copy link

sschwarzer commented Nov 14, 2021

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. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant