Decudoku:Puzzles is a game (one of three in a series, actually) designed to let the public, whether anyone has a scientific background or not, help develop algorithms for quantum error correction. All you need to do is develop a winning strategy and be able to articulate how to do what you did.

Z10 gameplay is simple. Again, you don’t need to know any science, but you can get technical, if you wish, by reading the Decudoku: Gaming for science! blog.

The in-game tutorial explains it in more detail, but you are essentially annihilating groups of numbers that add up to multiples of 10. The first time I played it, it reminded me of a “magic” card trick that I used to perform on occasion.

If you don’t want to watch the video, here is the trick in a nutshell (I modify it slightly):

1. Remove the face cards; the remaining cards add up to a multiple of 10

2. Select a card, any card

3. I quickly scan the deck to find the missing card; what I am really doing is adding up their values

4. I only care about the least significant digit, so 7 + 5 = 2, not 12, and that simplifies the trick; with practice you should be able to add multiple cards at a time, such as seeing 9 and 1 together and knowing that adding 10 does not change the least significant digit

5. The value needed to bring my total up to a multiple of 10 is the value of your card; if my total ends with a 6, for example, I know your card must be a 4

6. It’s not necessary for the game, but so I don’t leave you hanging on the trick, I then say “I think I know what it is” and make one more very quick pass scanning only the 4’s, in this example, and the missing 4 is your exact card… magic!

The game screen, as you will see below, has two unknowns. However, my trick only works with one. Therefore, one unknown must be solved, but that’s quite simple.

With the card trick, the secret to two unknowns is to let you guess incorrectly for one of them. I have a running total, and revealing your errant guess gives me the last value I need. Only one unknown remains, I know its value, and then we make the quick second pass so I can discover its suit.

In the game, I only need to clear out whitespace around one of the unknowns. By annihilating multiples of 10 in as little as a 3×3 grid, any remaining values allow me to predict the value of the first unknown. Algorithmically, the Weasel Algorithm to do this is described in the paper Getting the public involved in Quantum Error Correction by Dr. James R. Wootton in a paper he submitted to arXiv on December 27, 2017.

Here are two examples of the Magic Weasel Algorithm, as I am calling it, in action:

This is the starting screen. I want to annihilate multiples of 10 around the unknown in the top left corner.

See all that whitespace around the unknown? The value must be 10. At this point, no matter how large the grid is, all you need is the sum of all remaining values. In this unusual example, the sum happens to be a multiple of 10, so I can predict that the second unknown is a 10.

After annihilating all the errors, the answer is displayed. As you can see, both unknowns were, in fact, 10s (which display as blanks, by the way).

Here is a more common example. That was my first time seeing two 10s as the result. Again, though, I want to clear out that top left corner.

See all that whitespace? The 4 tells me that I need a 6 to have a multiple of 10. The first unknown, therefore, has a value of 6. Adding up the remaining values gives me a least significant digit of 8, which means I need a 2 to have a multiple of 10. My prediction, therefore, is 2.

After performing all the annihilations, we can see that both unknown values were correctly determined.

I don’t know yet if this has any value for Dr. Wootton’s citizen science project, but playing the game is fun and performing the trick is fun, so hopefully everyone reading this will try one or both. If the Magic Weasel Algorithm isn’t helpful, maybe someone who reads this can contribute something better, and that will still be satisfying to me.

It is worth noting, in conclusion, that Dr. Wootton has another quantum error correction initiative that is well-suited to Qiskit aficionados. If you want a technical challenge, that project may interest you. But, that’s beyond the scope of this blog article.