From: kevin cline Date: 2007-11-11T06:15:00+09:00 Subject: Re: Looking for a Sudoku Algorithm to implement in Ruby On Nov 10, 10:50 am, Victor Reyes wrote: > Hey, > > Did anyone know of a Sudoku algorithm, which I can use to implement a Ruby > solution? The Soduku puzzle can be solved in a few seconds by a very simple backtracking algorithm: current_cell = first_empty_cell while true if put_next_possible_number_in_current_cell if all_cells_filled print_solution exit else current_cell = next_empty_cell end else if current_cell = first_empty_cell raise Exception.new("no solution") else current_cell = previous_empty_cell end