As KevMo correctly stated, generating a sudoku board is near enough the same as solving a sudoku board. The main difference is that 'solving' one has a head start where the initial values on the board is 'correct' and will lead to a solution.
I've always though that the mutator in a GA provides the random element, whilst the crossover provides the process to move the population towards some possible solution. If the whole breeding process is totally random, then it seems like it is just wildly searching for the solution.
As some of you mention, this means that GA is possibly not suitable for what I am trying to accomplished.
Quote: Original post by TechnoGoth
Phase one: Fill the board.
To fill the board you use a simple iterative search. For each box you determine the valid locations for the current number and then place it in a random spot. Then move to the next box. This repeated until the current number is placed in all boxes, then you move to the next number and repeat. Eventually you will have a completed Sudoku.
Does this need some form of backtracking - will it always give a solution and you wont get stuck half way filling the board?
Thanks all for answering, this has been very enlightening.