• 沒有找到結果。

DDG Complexity

在文檔中 2008mcmsolutions (頁 179-183)

The DDG algorithm is more complex than RG algorithms, and we be-lieve that the potential benefits outweigh the additional complexity. For generating puzzles with targeted difficulty levels, DDG has the potential to be much more efficient than RG in terms of expected running time and search complexity (number of iterations and branches).

Overall complexity of any generator is highly dependent on the solver used. By using the human technique-based solver, our runtime significantly exceeds the runtime of RG methods using brute-force solvers. We believe that our work on DLX-based difficulty assessment could replace the re-liance on the human technique-based solver, significantly accelerating the generator to make it competitive with RG methods in terms of running time. We hypothesize that an optimized DDG will outperform RG for ex-tremely high difficulty levels since the probability of complicated structures arising at random is very small. RG requires several seconds to compute extremely difficult puzzles. (We consider “extremely difficult” puzzles to be those rated over 8.0 on the Sudoku Explainer scale.)

Conclusion

We cast Sudoku as an exact cover problem. Then we present a model of human solving strategies, which allows us to define a natural difficulty metric on Sudoku puzzles. This metric provides four difficulty levels: Easy, Medium, Hard, and Fiendish, each with an additional granularity deter-mined by the number of rounds to complete the puzzle. This metric was tested against puzzles from the Los Angeles Times. Our ‘Easy’ metric en-compasses both the ‘Gentle’ and ‘Moderate’, but is able to distinguish be-tween puzzles in the category by the number of rounds it takes to complete the puzzle. It also offers additional granularity at the higher end by defin-ing another level that contains constraint sets of size one, which the Times lacks. This metric also provides additional accuracy by separating out puz-zles from the “Hard” level into a “Fiendish” level that require much more advanced techniques such as Nishio.

Our Difficulty-Driven Generation algorithm customizes to various defi-nitions of difficulty. It builds from existing ideas of random generation algo-rithms, combining the bottom-up approach with human-technique based solvers to generate puzzles of varying difficulties. Though the generator

requires additional tuning to make it competitive with current generators, we have demonstrated its ability to generate a range of puzzle difficulties.

References

Felgenhauer, Bertram, and Frazer Jarvis. 2006. Mathematics of sudoku I. http://www.afjarvis.staff.shef.ac.uk/sudoku/felgenhauer_

jarvis_spec1.pdf.

Garns, Howard. 1979. Number place. Dell Pencil Puzzles & Word Games #16 (May 1979): 6.

Juillerat, Nicolas. 2007. Sudoku Explainer. http://diuf.unifr.ch/

people/juillera/Sudoku/Sudoku.html.

Knuth, Donald E. 2000. Dancing links. Knuth, Donald Ervin. 2000. Dancing links. In Millennial Perspectives in Computer Science: Proceedings of the 1999 Oxford-Microsoft Symposium in Honour of Professor Sir Antony Hoare, edited by Jim Davies, Bill Roscoe, and Jim Woodcock, 187–214. Basingstoke, U.K.: Palgrave Macmillan. http://www-cs-faculty.stanford.edu/

~uno/preprints.html.

Lee, Wei-Meng. 2006. Programming Sudoku. Berkeley, CA: Apress.

Mancini, Simona. 2006. Sudoku game: Theory, models and algo-rithms. Thesis, Politecnico di Torino. http://compalg.inf.elte.

hu/~tony/Oktatas/Rozsa/Sudoku-thesis/tesi_Mancini_Simona%

2520SUDOKU.pdf.

Pegg, Ed, Jr. 2005. Sudoku variations. Math Games. http://www.maa.

org/editorial/mathgames/mathgames_09_05_05.html.

Simonis, Helmut. 2005. Sudoku as a constraint problem. In Mod-elling and Reformulating Constraint Satisfaction, edited by Brahim Hnich, Patrick Prosser, and Barbara Smith, 13–27.http://homes.ieu.edu.tr/

~bhnich/mod-proc.pdf#page=21.

Stuart, Andrew. 2008. Strategy families. http://www.scanraid.com/

Strategy_Families.

Time Intermedia Corporation. 2007. Puzzle generator Japan. http:

//puzzle.gr.jp/show/English/LetsMakeNPElem/01.

Chris Pong, Martin Hunt, and George Tucker.

Ease and Toil: Analyzing Sudoku

Seth B. Chadwick Rachel M. Krieg

Christopher E. Granade

University of Alaska Fairbanks Fairbanks, AK

Advisor: Orion S. Lawlor

Abstract

Sudoku is a logic puzzle in which the numbers 1 through 9 are arranged in a9 × 9matrix, subject to the constraint that there are no repeated numbers in any row, column, or designated3 × 3square.

In addition to being entertaining, Sudoku promises insight into com-puter science and mathematical modeling. Since Sudoku-solving is an NP-complete problem, algorithms to generate and solve puzzles may offer new approaches to a whole class of computational problems. Moreover, Sudoku construction is essentially an optimization problem.

We propose an algorithm to construct unique Sudoku puzzles with four levels of difficulty. We attempt to minimize the complexity of the algorithm while still maintaining separate difficulty levels and guaranteeing unique solutions.

To accomplish our objectives, we develop metrics to analyze the diffi-culty of a puzzle. By applying our metrics to published control puzzles with specified difficulty levels, we develop classification functions. We use the functions to ensure that our algorithm generates puzzles with difficulty levels analogous to those published. We also seek to measure and reduce the computational complexity of the generation and metric measurement algorithms.

Finally, we analyze and reduce the complexity involved in generating puzzles while maintaining the ability to choose the difficulty level of the puzzles generated. To do so, we implement a profiler and perform statistical hypothesis-testing to streamline the algorithm.

Introduction

在文檔中 2008mcmsolutions (頁 179-183)

相關文件