Thread: Solving sudoku with python
i have been trying solve standard sudoku puzzle python script.
however, unable solve puzzle. based on recursive algorithm , not bruteforce.
know gets passed inserting 2 legal numbers grid, after second level of recursion, returns false main.
appreciated, don't know problem be.
islegal function checks row, column, , 3x3 box duplicate of trialvalue.
getemptycell function searches grid next null cell.
isfull function checks grid see if finished.
edit: section in red 1 of problems. subtracting until found familiar number.
now, i've created dictionary make sure right 3x3 square.
however, still fails complete.
code:none
code revision , bump. added dictionary check whether i'm checking right 3x3 box.
also, i'm going bump thread when goes off front page.
haven't gotten answers number of previous threads.
changes in blue.
code:none
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Solving sudoku with python
Ubuntu
Comments
Post a Comment