Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 10, NO. 10 / OCTOBER 1984 / PAGE 147

Logo type; turtle target practice. James Muller.

There is a certain bit of magic in the Logo language that makes learning a lot of fun. Mathematics, geometry, and other subjects are no longer boring school objects. On the computer screen, they become brain-teasers and other enjoyable discoveries that can help young people learn to think. The value of this learning fun was dramatically demonstrated the summer the Young People's Logo Association was formed.

For several hours each week, a group of young people ranging in age from 6 to 13, met in a Richardson, TX, garage to explore Logo and the computer. Fourth of July fireworks, lunar lander games, and some intriguing graphics were the visible results of these sessions.

But what were the kids learning?

As a very simple experiment, the kids were asked to draw some random angles on blank paper: "If the turtle drew a line on the screen, made 147 turtle turns, and then drew another line, what would the screen look like? What about 217 turns? 313 turns?"

These same questions were then posed to circuit designers, who acknowledged that the kids were able to visualize the angles more accurately than they were. As engineers, they relied on their tools rather than their imaginations to measure angles and distances. However, the engineers did claim credit for drawing straighter lines.

One of the ways to help children learn to visualize angles and distances is through "target practice." A simple way to start is to place stickers on the screen and then see who can move the turtle to the sticker in the fewest moves. A slightly more complex version of the same exercise is to play "turtle baseball." Place four stickers on the screen, one of which is home plate. Then see who can move around the bases with the fewest mistakes. You can make the game as simple or as complex as you choose. The important thing is to practice visualizing angles and distances on the screen.

Atari Logo offers some nice features for making an enjoyable game out of angle and distance practice. Where most other versions have one triangular turtle, Atari Logo has four turtles, each of which can act independently. The language also has collision detection to test if two turtles are touching. In the target practice game shown in Listing 1, one of the turtles is randomly placed on the screen. Then, by typing the word, ZAP, followed by an angle and a distance, a second turtle is "zapped" at the target. If the two touch, the screen flashes and a message appears at the bottom of the screen.

The T procedure sets up the game. RANDOM will not select a negative number. Thus, the statement is written that IF the random number is 0, the computer will select a number between 0 and 110. If not, it will subtract a random number from 0. The result will provide the numbers required for the procedure ANGLE :NUM. The target turtle will turn right the number of degrees selected, and the procedure will then pick a random distance. To keep it interesting the distance ranges from 50 to 110.

Once the target turtle appears on the screen, the player must type in ZAP followed by an angle and a distance. The first turtle then turns right and moves the distance selected. The PX represents Penreverse. In this mode, the turtle draws a line where none exists. However, when asked to move back, it erases any line previously drawn. The computer then tests: IF turtles 1 and 2 are NOT in a CONDITION of TOUCHING, then the first will wait 20, move BACK the distance entered, and SETHeading to 0 again.

WHEN turtles 1 and 2 are TOUCHING, control turns over to the CHEERS procedure. The background flashes, and "Congratulations" appears at the bottom of the screen.

Games like this can, of course, be written for any version of Logo. Scoring and multiple-player options can add to the appeal. The important thing is to get the players to think about what they are doing, to think beyond the limits of the computer keyboard and screen. There are few things as exciting as watching a child's imagination in action. However, there is a marvelous quotation of unknown origin which helps put the value of imaginative play into perspective: "He who has imagination without learning has wings but no feet."

The author must have been thinking of Logo.