### Games Grandpa Made

Nerds can’t whittle.

Everyone of a certain age knows that, if grandpa is locked down in quarantine, he’s supposed to whittle toys for the grandkids. I was quarantined for a few days awaiting results of a Covid test – negative, fortunately; but, if I tried whittling, I’d probably cut my thumb off. Instead I used MIT’s marvelous Scratch programing language for kids to make a couple of educational games.

In the first game, suppose a bunch of very orderly boys hid themselves in caves. Since they are orderly, Aaron hid in cave one and Xavier in cave one hundred. The rest are in alphabetical order by their first names. You are given the name of one boy to find but only seven guesses. Think that’s impossible or at least unlikely? Think again. If you follow the right technique, you will always win. You (or your grandkids) can try at https://scratch.mit.edu/projects/424820147/ or by clicking on the game below if you’re reading this in your browser.

Hint: divide the problem in half at each guess. 50 should always be your first guess to find the hidden boy. If the name of your quarry is alphabetically after the name of the boy in cave 50, your next guess should be 75. If the name of your quarry is alphabetically before the name of the boy in cave 50, your next guess should be 25.

Fellow nerds will recognize that this game and the one below are teaching a technique called binary search. Programmers use the technique all the time both to speed up algorithms and to find bugs. It is a lot faster to divide a problem in half and then in half again than to look at each possible solution. Binary search is used to find leaks in pipes, electrical outages, and now even in Covid testing.

The second game asks the player to find Computerbudkins. Grandson Jack is the artist behind Computerbugkin (seen at the beginning of this blog and the end of the game). I can’t draw any better than I can whittle.

Click the link https://scratch.mit.edu/projects/423727647/ to get to the game if you aren’t reading in your browser.

## Comments