3D TREASURE HUNT: This differs from the original 2D treasure hunt because there are more axes for you to focus on. The main strategy is to start from (0, 0, 0), because it is the optimal way for you to find the treasure in less than 5 guesses.
For example, if you guess (0, 0, 0) and it says it is 17 steps away, after finding two of the axes and the distance, you can immediately find the treasure because there is no “negative axis”. Simply input the number shown on the “steps away” table in your previous guess into the final axis to find the treasure.
Assume you guessed (0, 0, 0) and the answer shows (x) steps away. Then we need to focus on each of the axes one by one. I highly recommend going for the x-axis, then the y-axis, and finally the z-axis. On the second attempt, I guess (9, 0, 0) and tell from how many steps away it is to get the x-coordinate of the treasure.
- If it displays x+9 steps, then the x-coordinate is 0.
- If it displays x+7 steps, then it is 1.
- x+5 steps: 2
- x+3 steps: 3
- x+1 steps: 4
- x-1 steps: 5
- x-3 steps: 6
- x-5 steps: 7
- x-7 steps: 8
- x-9 steps: 9.
This procedure works because you can set up an equation to solve for x. You can add x (distance from 0) with the number on the “steps away” column (this depends on the scenario you are handling – subtract the new x from the old x and add x for the term). You have to set the value on the right to 9 because that is what you guessed. Fascinatingly, you will not get an even difference because if you plug it in, you will get a decimal number, which is not allowed in the question. In this way you are able to get the exact x-value.
Repeat this procedure for the y-axis. Once both x and y coordinates are found, the z-axis is guaranteed to be the number shown on the “steps away” column on your bottommost guess. Have a go with this strategy yourself to see if you can find it in at most 4 guesses.
I tried several other strategies, such as going for (5, 5, 5), but I realized they quickly backfired because I had to check both sides on the number line. This can take up to 7 attempts, unlike the (0, 0, 0) method which considers the only side, allowing me to get it in 4 tries.
Example:
(0, 0, 0) – 12 steps away
(9, 0, 0) – 17 steps away
We let x take over. The x-coordinate can be solved by using the equation x+x+5=9. Solving gives us x=2, and count the steps. In this case, it is 10 steps away.
(2, 9, 0) – 7 steps away
Based on the same logic, y+y-3=9. We have y=6. This is 4 steps away.
Hence, the treasure is at (2, 6, 4). It is always possible with just 4 guesses with this simple trick.