Numerical puzzles such as SUDOKU or FUTOSHIKI may be solved by placing numerical values in empty regions of the puzzle, so that each region is filled in a manner that is consistent with any provided clues and pre-filled values in the puzzle, and conformant to the puzzle's logical rules. Such puzzles are not mathematical puzzles in that they do not require any mathematical problems to be solved to complete the puzzles. Whether numerical or mathematical, such puzzles may be embodied on printed mediums such as paper or other manufactured objects, or in computer programs that allow users to play the puzzle. Issues faced by the producers of such puzzles may involve generating new puzzles. For some types of mathematical puzzles, it may be difficult or impossible to generate puzzles without resorting to computer-based techniques.
A puzzle may be comprised of one or more geometric areas, each geometric area comprising a number of mystery number regions located at separate areas along the geometric area, four pair clue regions in which each pair clue is arranged on an edge of the geometric area and interposes two mystery number regions, and a central clue region that is surrounded by the mystery number regions and the pair clue regions. The mystery number regions may initially be blank, to be filled in by a user based on clues to be found in some of the pair clue regions and the central clue region.
A clue in a pair clue region governs permissible values for the two mystery number regions the pair clue region interposes. A clue in a central clue region governs permissible values for the three or more mystery number regions the central clue region is central to. A “plus clue” before or after a value indicates that the values placed in the associated mystery number regions should add up to the value supplied by the plus clue. A “times clue” before or after a value indicates that the product of the values placed in associated mystery number regions should be equal to the value supplied by the times clue.
As further explained below, in embodiments, the puzzle may have four rules, as follows:
Rule 1. Mystery numbers are whole number and have to be within a chosen range, R. For example, an R=9 puzzle has mystery numbers that range from 1 to 9, an R=12 puzzle has mystery numbers that range from 1 to 12, an R-15 puzzle has mystery numbers that range from 1 to 15, etc.
Rule 2. A mystery pair, two mystery numbers adjacent to one another, i.e., on either side of a pair clue region, can only occur once in a puzzle.
Rule 3. Rule 3 is actually an exception to Rule 2. A mystery pair may be repeated in a puzzle more than once if the mystery pairs are composed of identical mystery numbers and together they form a specified shape, such as four identical mystery numbers forming a square, or three identical mystery numbers forming a triangle, etc. Such specified shapes formed from identical mystery numbers can only occur once in a puzzle, but not all puzzles have such shapes.
Rule 4. Each puzzle can only have one solution, i.e., one set of mystery numbers that correctly complete the puzzle.
For puzzles with or without central clue regions, the central clue regions, mystery number regions and pair clue regions can have many different shapes. As illustrated in the embodiment depicted in
Also, while the geometric puzzle 124 depicted in
Returning to
Clues within a pair clue region or central clue region constrain the values that may be placed in a mystery number region.
In some embodiments, as noted above, a combination of numbers or values assigned to a mystery number region may occur only once in a given puzzle. In some embodiments, combinations of pairs numbers or values for mystery number regions may occur only once in a puzzle. Embodiments may allow an exception to this rule where identical values may be assigned to mystery numbers within an area having a specified shape or pattern. This pattern, which may be referred to as a “repeating clue region,” may occur only once in any puzzle, and not all puzzles have this pattern. An example of a repeating clue region 300 is depicted in
In an embodiment, a given puzzle configuration may have one and only one solution. A puzzle configuration comprises an arrangement of rectangular-shaped regions and a set of clues.
Although
A pair clue, such as 416, may be adjacent to mystery numbers 402 and 404, in the vertical arrangements depicted in
A central clue 420 may be initially populated with zero, one, or two clues. In
A puzzle may comprise one or more jokers or wildcard regions. Joker or wildcard regions may represent any value. Embodiments may also allow for variants of wildcards, such as numbers within a range or from a set of possible numbers.
Embodiments may generate grids suitable for use as puzzles of the types described herein. Divide and conquer principles may be combined with search and optimization algorithms to generate grids of various sizes and configurations. The grids may be validated for correctness, adherence to rules and constraints. Embodiments may also validate grids to ensure that the generated puzzle has only one solution for a given configuration.
Embodiments may generate minimal puzzles for various grid configurations. A minimal puzzle may be defined as a grid in which clue configurations are such that, for a given number of central clues present in the grid, the number of pair clues present in the grid is minimal. In this context, minimal may be defined so that if any pair clue is removed from the grid, there is no longer a unique solution to the puzzle.
Additional embodiments of puzzles that may not include central clue regions are depicted in
As previously noted, multi-puzzles or composite puzzles may also be constructed where smaller puzzles are combined together to form larger puzzles or specific shapes, while still abiding by the four rules for the puzzles, as noted above. This allows bigger and more interesting puzzle shapes with small values of R to be constructed without running out of unique pairs for each puzzle. For example, the puzzle of
Before a puzzle configuration can be made available to users, the puzzle configuration must be designed, mystery numbers and/or clues must be inserted, and the puzzle must be solved to ensure there is only one solution to the puzzle. Embodiments for solving puzzles may employ various combinations of divide and conquer algorithms, search and optimization algorithms, and heuristic methods to solve a particular puzzle.
Operation 500 depicts dividing the puzzle to be solved into a number of central or square areas, each square area containing three or more mystery number regions, four pair clue regions, and a square clue region. An example of such a region is depicted in
As depicted by operation 502, embodiments may maintain a list of central or square areas that are yet to be solved. A square area (recall that “square” may refer to an area of other shapes herein) may be considered solved when a valid number has been assigned to all three or more mystery number regions. The number three forms the minimum number of mystery numbers for a central area because there must be three sides to a central area for the area to be central, i.e., surrounded. If there are central areas that are yet to be solved, the no branch of operation 510, then a central area from the list of central areas to be solved may be selected in operation 503.
Embodiments may maintain a list of possible candidate pair values for each pair clue, as depicted by operation 504. For example, referring again to
Operation 506 depicts maintaining a list of possible candidate pair values for a central clue region within the central area. For example, for an R=9 puzzle and a central clue of “×60” the list could comprise (6, 5, 2, 1), (5, 4, 3, 1), and (5, 3, 2, 2), and various permutations thereof.
The central area may be solved, as depicted by operation 508, by checking and eliminating illegal values from the lists of possible values. Embodiments may employ recursive algorithms to examine and eliminate illegal values. Breadth-first, depth-first, or various combinations thereof may be used by some embodiments. Various state data may be retained at each step of the recursion. Some embodiments may employ iterative or procedural mechanisms in place of recursive mechanisms. Additional processes and mechanisms, as described herein, may also be employed to solve the central area.
Operation 510 depicts determining whether any additional central areas remain to be solved, and if so continuing to solve central areas through the depicted operations. If all areas have been solved, the process completes as depicted by operation 512. In attempting to solve a puzzle in this manner, it is determined that the puzzle could have more than one solution, it may be necessary to add a mystery number or clue to the puzzle to prevent the puzzle from having the more than one solution.
Operation 600 depicts what may be considered the start of a procedure entitled “solve_puzzle.” Those of ordinary skill in the art will appreciate that this designation is for descriptive purposes, and does not limit the intended scope of the disclosure. In addition, those of ordinary skill in the art will appreciate that the operations depicted in
Operation 602 depicts attempting to solve an area of a puzzle without making guesses, as described herein. An attempt to solve an area of a puzzle may result in one of three outcomes. If the area can be completely solved without guesses, the process may be considered complete as indicated by operation 606. An indicator of success may be provided. If the area could not be solved, the process may also be considered complete, but with an indication of failure, as depicted by operation 608. If the area was only partially solved without using guesses, the process may continue.
Embodiments may maintain a list of clues having choices of values for the corresponding mystery number regions where the corresponding mystery number regions have not yet been determined (or assigned). The list may comprise an entry for each pair clue region having choices of values, and an entry for each diagonal of a central clue region. Operation 610 depicts maintaining the list of clues. The list may be examined, as indicated by operation 612, to determine if further evaluation is needed. If not, a partial solution, as further defined below, may be returned at operation 614. Otherwise the evaluation may continue. Where values have already been determined or assigned for corresponding mystery number regions, in embodiments, there may be no need to maintain a list.
If the puzzle cannot be solved without guessing, then operation 616 depicts applying one of various heuristic approaches to choose a clue from the list of clues. Embodiments may then perform further evaluation on the chosen clue to determine possible solutions pertaining to that clue. Embodiments may store the current state of the puzzle, as depicted by operation 618, prior to performing continued analysis. Embodiments may assign values to various mystery number regions during an attempt to solve the puzzle and to backtrack using previously saved state information.
Embodiments may employ various heuristic methods to choose a clue from the list of clues. One possible heuristic is to choose the clue whose corresponding mystery number regions have the least number of possible candidates.
The process may continue to operation 650 in
Operation 654 depicts assigning pairs of candidate values to mystery number regions associated with the candidate values. The outcome of the assignment may then be determined, as indicated by operation 656. The outcome may involve three conditions. First, the puzzle may be solved. Second, the puzzle may not be solved but the assigned values conform to all applicable rules and clues. Third, the assigned values may fail because of a conflict with a rule or clue.
If the puzzle is not solved, but the assigned values conform to applicable rules and clues, the process may continue with a recursive invocation of a solve_puzzle procedure, e.g., operation 600 in
After the recursive invocation, the state of the puzzle may be restored so that the next pair of candidate values may be evaluated. This is depicted by operation 660. Various forms of housekeeping may be performed at operation 662, such as maintaining a count of solutions, partial solutions, and failed solutions, as well as candidate values which lead to full or partial solutions.
A puzzle may be divided into a number of areas. Each area may be a square, triangular or other area comprised of three or more mystery number regions, three or more pair clue regions, and a central or square clue region. For this example, a square clue region with four mystery numbers and four pair clues will be used. Some embodiments may employ larger regions. The areas may be stored or maintained in a list or other structure of a memory or storage device. Embodiments may evaluate each area until all have been fully evaluated. Operation 702 depicts determining that all areas have or have not yet been fully evaluated. If all areas have been fully evaluated, the process may complete as depicted by operation 704. As used herein, “fully evaluated” means that no more evaluations can be performed, such as assigning values to mystery number regions, simplifications, additions and modifications of clue regions and their choices/candidate lists.
If all areas have not yet been fully evaluated, operation 703 may be performed to pick an area that has not yet been fully evaluated and then operation 706 may be performed to determine whether all clues within an area have been evaluated. If so, the process may continue to the next area. Otherwise operation 708 may be performed. Clues may be solved by a brute-force method or other method, accounting for groups of pairs and neighboring squares affecting a common mystery number. Embodiments may employ heuristic methods to improve search speed.
The mystery numbers associated with a clue may be solved by comparison with all clues in the same area sharing a mystery number with the clue. The clues and associated mystery number regions may be compared to the adjacent clues and associated mystery number regions in all directions, i.e. up, down, left, right, and diagonally adjacent. Candidate values for the mystery numbers may be eliminated based on the comparison. Clues and common mystery numbers in adjacent areas may also be considered. A candidate value might be eliminated, for example, when the use of the candidate value in one area would conflict with clues and/or values in or assigned in an adjacent area. A value may be assigned when all but one candidate value has been eliminated.
Operation 710 depicts assigning a value when there is only one possible candidate value for a mystery number region, based on pairs of clues associated with the mystery number region.
At operation 712, a new clue may be determined and added to the list of clues for the area. Added clues may comprise reductions or simplifications of existing clues, based at least in part on assigned mystery number regions or existing clues in the area or adjacent area. Added clues may also comprise new clues based at least in part on assigned mystery number regions. Embodiments may also add new clues to adjacent areas, so in operation 713, adjacent areas that are affected by any changes made in operations 708 and 710 are added to the list of unevaluated squares. In this manner, a list of unevaluated squares is maintained and can be iterated, as further explained below, until no more unevaluated squares exist. For example, if a clue is added based on adjacent clues to the a square (area) or valued are assigned to a mystery number, any area adjacent to that change will need to be re-evaluated and the changes propagated, until no further change is possible.
Central or square clues may be considered to produce new clues. Embodiments may derive a new clue for one side of the area based on an existing clue on another side and a clue associated with a central clue region. For example, if a left-hand side of an area has the clue ×12, and the central clue has ×60, a new clue ×5 may be added as a clue to the right hand side. Embodiments may add candidate values for the mystery number regions associated with the new clue.
After eliminating conflicting candidates and/or adding new clues, the next clue within the area may be evaluated, as depicted in
While embodiments for solving puzzles have been discussed, which presume the puzzle configuration already exists, and the mystery numbers are just being filled in based on zero or more clues and certain parameters, such as R=9 for a 3 by 4 puzzle configuration,
A process for generating valid puzzles may be initiated by a user. The process may receive information indicative of puzzle parameters such as shape, size, and difficulty. As previously noted, the shape and size may be chosen from a list of existing shapes and sizes or generated because no puzzle of the same shape and/or size had been generated before. The shape and size may also be randomly generated by a random shape and size generator. This step is depicted by operation 800. The process may also receive indications of special puzzle variants, such as speed puzzles, repeating clue regions, no central clue regions, joker or wildcard regions, and so forth. At operation 802, information indicative of the puzzle's R value may be received. The R value may indicate the range of integral values permitted in a valid solution of the puzzle. In some embodiments, valid values may be integers in the range of 1 to R. In other embodiments, values may be in the ranges 0 to R, −R to R, and so on.
At operation 804, a grid of the designated shape and size may be generated. The grid may be initially empty of clues and mystery numbers. Embodiments may pre-fill certain squares, consistent with received parameters, with some number of joker or wildcard regions.
After the grid has been generated, sufficient clues may be added to the puzzle so that the puzzle has only one valid solution, as depicted by operation 806. Techniques and mechanisms for adding clues are described herein. Once sufficient clues have been added to ensure a unique solution, additional clues may be added to reduce the puzzle difficulty to a desired level.
As depicted by operation 902, the embodiments may receive various parameters indicative of the puzzle to be generated, including a R value, an indicator that a repeating clue region should or should not be present, a quantity of joker or wild card regions, the size and shape of the grid, and so forth. Information indicative of the size and shape of the grid may comprise a number of rows and columns or other shapes and arrangements, a number of areas, a shape configuration of the areas, and so on. Embodiments may also receive information indicative of a pattern for the puzzle. The pattern may describe potential or required arrangements of pre-filled mystery numbers, joker or wildcard regions, clues, and so forth.
At operation 904, a repeating clue region may be generated for the puzzle, if the presence of such a region was indicated. A random area may be chosen and the repeating clue region generated for it. The central area depicted in
Values for all remaining mystery number regions in the grid may be assigned, as depicted by operation 906. Embodiments may assign values in the range of valid numbers, such as 1 to R, to randomly selected mystery number regions in accordance with the rules of the puzzle. The rules checked may comprise ensuring that pairs of mystery numbers occur only once in a puzzle. If a number would violate a rule, another number may be selected. As depicted by operation 908, the process may backtrack if no new numbers in the valid range of numbers may be added without violating a rule. Operation 910 depicts recursively invoking a procedure for assigning values until a number has been assigned to all mystery number regions.
Embodiments may assign clues to a puzzle after associating values with mystery number regions.
Embodiments may add central clues prior to adding pair clues. Operation 1002 depicts adding a number of central clues to central clue regions in a puzzle, consistent with puzzle parameters. The process may receive information indicating that the puzzle should contain a certain number of central clues, a maximum number of central clues, or a minimum number.
Operations 1004 and 1006 depict adding pair clues to the puzzle until the puzzle can be solved with only one solution. A pair clue may be selected for addition using various approaches such as those described herein. The puzzle may then be solved using the clues added up to that point. The solution attempt may result in zero, one, or more than one solution. If no solution is found, the process may backtrack to a previous point and try a different clue selection, then test the puzzle again. If more than one solution is found, additional clues may be added until only one solution is found.
The location and type of the clues added to a puzzle, including pair clues and central clues, may be based on various factors. Embodiments may select locations based in part on a pattern indicated as desirable for the puzzle, such as a symmetrical arrangement of clues or the asymmetrical configuration of the puzzle. The choice between plus clues and multiply clues or both clues may be based on the quality or difficulty of puzzle desired, as well as other factors, such as which choices most reduce the number of solutions to the puzzle or the number of partial solutions. As used herein, a “partial solution” is one where not all of the mystery number regions in the puzzle are assigned values using the clues in the puzzle and the heuristic part of the algorithm. The chosen operator type may influence whether the puzzle is more focused on logic skills or numeracy skills to solve, although all puzzles require numeracy skills.
Heuristics may also be employed to produce a minimal puzzle having a minimized number of clues. The following are examples of heuristics that may be used by various embodiments involving puzzles with rectangular central clue regions, although some heuristics would also be applicable to puzzles with central clue regions of other shapes and puzzles without central clue regions:
Operation 1008 depicts adding additional clues to a puzzle that already has sufficient clues so that the puzzle has only one solution. The various techniques described above may be employed to select additional clues. Additional central clues and/or pair clues may be added. Once the puzzle has reached a desired difficulty level, the puzzle generation process may end, as depicted by operation 1010.
Embodiments may estimate the difficulty of a puzzle based on various factors, which apply to multiple central clue combinations for puzzles with repeating patterns of central regions. These include:
The above factors also only apply to puzzles when R=9. When R=12 or R=15 or other values, the factors may be different.
Operation 1100 depicts generating a grid of an indicated shape and size. For puzzles having central clue regions, the grid may comprise a number of partially overlapping central areas, where each area may consist of three or more mystery number regions, three or more pair clue regions, and a central clue region. An example of one area may be seen in
Embodiments may add mystery numbers to the grid using various approaches and mechanisms, such as those described herein. At operation 1102, central clues may be added to one or more areas within the puzzle.
Operation 1104 depicts determining whether or not the puzzle is solvable, i.e. resolves to one solution only. If so, the generation may be considered complete, as depicted by operation 1106, although additional steps may be taken by some embodiments to decrease the difficulty of the generated puzzle.
Operation 1108, which may be combined with operation 1104, depicts attempting to solve the puzzle without guessing. A process such as the one depicted by
Embodiments may create a list of choice points, as depicted by operation 1110. Choice points may comprise pair clues which have candidate values, as well as central clues having diagonally opposed candidate values. The list of choice points may be retained for use in performing a search of possible puzzles. For example, a depth-first search of possible puzzles may be performed, using the list of choice points to restore state as necessary to continue searching.
Operation 1112 depicts solving the puzzle, which may be performed using a process such as the one depicted by
At operation 1200, embodiments may form a list of areas, within a puzzle, that have no clues within them. The areas may comprise squares of the type depicted in
Operation 1204 depicts choosing an area from the list, based at least in part on the areas position in the list. Based on the parameters supplied by a user, a given puzzle may be required to have an indicated number of central clues. Where this number is less than or equal to half of the number of areas in the list, embodiments may randomly select an area from the first half of the sorted list. Otherwise clues may be chosen from the list at random. Embodiments may employ other mechanisms, such as weighting probability of selection based on position in the list. Embodiments may also employ alternative mechanisms in lieu of forming a sorted list, such as searching an unsorted list, employing associative arrays, and so on.
At operation 1300, embodiments may assemble a list of pair clue regions, each entry in the list having more than one candidate value. This operation may be performed during or subsequent to attempting to solve the puzzle using assigned clues without guessing.
Operation 1302 depicts selecting a pair clue region from this list based on which pair clue region has the greatest number of candidate values. A set of additional pair clue regions surrounding the selected pair clue region may then be identified, as depicted by operation 1304. Of these additional pair clue regions, a pair clue region may be selected to receive an additional plus or times clue. Embodiments may select, from the set of additional pair clue regions, using heuristics, the pair clue region having the least number of pair clue regions with clues around it. This is depicted by operation 1306. Embodiments may also base the selection, in whole or in part, on the pair clue region with the fewest prime mystery numbers around it. Various other heuristics may be employed.
Operation 1308 depicts adding a plus or times clue to the pair clue region selected from the set of additional pair clue regions. Embodiments may determine to add a plus clue or a times clue based on which clue provides the greatest reduction in the number of solutions. Embodiments may perform solution attempts to determine whether the plus or times clue is most effective at reducing the number of possible solutions.
Operation 1400 depicts generating a puzzle that has a minimized number of clues. Embodiments may generate a list of pair clue regions in the puzzle that do not yet have associated clues, as depicted by operation 1402. From this list, heuristics may be used to select a pair clue region from the list, as depicted by operation 1404.
Embodiments may employ various heuristic or algorithmic approaches to choose a pair clue region from the list. One approach is to randomly select an element. Another approach is to choose a region based on its impact on the difficulty level of the puzzle. Embodiments may prefer to select a region where its impact on the difficulty level of the puzzle will be as small as possible. This approach may allow for generating puzzles with a wide variety of difficulty levels.
A pair clue region may be chosen based on the chosen region having a least number of clues around that pair. For each region in the list, embodiments may calculate a weight to indicate how many clues are around the pair, possibly adjusted for the significance of the clues. Once a weight is calculated for each, the least weighted value may be selected. This approach may be employed by embodiments to select a region which, if a clue is added to it, would have the least impact on the difficulty of the puzzle. Embodiments may employ the opposite approach, selecting the highest weighted region, to create easy puzzles with a minimum number of clues.
A weight function may be based on examining each pair clue region around the region whose weight is being calculated. For each region having a clue, weight may be increased by a constant value. For each area above, below, left, or right of the area in which the region is located, the weight may be increased by a second constant value. For each area diagonally opposed to the area in which the region is located, the weight may be increased by a third constant value.
An alternative form of puzzle may be generated to have a large number of clues and therefore be quick to solve, which may be referred to herein as a speed type puzzle or speed puzzle, but which could be known by other names as well.
A process for generating a speed puzzle may receive parameters describing the puzzle, including various factors such as the size and shape of the puzzle, the intended difficulty, and so forth. The parameters may include a percentage value or other indicator of the number of pair clues the puzzle should have relative to the number of pair clue regions. A desired number of central clues may also be provided, which in some embodiments may typically be one or two central regions. Operation 1500 depicts receiving puzzle parameter information.
At operation 1502, a grid may be generated according to the specified parameters, and filled with mystery numbers for the purpose of generating clues. A desired number of central clues may then be added, as depicted by operation 1504.
Operation 1506 depicts adding a pair clue to a pair clue region in the puzzle. The clue may be added to a pair clue region having the least number of horizontally, vertically, and diagonally surrounding clues. Embodiments may employ this approach to minimize clustering of clues around a particular area of the puzzle. The added clue may be a plus clue and/or a times clue. Embodiments may randomly select the clue type, based in part on the specified parameters of the puzzle.
At operation 1508, it may be determined that the number of added clues satisfies the specified parameters of the puzzle. If the parameters have not been satisfied, additional pair clues may be added. If the parameters have been satisfied, operation 1510 may be performed to determine if there is exactly one solution to the puzzle. If there is only one solution, the process may end, as depicted by operation 1512. If there is more than one solution, the process may be restarted, as indicated by operation 1514. Some embodiments may restart at a stage following grid generation and mystery number assignment. Other embodiments may restart at earlier or later stages, or employ backtracking.
In an embodiment, speed type puzzles may also be generated in the manner described above with respect to generally generating puzzles such at that after operation 1502, a grid is generated with the right number of central clues and then the parameters are evaluated to determine if they have been satisfied. If the puzzle parameters have not been met, pair clues are then iteratively added as in operation 1508. The remainder of
The embodiments of
One or more processors 1806 includes any suitable programmable circuits including one or more systems and microcontrollers, microprocessors, reduced instruction set circuits (RISC), application specific integrated circuits (ASIC), programmable logic circuits (PLC), field programmable gate arrays (FPGA), and any other circuit capable of executing the functions described herein. The above example embodiments are not intended to limit in any way the definition and/or meaning of the term “processor.”
Memory 1808 and storage devices 1816 include non-transitory computer readable storage mediums such as, without limitation but excluding signals per se, random access memory (RAM), flash memory, a hard disk drive, a solid state drive, a diskette, a flash drive, a compact disc, a digital video disc, and/or any suitable memory. In the exemplary implementation, memory 1808 and storage device 1816 may include data and/or instructions embodying aspects of the disclosure that are executable by processors 1806 (e.g., processor 1806 may be programmed by the instructions) to enable processors 1806 to perform the functions described herein. Additionally, memory 1808 and storage devices 1816 may comprise an operation system 1802, basic input-output system (“BIOS”) 1804, and various applications.
Display 1810 includes at least one output component for presenting information to a user of the computing device and may incorporate a user interface 1811 for providing interactivity through the display 1810. Display 1810 may be any component capable of conveying information to a user of the computing device. In some implementations, display 1810 includes an output adapter such as a video adapter and/or an audio adapter or the like. An output adapter is operatively coupled to processor 1806 and is configured to be operatively coupled to an output device such as a display device (e.g., a liquid crystal display (LCD), organic light emitting diode (OLED) display, cathode ray tube (CRT), “electronic ink” display, or the like) or an audio output device (e.g., a speaker, headphones, or the like).
Input Devices 1812 includes at least one input component for receiving input from a user. Input component 1812 may include, for example, a keyboard, a pointing device, a mouse, a stylus, a touch sensitive panel (e.g., a touch pad or a touch screen incorporated into the display 1810), a gyroscope, an accelerometer, a position detector, an audio input device, or the like. A single component such as a touch screen may function as both an input device 1812 and a display 1810.
Network interfaces 1814 may comprise one or more devices configured to transmit and receive control signals and data signals over wired or wireless networks. In various embodiments, one or more of network interfaces 1814 may transmit in a radio frequency spectrum and operate using a time-division multiple access (“TDMA”) communication protocol, wideband code division multiple access (“W-CDMA”), and so forth. In various embodiments, network interfaces 1814 may transmit and receive data and control signals over wired or wireless networks using Ethernet, 802.11, internet protocol (“IP”) transmission, and so forth. Wired or wireless networks may comprise various network components such as gateways, switches, hubs, routers, firewalls, proxies, and so forth.
An embodiment of a software implementation of the present disclosure, an application or app, will now be described. The application operates in conjunction with an operating system, such as operating system 1802, of a computer device 1800, to generate a user interface 1811 via the display 1810 that displays one or more interactive puzzles, as disclosed herein, to be solved by a user in a number of different modes. The user interface 1811 also provides various tools, scores and other items to assist, educate and entertain the user. While the application is described in the context of a software application, the puzzles described herein can be generated and solved in other ways, where puzzles may printed on paper or other tangible surfaces, generated on three-dimensional objects, as noted above, generated on websites, and may other embodiments. The application may operate on any computing device, such as computing device 1800, but is particularly well suited for a smart phone type of computing device.
After starting the application and proceeding through a number of start-up screens generated by the user interface 1811 of the application, a user will be presented with screen 1900 of
The icons above the puzzle provide the user with information about the status of the puzzle 2001 as well as other information. For example, the arrow 2005, performs the same function as arrow 1910 of
The error symbol 2012 indicates whether the user has any errors available for use. An error occurs when a user submits values for one or more mystery number regions that are incorrect. In sprint mode, the user may have one or more permissible errors for individual mystery number regions before completing a puzzle, also called “cZuesing,” while in marathon mode the user may have one or more permissible tries/attempts for completing the entire puzzle. As illustrated on screen 2000, the number associated with the error symbol 2012 indicates that the user has 3 possible errors to use for the puzzle 2001. At higher puzzle levels, there may be no possible errors, in which case the error symbol 2012 would be darkly colored and no number associated with the error symbol 2012. The lightly colored coin 2014 indicates the user has one or more credits available for use. The number associated with the coin 2014 indicates that the user has 24 credits. Pressing on the coin at any time allows the user to purchase more credits or obtain more credit coins in some other way, such as liking the application in FACEBOOK, or some similar type of activity. The timer 2016 provides a remaining period of time left for the user to solve the puzzle and still be awarded points for cZuesing the puzzle. If the timer 2016 reaches 0 before the user has solved the puzzle, the user can still work on the puzzle, but will no longer cZues the puzzle. The life preserver 2018 provides the user with access to a guide menu for help or other information. Selecting the life preserver 2018 pauses the timer 2016 and the application while the guide is in use.
The central button 2110 serves different functions depending on the operational mode selected. In sprint mode, the central button 2110 is used for submitting note entries, as further described below. In marathon mode, the central button 2110 is used to confirm the submission of entries for the tiles, also as further described below. The light bulb 2112 may be used on some puzzles to receive hints or answers for particular tiles. Hints/answers may be possible for pair clue tiles, central clue tiles and mystery number tiles. The number associated with the light bulb 2112 indicates the number of free hints available, which may also be indicated by a banner or sign indicating free hints. Once the free hints have been utilized, additional hints may be available for purchase using coins or other means.
As some puzzles may be more difficult to solve than others, the key pad dial 2106 also enables the user to make notes that indicate possible values for tiles without having to submit a number in sprint mode. For example, as illustrated in
In an embodiment, the note pads 2116 each have a different color, the check mark within the selected note pad 2116 is black and color of the check mark over the pencil matches the color of the selected note pad. For example, if the note pad 2116 was gray, the check over the pencil would also be gray. Once the note pad was selected, a number from the number ring could be selected and that number would enter in the selected tile 2114 as a first guess at the value for that tile. That note or guess number would be smaller than the larger correct numbers, such as number 2118, indicated by stars within the puzzle 2102, and would be colored to match the colored note pad selected. In other embodiments, the note pads could all be the same color but have different shapes or hatching patterns to distinguish them from one another. In an embodiment, two numbers may be guessed for each selected note pad. When two numbers are selected for the same tile with the same note pad, both numbers would be illustrated within the tile 2114, but separated by a comma. In other embodiments, more than two numbers could be allowed to be selected for the same tile with the same note pad.
For example, as illustrated in
The key pad dial 2106 may also be used for guessing clues within pair clue regions and central clue regions. As illustrated in
As previously noted, embodiments of puzzles may have various difficultly levels. Also, as previously noted, when a user solves a puzzle, the user is presented, through the user interface, with a score based on the user's performance on that puzzle and the complexity of the puzzle. For each puzzle, complexity may be calculated using a number of parameters, including:
Hence, various metrics are used to calculate the puzzle complexity, including:
As noted above, while solving a puzzle, the user may be required to make guesses as to mystery numbers and possibly clues. Once one or more guesses have been made, the rest of the puzzle may be solvable. During this process, if the puzzle rules are violated, a ‘conflict’ is raised. When a conflict is raised, the guess is rejected and a new guess is made. As described above, the conflict number indicates how many times ‘conflicts’ are detected while solving the puzzle using the iterative and recursive approach described herein.
The puzzle complexity function, then calculates the complexity of a puzzle using the above parameters together with a set of scaling factors used in the formula. Once the puzzle complexity has been calculated, puzzles are categorized into categories (Level 1-5 or more) using the linear complexity band calculated above. The linear range of puzzle complexities go from a minimum to a maximum value. These minimum and maximum values vary depending on the values of M, N and R. This range is then divided into as many categories as required. In the embodiment of the application disclosed herein, for 3 by 4 puzzles, this range is divided into 5 categories.
The formula for calculating the complexity function for 3 by 4, Range=9 puzzles may be as follows, where the sum of (1) to (6) below equals the complexity of the puzzle:
The possible scores that can be obtained by a user of a puzzle depends on the complexity of the puzzle, as described above, and the user's performance. In sprint mode, as the user fills empty mystery number tiles with the correct answers, the user will be awarded a fixed number of points that is determined for each puzzle configuration. For example, for a 3 by 4 puzzle, Range=9, the fixed number is 2. If a puzzle contains a cZues square, i.e, a set of four repeating number regions forming a square or rectangle, and depending on the value of the repeating numbers of that square, and also depending on how long it takes the user to file in the three or more mystery numbers of the square with the corrects answers (from the start time of the puzzle), additional points may be added to the user's score for the puzzle. No points are awarded if any hints were provided to the user or if there were any errors associated with incorrect entries. The points awarded or a cZues square are called “cZeusSquarePoint.” The value of cZeusSquarePoint is also based on the puzzle configuration. For example, for a 3 by 4 puzzle, Range=9, this value is 10.
As a user adds each of the correct values in each mystery number box, a Time Bonus point, called “TB” is added to the final score. The faster the user adds the correct value of a mystery number tile, the higher the TB for that mystery number tile. This time interval is calculated from the time the previous mystery number tile was filled by the correct value, till the time the latest mystery number tile is filled by the correct answer. This time interval is called “Time-Interval.” TB is then calculated as a function of: total number of mystery numbers in a puzzle (called “total=m×n,” where m and n are the dimensions of the puzzle.), the puzzle-complexity (as described above), and the Time-Interval.
If C=(Puzzle-Complexity×(1/total)×Constant-Factor)
Then TB=C/Time-Interval.
For each level of puzzles, the user is allowed a certain number of “Errors” while entering values into mystery number tiles. If this number of allowed “Errors” is reached, while the user continues to use the puzzle, the puzzle will not be deemed to be “cZeused.” For instance, for level one puzzles, the number of Errors allowed is 3. A number of free Hints are provided for each level of the puzzles (for instance, for level one puzzles, 2 free Hints are given.) Subsequent hints will incur a charge from the user's coins. Regardless of the hints being free or purchased, using a hint will reduce the score of the user as follows:
In addition to the above, each time the user enters the incorrect value in a mystery number tile, the user is penalized by reducing its score by a fixed amount, a “Penalty-Point.” For 3 by 4, Range 9 puzzles, Penalty-Point=2.
The final score of a sprint mode puzzle is then calculated as follows:
In marathon mode, the scoring function differs slightly from the scoring for sprint mode. Regardless of the hints being free or purchased, using a hint will reduce the score of the user as follows.
The time based score, TB, is calculated differently in marathon mode as well. “Total-Time-Interval” denotes the total time taken to solve the puzzle (at the end of the first, second, or third tries). TB is calculated as a function of: total number of mystery numbers in a puzzle (called “total=m×n,” where m and n are the dimensions of the puzzle.), the puzzle-complexity (as described above), and the Total-Time-Interval.
The time based score, TB is calculated as follows:
TB=D×C/t,
The final score of a marathon mode puzzle is calculated as follows:
The various processes, methods, and algorithms described herein may be embodied in various combinations of general-purpose and application-specific circuitry. The processes, methods, and algorithms described herein may be embodied in whole or in part by code modules executed by one or more processors of a computing system. The code modules may be stored on any type of non-transitory computer-readable storage medium, such as magnetic disk drives, optical disk drives, solid-state memory, random-access memory, read-only memory and so forth. Some or all of the code modules may be transferred between various memories and storage devices for various purposes, such as memory management by a computer operating system. In various embodiments, processes, code modules, and other elements may be distributed among multiple computing systems communicating via a computer network or other communications method. The results of the various processes, methods, and algorithms described herein may be stored in any type of non-transitory computer storage including volatile and non-volatile memory.
Aspects of the embodiments described herein may be used independently of one another, or combined in a variety of ways. All possible combinations and sub-combinations are intended to fall within the scope of the present disclosure. Various blocks or elements depicted in the figures may be added, removed, rearranged, or reconnected in various ways to form alternative embodiments. The embodiments described herein have been provided as examples, and are not intended to limit the scope of the present disclosure. Nothing in the description provided is intended to imply that any particular feature, characteristic, operation, step, block, or other element is required.
Conditional language such as “can,” “could,” “may,” “might,” “for example,” and so on is generally intended to convey that some embodiments include the recited element while other embodiments do not. Accordingly, unless specifically stated otherwise or required by context, such language is not intended to imply that the recited element is a mandatory component of any particular embodiment. The terms “comprising,” “having,” “including” and so forth do not exclude additional elements. When the term “or” is used to connect a list of elements, it is used inclusively to refer to one or more of the elements of the list.