Finding Solutions to Sudoku Puzzles Using Human Intuitive Heuristics

Authors

  • Nelishia Pillay

DOI:

https://doi.org/10.18489/sacj.v49i0.111

Keywords:

Sudoku, genetic programming

Abstract

Sudoku is a logical puzzle that has achieved international popularity. Given this, there have been a number of computer solvers developed for this puzzle. Various methods including genetic algorithms, simulated annealing, particle swarm optimization and harmony search have been evaluated for this purpose. The approach described in this paper combines human intuition and optimization to solve Sudoku problems. The main contribution of this paper is a set of heuristic moves, incorporating human expertise, to solve Sudoku puzzles. The paper investigates the use of genetic programming to optimize a space of programs composed of these heuristics moves, with the aim of evolving a program that can produce a solution to the Sudoku problem instance. Each program is a combination of randomly selected moves. The approach was tested on 1800 Sudoku puzzles of differing difficulty. The approach presented was able to solve all 1800 problems, with a majority of these problems being solved in under a second. For a majority of the puzzles evolution was not needed and random combinations of the moves created during the initial population produced solutions. For the more difficult problems at least one generation of evolution was needed to find a solution. Further analysis revealed that solution programs for the more difficult problems could be found by enumerating random combinations of the move operators, however at a cost of higher runtimes. The performance of the approach presented was found to be comparable to other methods used to solve Sudoku problems and in a number of cases produced better results.

Downloads

Published

2012-09-29

Issue

Section

Research Papers (general)