## On Playing Zpordle

After Wordle appeared, a number of variants came out. One of the least popular may be Zpordle, or ℤp-ordle. I imagine it could be more popular, if people knew it did not require advanced mathematics. It still involves numbers, to which some people declare an allergy. Nonetheless, I think Zpordle can be explained in elementary-school terms, and that is what I shall try to do here.

Screenshot of the Zpordle game won on May 27, 2022

I hope I have got my numbers right. I am going to work with ten examples of successfully played games, cut and pasted from the Zpordle website; there, at least, the computations are automatically correct.

In playing the game, you are trying to guess a number between 0 and 1000 inclusive. With each guess, you are told how close you are. However, the closeness is not measured in the usual sense. If it were, you could win in two steps, as in the following imaginary example.

1. Guess: 0 Distance: 163.
2. Guess: 163 Distance: 0.

The usual distance between two numbers is what you have left after subtracting the smaller from the larger. Zpordle tells you the distance between your Guess and the answer, not in the usual sense, but in terms of how many times a number such as 2, 3, or 5 evenly divides the usual distance. For example, 3 evenly divides 108, three times, because

108/3 = 36,
36/3 = 12,
12/3 = 4,

but 3 does not evenly divide 4. With respect to 3, the numbers 2 and 110 are closer to one another than 28 and 100 are to one another, because, again, 3 evenly divides 110 − 2, or 108, three times, but 100 − 28, or 72, only twice. With respect to 2 though, 28 and 100 are closer, because 2 evenly divides 72 three times, but 108 only twice.

In Zpordle, you get ten Guesses to find the answer, and you can still lose. Usually you can win though, with the following strategy: Always guess the least number that the answer can possibly be.

It is possible to contrive a situation in which that strategy loses, but a different one wins. However, most of the time, you win, just by guessing any number that the answer can possibly be. It it just easier to guess the least possible answer. After each guess, a lot of possibilities are eliminated. The main challenge is to understand which ones are left.

Zpordle is not one of the “Adaptations and clones” currently mentioned in the Wikipedia article on Wordle. A brief search of the web turns up only one page with advice on how to play. The advice is in a video called “Zpordle: An Introduction and Strategies with Derektionary.” The video is more than an hour and a half long, and I haven’t had the patience to sit through it all. It starts right away with a definition of the “p-adic metric.”

Above I gave a partial description of the p-adic metric, especially when p = 3 and p = 2; but I am not going to use this terminology again. You need not know it. Something like that is true for Rubik’s cube. If you can solve the cube, then you have a practical sense for what is called group theory, even though you may never have heard of a group in the mathematical sense.

Here are my Zpordle results from May 18, 2022.

Today’s Primes: 2, 2, 2, 2, 2, 3, 3, 5, 5, 5

1. Prime: 2 Guess: 0 Norm: 1
2. Prime: 2 Guess: 1 Norm: 1/2
3. Prime: 2 Guess: 3 Norm: 1/8
4. Prime: 2 Guess: 11 Norm: 1/16
5. Prime: 2 Guess: 27 Norm: 1/32
6. Prime: 3 Guess: 59 Norm: 1
7. Prime: 3 Guess: 123 Norm: 1/3
8. Prime: 5 Guess: 315 Norm: 0

Ten steps were allowed, but I won in eight. To understand what I did, it may be better, first of all, to see the Guess first for each step, as follows.

Step Guess Prime Norm
1 0 2 1
2 1 2 1/2
3 3 2 1/8
4 11 2 1/16
5 27 2 1/32
6 59 3 1
7 123 3 1/3
8 315 5 0

At the beginning of the game, a number called Prime has been assigned to each step. At each new step, the Prime stays the same or goes up; it never goes down. When you make a Guess, you can usually ignore the Prime of the step you are on. After you make your Guess, you are given a fraction called a Norm, which depends on the Guess and the Prime of that step. You can use this Norm (and earlier ones) in your next Guess. An additional column in the table shows how I did that, in the example; do you see the pattern?

Step Guess Analysis Prime Norm
1 0 2 1
2 1 0 + 1 2 1/2
3 3 1 + 2 2 1/8
4 11 3 + 8 2 1/16
5 27 11 + 16 2 1/32
6 59 27 + 32 3 1
7 123 59 + 64 3 1/3
8 315 123 + 3×64 5 0

When the Prime switches from 2 to 3, the pattern becomes obscure. I shall explain it, step by step.

First, again, the Norm is an unusual measure of the distance between the Guess and the correct answer. It depends on the Prime. In the easiest case, when the Prime is 2, the following rules apply.

• Two numbers are as far apart as can be, if one of them is odd and the other one is even.
• Two odd numbers or even numbers are as far apart as can be, if half their difference is odd.
• Two numbers, half of whose difference is even, are as far apart as can be if a quarter of their difference is odd.

The greatest possible distance between numbers here is defined to be 1; the next greatest, 1/2; the next after that, 1/4; after that, 1/8; and so on. For example, the distance between 3 and 27 is 1/8, because 27 − 3 = 24, and this is a multiple of 8, but not of 16.

When the Prime is 3, the sequence of possible distances is 1, 1/3, 1/9, and so on. Now the distance between 3 and 27 is 1/3, because 24 is a multiple of 3, but not of 9.

Here is how I made each Guess above.

1. I always start with 0. You could start with 1 or any other number that is “between 0 and 1000,” including 1000; but 0 is easiest. Since the Prime for this step is 2, and the Norm is 1, and 0 is an even number, I can conclude that the answer is an odd number.

2. My next Guess is therefore 1, because this is the first odd number after 0. That the Norm with respect to 2 is 1/2 means the denominator, 2, goes into the difference between the answer and my Guess, but 4 does not. In other words, the difference is an even number, but just barely; it is not divisible by 4.

3. My third Guess, which is 3, is 2 more than my previous Guess. The Norm with respect to 2 is now 1/8, which means 8 goes into the difference between the answer and my Guess of 3, but 16 does not.

4. My fourth Guess is thus 3 + 8, or 11. The Norm of 1/16 means 16 goes into the difference between the answer and 11, but 32 does not.

5. Now 11 + 16 = 27, my new Guess. The norm being 1/32, 32 goes into the difference beween the answer and 27, but 64 does not. We now know that the answer is 27 plus a multiple of 32 by an odd number.

6. Therefore my sixth Guess is 27 + 32, or 59. Now there is a new Prime number, 3, and the Norm with respect to this is 1, which again is the worst possible. It means 59 does not differ from the answer by a multiple of 3. In other words, if we subtract 59 from the answer and divide by 3, there is a remainder is 1 or 2. Look at what we now know. From step 5, again:

• The answer is 27 plus a multiple of 32 by an odd number.
• Since 27 + 32 = 59, the answer must be 59 plus a multiple of 32 by an even number.
• Thus the answer is 59 plus a multiple of 64.

We now know additionally that the answer is not 59 plus a multiple of 3. However, 64 is not a multiple of 3. Thus the answer could be 59 + 64, which is 123.

7. My seventh Guess is thus 123. This differs from the answer by a multiple of 3, since the given Norm is now 1/3 with respect to 3. We already know the difference between the answer and 123 is a multiple of 64. Therefore the answer must be 123 plus a multiple of the least common multiple of 3 and 64, which is just their product, 192.

8. The least positive multiple of 192 being 192 itself, I now guess 123 + 192, or 315. This turns out to be correct: the Norm is 0.

After the seventh step, the answer had to be one of 315, 507, 699, and 891, each differing from the previous by 192. I had only three chances to test these four possibilities. However, 315 and 891 differ by a multiple of 9, because we get 891 by adding the same multiple of 3, namely 192, three times to 315. Thus, had the Norm at step 8 for 315 been

• 1/3, the answer would have had to be 507 or 699;

Those were the only possibilities. In this way, after the seventh step, I was bound to win by always guessing the least possible answer. I could have lost, even by always guessing some possible answer; for I could have guessed, in order, 507, 699, and 891.

In the examples given later, collected since May 18, the strategy of always guessing the least possible answer never lost. Nonetheless, it is possible to contrive a situation where, among possible answers, it is better not to guess the least:

Step Guess Analysis Prime Norm
1 0 2 1
2 1 0 + 1 2 1/2
3 3 1 + 2 2 1/8
4 11 3 + 8 3 1
5 27 11 + 16 5 1
6 43 27 + 16 5 1
7 75 43 + 2×16 5 1
8 91 75 + 16 5 1/5
9 331 91 + 3×5×16 7 1/7
10 891 331 + 7×5×16 7 0

The regular strategy is followed here until step 9. Note that, at step 7, 43 + 16 is not a possible answer, because of the information of step 4. Indeed, 43 +16 = 59, and this differs from 11 by 48, which is a multiple of 3, and 11 does not differ from the answer by a multiple of 3; therefore 59 cannot either, and in particular it cannot be the answer itself.

After step 8, the possible answers all differ by multiples of 5×16, the least common multiple of 5 and 16: this is 80. Some of the numbers we get by adding 80 repeatedly to 91 are excluded, again because of step 4: we know the answer does not leave a remainder of 2 when divided by 3. The possible answers then are

171, 251, 331, 411, 491, 571, 651, 731, 811, 891.

At step 9 then, before guessing, we should pay attention to the Prime. Of the possibilities above, only two of them, namely 331 and 891, differ by a multiple of 7, because they are seven places apart in the full list. The Prime now being 7, if we guess one of 331 and 891, its Norm will tell us whether one of them is the answer: it is not the answer, if the norm is 1, but it is if the norm is 1/7, not to mention 0. Guessing any other number on the list will tell us only whether it is the answer. With two guesses remaining, we have better odds by guessing 331 or 891 first.

Usually Zpordle does not present such challenges. Here are the remaining examples that I have collected.

May 19:

