Skip to main content

Construction of Heuristics for a Search-Based Approach to Solving Sudoku

  • Conference paper
Research and Development in Intelligent Systems XXIV (SGAI 2007)

Abstract

Sudoku is a logic puzzle, consisting of a 9×9 grid and further subdivided into ‘mini-grids’ of size 3×3. Each row, column, and 3×3 mini-grid contains the numbers 1 to 9 once, with a true Sudoku grid having a unique solution. Sudoku, along with similar combinatorial structures, has relationships with a range of real-world problems. Much published work on the solution of Sudoku puzzles has acknowledged the link between Sudoku and Latin Squares, thereby recognising the scale of any search space of possible solutions and that the generalization of the puzzle to larger grid sizes is NPcomplete. However, most published approaches to the solution of Sudoku puzzles have focussed on the use of constraint satisfaction algorithms that effectively mimic solution by hand, rather than directly exploiting features of the problem domain to reduce the size of the search space and constructing appropriate heuristics for the application of search techniques. This paper highlights important features of the search space to arrive at heuristics employed in a modified steepest ascent hill-climbing algorithm, and proposes a problem initialization and neighbourhood that greatly speed solution through a reduction of problem search space. Results shown demonstrate that this approach is sufficient to solve even the most complex rated puzzles, requiring relatively few moves. An analysis of the nature of the problem search space is offered.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Yato T and Seta T. Complexity and Completeness of Finding another Solution and its Application to Puzzles. In: Proceedings of the National Meeting of the Information Processing Society of Japan, IPSJ, Japan, 2002 (SIG Notes IPSJ-2002-AL-87-2)

    Google Scholar 

  2. Pegg E. Enumerating Sudoku Variations, available at http://www.maa.org/editorial/mathgames/mathgames_09_05_05.html, 2005

    Google Scholar 

  3. Dotu I., del Val A and Cebrian M. Redundant modeling for the quasigroup completion problem. In: Rossi, F. (ed.), Principles and Practice of Constraint Programming (CP 2003), Springer-Verlag, Berlin, 2003, pp 288-302 (Volume 2833 of Lecture Notes in Computer Science)

    Google Scholar 

  4. Gomes C and Shmoys D. The Promise of LP to Boost CP Techniques for Combinatorial Problems. In: Jussien N and Laburthe F (eds.), Proceedings of the

    Google Scholar 

  5. Simonis H. Sudoku as a constraint problem. In: Hnich B, Prosser P and Smith B(eds.) Modelling and Reformulating Constraint Satisfaction Problems,Proceedings of the Fourth International Workshop, CP, 2005, pp 13-27

    Google Scholar 

  6. Bartlett AC and Langville AN. An Integer Programming Model for the Sudoku

    Google Scholar 

  7. Gordon R. Minimum Sudoku. Internal Report. University of Western Australia,2006

    Google Scholar 

  8. Rich E and Knight K. Artificial Intelligence (2nd Edition), McGraw-Hill:Singapore, 1991

    Google Scholar 

  9. Jones SK. Solving methods and enumeration of Sudoku. Final Year Project.University of Glamorgan, 2006

    Google Scholar 

  10. Lynce, I and Ouaknine, J. Sudoku as a SAT problem. In: Golumbic M, Hoffman F and Zilberstein S (eds.), Proceedings of the Ninth International Symposium on Artificial Intelligence and Mathematics , AIMATH, 2006

    Google Scholar 

  11. Kwon G and Jain H. Optimized CNF Encoding for Sudoku Puzzles. In: Hermann M (ed.) Proceedings of the 13th International Conference on Logic Programming for Artificial Intelligence and Reasoning, available at http://www.lix.polytechnique.fr/∼hermann/LPAR2006/short/submission_153.pdf, 2006

    Google Scholar 

  12. Moraglio A, Togelius J and Lucas S. Product Geometric Crossover for theSudoku puzzle. In: Yen GG, Wang L, Bonissone P and Lucas SM (eds.),Proceedings of the IEEE Congress on Evolutionary Computation, IEEE Press, pages 470-476, 2006

    Google Scholar 

  13. Cazenave T and Labo IA. A Search Based Sudoku solver, available at http://www.ai.univ-paris8.fr/∼cazenave/sudoku.pdf, 2006 Research and Development in Intelligent Systems XXIV 49

    Google Scholar 

  14. Felgenhauer B and Jarvis F. Enumerating Possible Sudoku Grids. Internal Report. University of Sheffield, 2005

    Google Scholar 

  15. Inkala A. AI Escargot - The Most Difficult Sudoku Puzzle, Lulu Publishing,2007

    Google Scholar 

  16. Michalewicz Z and Fogel DB. How to Solve It: Modern Heuristics, Springer:Berlin, 2000

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag London Limited

About this paper

Cite this paper

Jones, S.K., Roach, P.A., Perkins, S. (2008). Construction of Heuristics for a Search-Based Approach to Solving Sudoku. In: Bramer, M., Coenen, F., Petridis, M. (eds) Research and Development in Intelligent Systems XXIV. SGAI 2007. Springer, London. https://doi.org/10.1007/978-1-84800-094-0_4

Download citation

  • DOI: https://doi.org/10.1007/978-1-84800-094-0_4

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-84800-093-3

  • Online ISBN: 978-1-84800-094-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics