The box searching game in this section is split into two parts, the first corresponds to the linear search algorithm (also known as sequential search) and the second corresponds to binary search.
We recommend you play through the levels yourself for a while, or after reading this description. It is based on the CS Unplugged Battleships game which can be used as a classroom activity to enforce the lessons in this chapter (the hashing activity is not used for the box searching game).
To run this as a classroom activity get all the students to play each section of the game at the same time and then when they have all finished have a discussion about the results. After students have finished the first part ask them questions like "Did anyone find the target number on the first go?", "Did anyone only find it after checking every other box?", or find the average number of boxes students had to open to find the target number (this should be around 5 for the first level and around 10 for the second).
While they are playing the second part some may have trouble finding the correct algorithm to find the target number. If they are finding these levels confusing you can give them a hint like "Why don't you start by opening the box in the centre" and when they do ask them "What does the number you found tell you about all the numbers before it?" if the number is smaller than the one they are looking for, or "all the numbers after it?" if the number is bigger than the one they are looking for.
When students have finished ask them questions like "Were you able to find the target number even though you had fewer lives? What strategy did you use to find the target number?", we have found that many students will have ended up doing a binary search (or similar) without even knowing what a binary search is! Explaining these algorithms to students is likely to be easier now that they have seen them in action.