Trap is another variant of the “Guess my number” game that has been played on school yards since time began. In this game the player chooses 2 numbers and the one with the secret number responds with whether it is larger, smaller, or between the numbers guessed.
The optimal solution, like with high/low games, is a divide and conquer strategy. However with 2 numbers you should discover quickly that halves are not always the best solution. Played optimally it shouldn’t take more than 5 guesses. The game as it’s written gives you eight.
Trap is written by Joseph Larson.

Download and Play
Download eBook page
Download the source code