Hello everyone I am new to this forum so please forgive me if
I say something stupid. I would like to make a Sudoku Solver
and I would like to use GUI so the interface looks friendly
and I am bored of console apps. But I have no way to go
about it my mindset is not in the "I got it" mode. I know
that a backtracking algorithm is way of doing so but
I can not seem to figure it out I have been to Wikipedia
and Googled backtracking methods but can not seem to
fully understand the concept as I would like to. To my
understanding the solver would look like this:
1 2 3 4 5 6 7 8 9 10
#include <iostream>
#include <fstream>
usingnamespace std;
/*
Functions to analyze data on a column , row , and box
In those functions you would throw possibilities and
if they fail you will try again and keep doing so until
one finds a valid possibility ~ This is were I have trouble
understanding the concept
*/
Any help would be greatly appreciated
Thank you in advanced
As I recall, backtracking is a general concept, not really an algorithm in itself. Backtracking just tells you to try to analyze a certain potential solution in a way that may tell you if it is feasible or not. If it is not feasible, you abandon this potential solution (and all other solutions that "derive" from it), dramatically decreasing the number of possibilities to examine further.
In Sudoku, I guess that could mean: Make an algorithm that examines a particular combination. If the combination fails for say, the first 5 digits, there is no need to try out the other 4 because it is known that all combinations with these first 5 digits will be a failure.