Generate hints on a sudoku puzzle

2 views (last 30 days)
Morgan Clendennin
Morgan Clendennin on 22 Nov 2016
Hi,
I have created a GUI that will generate a random Sudoku puzzle with a specified number of values removed based on the users chosen difficulty level. I would like to incorporate a 'hints' button where when pressed, the code will take the numbers currently on the board and compare them to the solution matrix and it will generate one correct value and add it to the puzzle and lock that value on the board so that it cannot be changed. I'm pretty sure I have a variety of functions that were created for other portions of my code for the GUI that can be combined to make this work but to make it simpler than trying to explain the functions and coding I already have here in the question, I have attached my code so that you can check it out for yourself and ask for clarification if necessary. I have kept the hint pushbutton code and the function for the pushbutton in the file uncommented so you can try to debug it. I tried to get MATLAB to spit out the error I've been getting which was basically a matrix dimension mismatch error in line 213 I think it was but now I can't even get it to do that and it just keep trying to run the hint function forever. Any advice on how I can fix my issue would be greatly appreciated.

Answers (0)

Categories

Find more on Sudoku in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!