Wednesday, 1 August 2012

GSoC Update 5: Solving and Rating Sudoku's

I have now finished off writing, and done some testing of the Vala solver and rater. The solver took quite a while to write, mostly because of my in inexperience with python, once the solver was finished, I started writing the rater. The rater works by watching the solver at work, and using some of its methods in "fake" mode, where they do not actually affect the state of the board.

I have also added some "methods with syntax support" to the SudokuBoard class. This has two improvements in my opinion. Firstly, it allows for statements like this:
 if (board.cells[l1, l2] == 0)
to be simply written like:
 if (board[l1, l2] == 0)
Secondly, it allows sanity checking of the input, to make sure the board can only contain values that its is supposed to.

Next, I will either, depending on the feedback from my mentor, either continue working on the Sudoku generation code (using the solver I have just written to help), or continue working on the interface, adding error highlighting and a start screen.  

No comments:

Post a Comment