This application includes a computer program listing, submitted electronically as a txt file named NP.txt, incorporated by reference herein.
1. Field of the Invention
This application relates to methods and computer software for creating games, such as creating puzzles.
2. Description of the Related Art
Number place puzzles are readily available in the market place although little or no information if available regarding how the puzzles were created. Software that assists with solving number place puzzles is also available although software that actually solves the puzzles is not widely distributed if available. Of course, software that can solve number place puzzles would be most valuable in creating number place puzzles.
The absence of software to create number place puzzles indicates a need for public disclosure of a suitable method and software for making number place puzzles to promote development of useful arts.
A method and computer software are provided for making number place puzzles. Numbers and unknowns are represented by variables that are assigned values such as by a plurality of nested loops. Instructions within each loop limit access to embedded loops until all assigned values form a valid solution. When some of the variables are pre-assigned all known values from a number place puzzle having only one solution, the output of the software would be the solution of the puzzle. However, when the variables are pre-assigned values while creating a number place puzzle, the software output will be all valid solutions, if any. Multiple solutions provide information that assists in modifying the pre-assigned values to obtain a single solution.
So that the manner in which the above-recited features of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments.
To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures. It is contemplated that elements disclosed in one embodiment may be beneficially utilized on other embodiments without specific recitation.
Each box in the example puzzle of
The embodiment shown in
When the selected value for a variable is the same as a compared value, embedded loops are bypassed 24 for selection of another value for the same variable. If the selected value if different from all compared values, the value of the next variable is selected, such as selection of A225. The selection of successive variables continues as long as each new value satisfies the comparisons. When no value satisfies the comparisons for a variable, processing returns to selection of the prior variable, e.g. selection of A2 exits 26 to selection of another value for A1.
When all selected variables satisfy the comparisons, the variables are printed 27. Thus, the comparison instructions within each loop limit access to successive loops that would print the variables. The computer program ends 28 after the possible combinations of the variables have been tested, such that all possible solutions are printed absent limitation on the number of printed solutions. When the computer program listing (NP.txt) is executed with JUSTBASIC 1.01, up to 50 solutions (when NPMAX=50) are printed to a window and can be saved in a file or printed.
After successful selection of all variables without duplicates, the computer program listing prints a header 34 that keeps count of the solutions and prints all variables 35. When a variable such as A1 of F6 is a duplicate to a pre-assigned value or a previously selected value, processing jumps to a label positioned before the corresponding Next statement 36. After all combinations are processed, the final commands print “End” 37 to show that processing is completed unless the program terminated by setting NPMAX to a number less than the number of solutions.
When multiple solutions are obtained, further pre-assignment of values may be assisted by comparing the multiple solutions. For example, the pre-assigned values shown in
Puzzles having a single solution can be modified to be more symmetrical as shown in
While the foregoing is directed to embodiments of the invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof.
Number | Name | Date | Kind |
---|---|---|---|
20070129127 | Huang et al. | Jun 2007 | A1 |
20070173306 | Chen et al. | Jul 2007 | A1 |
20080161106 | Morris | Jul 2008 | A1 |
20100259001 | Muller et al. | Oct 2010 | A1 |
Number | Date | Country |
---|---|---|
WO 2009043126 | Apr 2009 | WO |
Entry |
---|
Falanagan et al. “The Ruby Programming Language”, O'Reilly Media, Inc., Jan. 25, 2008. |
Grayer, Marlene, “Sudoku” (2009). MAT Exam Expository Papers. Paper 16. http://digitalcommons.unl.edu/mathmidexppap/16. published Jul. 1, 2009. |
NebraskaMATH Oct. 2009 Newsletter http://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1007&context=nebmath. |
Moon, T.K.; Gunther, J.H.; Kupin, J.J.; , “Sinkhorn Solves Sudoku,” Information Theory, IEEE Transactions on , vol. 55, No. 4, pp. 1741-1746, Apr. 2009 doi: 10.1109/TIT.2009.2013004 URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4804943&isnumber=4802290. |
Number | Date | Country | |
---|---|---|---|
20110111816 A1 | May 2011 | US |