Puzzles - CalcuDoku for the iPad

I developed a web page that let you play CalcuDokus generated daily (it is no longer online). But I immediately realised that playing with it was not really fun. For one thing, it didn't provide enough feedback to help you solve difficult puzzles. It meant that, although I could solve all the puzzles my application generated, I took a snapshot of the puzzle, printed it, and solved it the old way: with pencil and paper (and rubber!)

At about that time, I bought an iPad.

Disappointingly I couldn't find any satisfactory CalcuDoku application. Clearly, the iPhone screen is too small for a 9x9 grid. Still, also among the applications specifically designed for the iPad, I could only find one that included a type of CalcuDoku among other types of puzzles. Moreover, I could already see from the snapshots of that application that the way in which the application supported the solution of the puzzles was not good enough.

If I wanted to play CalcuDoku on the iPad, I had to write the application myself. And that's what I did!

For quite a while you could buy CalcuDoku 1.0 for the iPad from the iTunes store and, after a while, I also created a free version with fewer puzzles and advertisements.

But maintaining the application was a pain, and the financial returns (perhaps also because I didn't spend a penny in advertising) poor. That's why I decided to cancel my Apple developer membership and forget about developing for the iPad.

Anyhow, here below is a snapshot of a partially solved puzzle.


Notice that each cell contains all possible candidates, and that the position of each candidate is fixed, so that a glance is sufficient to see whether a particular candidate is present. I also used different colours to highlight the size of the cages. The letters and numbers shown along two of the sides let you easily identify cells and cages. You will see in a moment how that will help you solve the puzzles.

The toolbar at the bottom is supposed to be self-explanatory, but I will spell it out for you here just to be on the safe side: "Puzzle" let's you choose one of the one hundred puzzles included in the package; "Get hint" suggests one of more candidates that you can remove, thereby taking you closer to the solution; "Reset puzzle" reverts the puzzle to its initial condition; "Reveal puzzle" shows you the solution; and "About" sends you to web pages of explanation (more about that in a moment).

Initially, I had thought I could provide a service, with daily puzzles. I also considered the possibility of generating new puzzles within the application. But in the end I decided to include one hundred puzzles and leave it at that. The problem with puzzles generated on the spot is that they are not graded because, in order to know how difficult a puzzle is, you need to solve it. Also, some of the generated puzzles are simply too difficult to solve analytically, and I didn't want to include puzzles that required guessing. Finally, due to the many restrictions imposed on the puzzle generator, it is not uncommon to obtain repeated puzzles, which is not nice. With dynamically generated puzzles, I would have had to provide mechanisms to save and delete puzzles, assign names to them, and other stuff like that.

Immediately above the grid, an [almost obvious] message tells you that to play the game you need to touch a cell. The following snapshot shows you what happens when you touch (for example) H2.

action menu

As you can see, you can touch (on the iPad, you don't "click", because you work with fingers on the touch screen, not with a mouse) one of the green buttons when you think you know what candidate solves the cell, or one of the blue buttons to remove one of the candidates. You can also touch the red big button to tell the application to solve the cell (in this case, H2) for you.

When you touch a cell, besides displaying the action menu, the application also lists below the toolbar the combinations that solve the cage to which the cell belongs, and below them, the valid permutations. For example, H2 belongs to cage H1 (I identify a cage by the coordinates of the cell that contains the result and operation codes; in this case: 28x). The only combination of digits that can solve this cage, given the candidates of the surrounding cages in the current status of the puzzle, is 741, with all six different orderings possible.

As an example of how you proceed to solve the puzzle, consider what follows. If you look at the snapshot of the whole puzzle, you will notice that cage 11+ in F2 only admits 7+4 as a solution, although it is not yet clear in which order. This means that no other cell of column 2 can possibly be solved with either a 4 or a 7. Therefore, H2 must contain a 1. In the action menu shown above, you could safely touch the green 1 and get closer to the solution.

Now, if you touch "Get hint", the message below the toolbar changes to the following:


In order to provide hints, I had implemented in the application the following five different solving strategies:

  1. If only one cell of a row or column contains a candidate, that candidate must solve its cell. This is the strategy of the hint shown in the snapshot.
  2. If two pairs with the same candidates are aligned, those candidates can be removed from the rest of the line. This is equivalent to the naked-pair strategy of Sudoku.
  3. Fake the solving of a cell with one of its candidates and check whether this results in at least one of the cells of the same row or column to remain without candidates. This identifies all cases in which a combination of cells in a cage makes impossible for those candidates to solve one or more cells of the shared row or column. In its simplest form, it is the strategy that lets you solve H2 with 1 in the example.
  4. If in a pair of lines a candidate appears in two exclusive pairs aligned along the same two cross lines, even when the two partners are different, the candidate cannot appear in any other cell of the two cross lines (I know: it isn't easy...) This is the strategy usually called X-wing in Sudoku.
  5. If two pairs of cells in the same line have mutually exclusive pairs of solutions, those solutions cannot appear anywhere else in the same line. For example, one pair might admit only 61 and 43 (e.g., for a 7+ cage), while the other pair might admit only 73 and 62 (e.g., for a 4- cage). This would mean that 6 and 3 cannot appear in any other cell of the same line.

You can solve the first ninety-five puzzles of the one hundred provided by repeatedly touching "Get hint" and "Go ahead and do it!" For the remaining five puzzles, you need to use more complex strategies, which I didn't implement in the application. But I explain how to solve those in pages linked to the "About" button.

To complete the description of the application, I only need to tell you what happens when you touch the button "Puzzles". Here it is:

puzzles button

The wheel on the left-hand side of the pop-up menu lets you select the puzzle you want to play. In the snapshot, it is positioned on puzzle 001.

The little window in the middle of the menu provides information on the puzzle. The most important item in there is "Level: 2 (3)". It means that in a scale of difficulty between 1 and 5, puzzle 001 was graded at level 2. The 3 between parentheses means that 001, on a scale of increasing difficulty, is in third position among all puzzles included in the application. As the version of the application I am using for this description only contains eight puzzles, this means that there are two easier and five more difficult puzzles.

The segmented control at the top of the menu selects the status of the puzzles you want to choose from. As you solve more and more puzzles, or perhaps start two puzzles and move between them, it will be useful to be able to see in the wheel only untried or started puzzles. The remaining control lets you select in which order you prefer to have the puzzles displayed in the wheel. The default is "Name", but you might like to touch "Difficulty" and see them ordered from the easiest to the most difficult (the number between parentheses in the description), so that you can start from the easiest one and progress to more difficult puzzles as you get more confident.

Now, if the game were still available, all you would need to do would be go to the iTune shop, search for CalcuDoku, and, for a dollar, start seriously exercising your brain! Unfortunately, as I said, this is no longer possible...

You can contact me at email address or send a BGG message to BloodyMe.

I like to collect little flags on BGG. Please visit my BloodyMe page there if you haven't already done it!