The Ruark Kids

Guessing game

| 2 Comments

On the way home from camp today, Siena told me she wanted to play a game, presumably one she had learned at camp that day. It was a very insightful exercise and a good demonstration into her thought processes, some of the concepts she’s still working on, and also evidence of what she finds easy and what is still difficult.

Siena: I’m thinking of a number between 1 and 30.

I allow a few seconds of silence to pass hoping she would follow up with what she wants me to do. She does not, so I say,

Me: And do you want me to try to guess what it is?

Siena: Yes.

Me: And when I guess, you’ll tell me whether I’m too low or too high?

Siena: Yes.

Me: Ok. 15.

Siena: Too low.

Me: 22.

Siena: Too low.

Me: 26.

Siena: Too low.

Me: 28.

Siena: Too low.

Me: 29.

Siena: Too low.

Me: 30.

Siena: Too low.

Me: We can’t go any higher than 30? What was your number?

Siena: It was 2.

Ok, first problem, she wasn’t sure what was meant by too low and too high. I explain that “too low” meant the guess was lower than her number and so I had to guess higher, which is why I kept going up and up.

We do another round of 1-to-30, and I get the number after a few guesses. At this point, Siena says she wants to tell me not whether the guess is too low or too high but whether it is cold or hot. I suspect this is how they played it at camp. What’s interesting about this approach is that you don’t know from the first guess, if placed in the middle of the range like a normal binary search would do whether the second guess should be higher or lower, but you do get a sense of how far you are. Interestingly, you also can’t easily tell if you’ve overshot the number on most guesses.

Siena: I’m thinking of a number between 20 and 50.

Me: 35.

Siena: Cold, but kind of warm.

Me: 42.

Siena: Warm.

Me: (I decide to just see where 50 puts us): 50

Siena: Hot. (I conclude it must be around 48, if 50 is hot but 42 is only warm).

Me: 47.

Siena: Warmish but not hot. (Must be 49 since 47 would be hotter than 50 if it were 48).

Me: 49.

Siena: Warmer but not hot.

Me: Siena, this doesn’t make sense. 50 is hotter than 49 and 47, but it can only be 48, which is closer to 47 and 49.

Siena: (Pauses for a moment) Oooohhh, my number was 52.

Me: That’s not even in the range of 20 to 50! When you give me a range, you need to be *inside* the range, not beyond it!

Now it was my turn to pick the number and have her guess. Siena made me start with a small range of 1-20, as she found it easier picking numbers when there were fewer to choose from. After she got the hang of 1-20, I said,

Me: Now I’m thinking of a number between 1 and 50.

Siena: No, that’s too many numbers. Go with 1 to 30.

Me: No you can do it, just pick a number between 1 and 50 and I’ll tell you if you are low or high.

Siena: (Long pause, several ummms).

Me: Just pick a number.

Siena: I don’t know what would be a good number to guess.

So I explained that aiming for the middle of the range is a good starting point as it carves out half the numbers each time. After another lengthy pause, she said,

Siena: 19.

Me: Too low.

Siena: 40.

Me: That’s it!

Siena: What?! It only took me two guesses to get 40. Hey that’s how old you are! I could’ve got it on the first guess.

Next time I plan to introduce the formal notion of binary search, Big-O notation, and log n run time.

 

2 Comments

Leave a Reply

Required fields are marked *.