Today’s Primes: 2, 2, 3, 3, 5, 11, 13, 17, 23, 29

1. Prime: 2 Guess: 0 Norm: 1/4
2. Prime: 2 Guess: 4 Norm: 1/16
3. Prime: 3 Guess: 20 Norm: 1/9
4. Prime: 3 Guess: 308 Norm: 0

This could have been bad. When the primes keep going up, you cannot expect much information. Had the answer been 95, my strategy would have given the following.

Step Guess Analysis Prime Norm
1 0 2 1
2 1 0 + 1 2 1/2
3 3 1 + 2 3 1
4 7 3 + 4 3 1
5 11 7 + 4 5 1
6 23 11 + 3×4 11 1
7 35 23 + 3×4 13 1
8 47 35 + 3×4 17 1
9 59 47 + 3×4 23 1
10 83 59 + 2×3×4 29 1

After step 4, we know the answer differs from 11 by a multiple of 3 as well as of 4. After step 5, we know the answer cannot be 11 + 5×3×4, so we do not try this at step 10. That is all we know.

The game for May 20 turned out to be easy too:

Today’s Primes: 2, 2, 2, 2, 3, 3, 3, 5, 7, 11

1. Prime: 2 Guess: 0 Norm: 1
2. Prime: 2 Guess: 1 Norm: 1/2
3. Prime: 2 Guess: 3 Norm: 1/256
4. Prime: 2 Guess: 259 Norm: 0

May 21:

Today’s Primes: 2, 2, 2, 3, 3, 3, 5, 7, 11, 13

1. Prime: 2 Guess: 0 Norm: 1
2. Prime: 2 Guess: 1 Norm: 1/2
3. Prime: 2 Guess: 3 Norm: 1/32
4. Prime: 3 Guess: 35 Norm: 1
5. Prime: 3 Guess: 99 Norm: 1
6. Prime: 3 Guess: 163 Norm: 0

The Primes for May 22 were favorable, but still I needed nine steps:

Today’s Primes: 2, 2, 2, 2, 2, 3, 3, 3, 3, 5

1. Prime: 2 Guess: 0 Norm: 1
2. Prime: 2 Guess: 1 Norm: 1/4
3. Prime: 2 Guess: 5 Norm: 1/8
4. Prime: 2 Guess: 13 Norm: 1/16
5. Prime: 2 Guess: 29 Norm: 1/32
6. Prime: 3 Guess: 61 Norm: 1
7. Prime: 3 Guess: 125 Norm: 1/3
8. Prime: 3 Guess: 317 Norm: 1/3
9. Prime: 3 Guess: 509 Norm: 0

May 23:

Today’s Primes: 2, 2, 2, 2, 3, 5, 5, 13, 13, 17

1. Prime: 2 Guess: 0 Norm: 1/2
2. Prime: 2 Guess: 2 Norm: 1/16
3. Prime: 2 Guess: 18 Norm: 0

May 24:

Today’s Primes: 2, 2, 2, 2, 3, 5, 5, 7, 13, 23

1. Prime: 2 Guess: 0 Norm: 1
2. Prime: 2 Guess: 1 Norm: 1/4
3. Prime: 2 Guess: 5 Norm: 1/8
4. Prime: 2 Guess: 13 Norm: 1/32
5. Prime: 3 Guess: 45 Norm: 1
6. Prime: 5 Guess: 109 Norm: 1
7. Prime: 5 Guess: 173 Norm: 0

May 25:

Today’s Primes: 2, 2, 2, 2, 3, 3, 3, 7, 11, 11

1. Prime: 2 Guess: 0 Norm: 1/8
2. Prime: 2 Guess: 8 Norm: 1/128
3. Prime: 2 Guess: 136 Norm: 1/512
4. Prime: 2 Guess: 648 Norm: 0

May 26:

Today’s Primes: 2, 2, 2, 2, 3, 5, 5, 7, 19, 19

1. Prime: 2 Guess: 0 Norm: 1
2. Prime: 2 Guess: 1 Norm: 1/2
3. Prime: 2 Guess: 3 Norm: 1/16
4. Prime: 2 Guess: 19 Norm: 1/512
5. Prime: 3 Guess: 531 Norm: 0

This game from May 27 was interesting:

Today’s Primes: 2, 2, 3, 5, 5, 7, 7, 11, 13, 17

1. Prime: 2 Guess: 0 Norm: 1
2. Prime: 2 Guess: 1 Norm: 1/4
3. Prime: 3 Guess: 5 Norm: 1
4. Prime: 5 Guess: 13 Norm: 1/25
5. Prime: 5 Guess: 213 Norm: 1/25
6. Prime: 7 Guess: 613 Norm: 0

After step 4, we know the answer exceeds 13 by a multiple of 8 and 25, thus 200. At step 6, 413 is not a possibility, since it differs from 5, the Guess for step 3, by a multiple of 3. However, if we forgot to notice this and guessed 413 anyway, we still had enough guesses left to find the correct answer, which would be either 613 or 813.