I’m trying to make a sudoku solver that uses genetic algorithms in Ruby.
My algorithm needs to make multiple copies of the sudoku board
(depending on the population size specified) then populate the empty
spaces in each board with random numbers (not impacting on any other
As the number of board copies I need depends on the population size I
was trying to use a for loop.
i = 0
for i <= pop (size of pop specified by user)
make copy of board in to board i
I want to end up with my copies named board1, board2 etc, depending on
the value of ‘i’ when the array is created from the original.
If I could do this in a simpler way with blocks please let me know.
Thanks in advance for any suggestions.