The Best of Creative Computing Volume 1 (published 1976)

Page 198 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails

Learning, Innovation, and Animals (Sample run of ANIMAL computer program)

graphic of page

The next time through the program, if you said your animal was not a fish, the
computer would ask, "Does it have fur?" Gradually through this process the
computer builds up its repertoire of animals.

Notice that where the computer asked for a question to distinguish a gorilla
from a fish, we could have said:

DOES IT HAVE FINS? FOR A GORILLA THE ANSWER WOULD BE? NO. In other words,
animals can be distinguished with either yes or no questions.

EXERCISE 1
For each of the following pairs of animals, write two questions that will
distinguish between them. Write one question so that it can be answered "yes"
for the first animal in the pair; the other, "no".

DOG TIGER MOOSE HORSE PUMA RAM ELEPHANT CAMEL OCELOT HIPPOPOTAMUS LLAMA CHEETAH

EXERCISE 2
There are many possible ways to distinguish between two things. For each of the
following pairs of animals, write seven questions that will distinguish between
them.

OSTRICH PENGUIN GIRAFFE GORILLA

EXERCISE 3
Choose one or two "families" of animals. Go to an encyclopedia, wild life book,
or other source and find out all the members of the family and their
distinguishing characteristics. To start you off, here are the names of some of
the members of the cat family:

LION OCELOT TIGER CHEETAH PUMA PANTHER LEOPARD JAGUAR OUNCE CAT, SIAMESE COUGAR
CAT, PERSIAN LYNX

EXERCISE 4
Play ANIMAL on the computer. Teach it your family of animals from Exercise 2. If
members of the class have chosen different families of animals, when you are
finished, the computer should be able to identify just about any animal.

SAMPLE RUN OF ANIMAL
THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT...

ARE YOU THINKING OF AN ANIMAL? YES
DOES IT SWIM? YES
IS IT A FISH? NO
THE ANIMAL YOU WERE THINKING OF WAS A SEAL?

PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISHING A SEAL FROM A FISH.

DOES IT HAVE FLIPPERS?

FOR A SEAL THE ANSWER WOULD BE? YES
ARE YOU THINKING OF AN ANIMAL? YES
DOES IT SWIM? NO
IS IT A BIRD? NO
THE ANIMAL YOU WERE THINKING OF WAS A ELEPHANT?

PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A ELEPHANT FROM A BIRD
DOES IT HAVE A TRUNK?

FOR A ELEPHANT THE ANSWER WOULD BE? YES
ARE YOU THINKING OF AN ANIMAL? YES
DOES IT SWIM? NO
DOES IT HAVE A TRUNK? NO
DOES IT GO ARF? NO
DOES IT HAVE RETRACTIBLE CALWS? YES
IS IT A CAT? NO
THE ANIMAL YOU WERE THINKING OF WAS A TIGER?

PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A TIGER FROM A CAT
DOES IT LIVE IN THE JUNGLE?

FOR A TIGER THE ANSWER WOULD BE? YES
ARE YOU THINKING OF AN ANIMAL? YES
DOES IT SWIM? NO
DOES IT HAVE A TRUNK? NO
DOES IT GO ARF? NO
DOES IT HAVE RETRACTIBLE CLAWS? NO
IS IT A BIRD? NO
THE ANIMAL YOU WERE THINKING OF WAS A COW?

PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A COW FROM A BIRD
DOES IT GIVE MILK AND GO 'MOO'?

FOR A COW THE ANSWER WOULD BE? YES
DOES IT SWIM? NO
DOES IT HAVE A TRUNK? NO
DOES IT GO ARF? NO
DOES IT HAVE RETRACTIBLE CLAWS? NO
DOES IT GIVE MILK AND GO 'MOO'? NO
IS IT A BIRD? NO
THE ANIMAL YOU WERE THINKING OF WAS A GOAT?

PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A GOAT FROM A BIRD
DOES IT GIVE MILK AND EAT TIN CANS AND ALMOST ANYTHING ELSE?

FOR A GOAT THE ANSWER WOULD BE? YES
ARE YOU THINKING OF AN ANIMAL? YES
DOES IT SWIM? YES
DOES IT HAVE FLIPPERS? NO
IS IT A FISH? NO
THE ANIMAL YOU WERE THINKING OF WAS A WHALE?

PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A WHALE FROM A FISH
IS IT THE LARGEST KNOWN MAMMAL?

FOR A WHALE THE ANSWER WOULD BE? YES
ARE YOU THINKING OF AN ANIMAL? LIST
ANIMALS I ALREADY KNOW ARE:

SEAL ELEPHANT DOG CAT TIGER COW BIRD GOAT FISH WHALE

Versions of ANIMAL exist in BASIC and various assembly languages. The most
comprehensive BASIC version (by Art Luehrmann) is available for $2.00 for a
paper tape and 50d for the listing from Program Librarian, Kiewit Computation
Center, Dartmouth College, Hanover and NH 03755.

198

Page 198 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails