Freelance Writing Jobs | Today's Articles | Sign In


Programming Sudoku -- Book Review

How to Generate and Solve Sudoku Using Sudoku Algorithm Programs

Feb 3, 2009 Nicolas McGregor

The book Programming Sudoku by Wei-Meng Lee demonstrates how to program grid Sudoku generators and Sudoku solvers for this wildly popular logic game.

The logic puzzle game Sudoku (literally “number place” in Japanese) first became popular in the mid-1980s in Japan, and has since developed a world-wide following. Presently, it is difficult to leaf through a newspaper without encountering a Sudoku grid somewhere within its pages, and Sudoku computer games appear throughout the internet.

Wei-Meng Lee's book Programming Sudoku presents the reader with an explanation of grid Sudoku logic that is developed into a Sudoku programming framework that, through the use of Sudoku algorithms, can be used to make Sudoku puzzle generators and Sudoku game solvers.

While the code used in Programming Sudoku is written in Visual Basic, the logical progressive development of the code base makes porting the Sudoku program to another programming language very simple.

Programming Sudoku Chapters

Programming Sudoku features 7 chapters, and an appendix that lists the full code of the SudokuPuzzle Class developed within the main chapters. The chapters are:

  • What is Sudoku?
  • Creating the Sudoku Application
  • Basic Sudoku Solving Technique
  • Intermediate Techniques
  • Advanced Techniques
  • Generating Sudoku Puzzles
  • How to Play Kakuro

The first chapter, “What is Sudoku?” introduces the reader to the history, rules and basic solution logic of grid Sudoku. This is followed by “Creating the Sudoku Application”, which details the steps required to create a basic grid Sudoku puzzle board that is used as the basis for the more developed Sudoku programs of later chapters.

Sudoku Solutions

The next three chapters, beginning with “Basic Sudoku Solving Technique”, demonstrates increasingly advanced methods as to how to solve Sudoku grids. The reader is introduced to the Column, Row and Minigrid Elimination Technique, the Lone Ranger Technique, Twins, Triplets and the Brute Force methods.

Sudoku Solvers Become Sudoku Generators

The sixth chapter, “Generating Sudoku Puzzles”, cleverly combines the Sudoku solver techniques of the previous chapters into algorithms for generating Sudoku grids of varying levels of difficulty. By using Sudoku solutions to program Sudoku game grids, the programmer has exact control over how to solve the Sudoku games created, from easy Sudoku puzzles with multiple ways to complete them to expert-level grids that have only one solution.

How to Play Kakuro

The final chapter introduces the reader to the game of Kakuro, which is analogous to Sudoku. Kakuro, a crossword-like numbers game, is gaining in popularity, and by demonstrating the game mechanics and solution logic of Kakuro, Wei-Meng Lee leaves the reader with the opportunity to apply their newly-learnt Sudoku programming techniques to a related but very different game to Suduko.

Sudoku Program Book Review Conclusion

Wei-Meng Lee proves himself to be an accomplished programmer, a master of grid Sudoku logic and a clear, concise and entertaining writer. For the reader with a limited programming background, Programming Sudoku offers a detailed insight into grid Sudoku game logic that provides an essential understanding of how to achieve Sudoku solutions.

For the reader with a firm grasp of programming principles, the Sudoku generator and solver algorithms and the complete Sudoku programs provided within the book exemplify applied logic, modular code design and the benefits of clean, readable code.

As such, Programming Sudoku has something to offer to both programmers and Sudoku game players. And an intermediate coder who also enjoys Sudoku will find this book to be utterly engaging.

  • Programming Sudoku by Wei-Meng Lee
  • Available from Apress
  • 232 Pages, Soft Cover or E-Book PDF
  • Originally Published March 2006
  • ISBN 1-59059-662-3

Book Cover Designed by Kurt Krames. Image used with permission of Apress.

The copyright of the article Programming Sudoku -- Book Review in Science/Tech Books is owned by Nicolas McGregor. Permission to republish Programming Sudoku -- Book Review in print or online must be granted by the author in writing.
Programming Sudoku Book Cover, Kurt Krames, used with permission of Apress Programming Sudoku Book Cover
   

Related Topics

Reference


;