Abstract
Sudoku puzzle is one of the most interesting logic based games with various levels which give our brains a good workout and make them active. However, it is difficult at a number of stages and easy to despondent players, especially for new players or people not enough confidence or endurance. The aim of this study is to develop a support tool for Soduku players, i.e. encouraging players to solve the hard Soduku puzzles or when seeking for help. It gives necessary steps as hints in order to solve the puzzles or check the correctness of their steps or even to solve the game completely. The input data, i.e. the Sudoku puzzle, come from the camera or even from the image/text files. Auto-detecting and recognising digits and the propagation constraint algorithms to generate the Sudoku hints or solutions are utilised. Methods and the tool itself are heavily tested to guarantee a stable and excellent program.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
All cells in the Sudoku grid have to be drawn out exactly. The Sudoku grid has 81 cells formed by 9 rows and 9 columns. They are equivalent to 10 horizontal and 10 vertical lines. Therefore, determining all the cells in Sudoku grid is quite simple since 4 key points have been determined (Fig. 3b). First, the coordinates of points in vertical line are calculated by the top-left and bottom-left points, so 8 points are expected to be determined. The interval between 2 points is the distance between top-left and bottom-left divided by 9. It is similar for the points in last vertical line. Then, the coordinates of every point in all horizontal lines are easily defined.
- 2.
Particularly, the Sudoku grid in the original image is transformed into a result image of 450\(\,\times \,\)450 pixels in size. To increase the precision, the perspective transformation is applied to each cell from the original image.
- 3.
Because the extracted Sudoku image’s size is 450\(\,\times \,\)450.
- 4.
Because all contours are determined.
- 5.
What defines the difficulty of the Sudoku puzzle is still debatable. The important fact is that the number of given digits is not really related to the difficulty of the Sudoku puzzle, the positions of digits are more decisive. One difficult Sudoku can contain more given digits than an easy one. Generally, a Sudoku puzzle, requiring more difficult techniques to solve, can be considered more difficult. Moreover, a Sudoku requiring more repetitions, i.e. many times beginning over again when a certain technique does not work or many uses of a difficult technique, can also be considered more difficult. These two factors determine the difficulty of the game.
- 6.
The time solving a difficult puzzle of backtracking method is more than 100Â s times that one of the constraint propagation and exact cover methods. Because in the hard puzzle, it has to go forth and back in loops many times to look for the correct solution while constraint propagation and exact cover just need to eliminate some determined candidates. Constraint propagation method uses simpler and less constraints than the exact cover method, so it is faster to solve a puzzle.
- 7.
The reason is that every of 81 cells is transformed in turn. Though it takes almost all the time to determine the input Sudoku, this application is much better than the manual input. Users’ mistakes and tedious tasks are reduced significantly.
References
Golomb, S., Baumert, L.: Backtrack programming. J. ACM 12, 516–524 (1965)
Lewis, R.: Metaheuristics can solve sudoku puzzles. J. Heurist. 13(4), 387–401 (2007)
Bessiere, C.: Constraint propagation. Found. Artif. Intel. 2, 29–36 (2006)
Simonis, H.: Sudoku as a Constraint Problem, 11th International Conference on Principles and Practice of Constraint Programming (2005)
Rafael, C.G.: Digital Image Processing, 3rd edn. Pearson (2007)
Kamal, S., et al.: Detection of Sudoku puzzle using image processing and solving by Backtracking, simulated annealing and genetic algorithms: a comparative analysis. In: Proceedings of the 2015 Third ICIIP, pp. 179–184. IEEE Computer Society (2015)
Wicht, B., Henneberty, J.: Mixed handwritten and printed digit recognition. In: Sudoku with Convolutional Deep Belief Network, 13th ICDAR (2015)
Knuth, D.: Dancing links, Millennial perspectives in computer science, 187–214 (2000)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Nguyen, T.T., Nguyen, S.T.T., Nguyen, L.C. (2018). Learning to Solve Sudoku Problems with Computer Vision Aided Approaches. In: Satapathy, S., Tavares, J., Bhateja, V., Mohanty, J. (eds) Information and Decision Sciences. Advances in Intelligent Systems and Computing, vol 701. Springer, Singapore. https://doi.org/10.1007/978-981-10-7563-6_56
Download citation
DOI: https://doi.org/10.1007/978-981-10-7563-6_56
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-10-7562-9
Online ISBN: 978-981-10-7563-6
eBook Packages: EngineeringEngineering (R0)