| Zoo Keeper Game: Learning animals expert Pascal, DOS, 1992 This program is mentioned here for its
"historical" personal significance, being the "first program" I've written. This was in 1992 (in the second highschool year). The program is a game, in which the computer, in the person of an "intelligent" zoo keeper, have to find a "lost" animal, by asking questions and receiving answers from the user. More precisely: the user is asked to think of an animal (any animal he likes), and to keep it in mind (not
to tell it to the computer). After this, the computer attempts to find which is the animal the user has in mind, by asking binary questions (as "Does the animal fly?"). If the program succeeds (really finds the animal), than it's very happy. If it doesn't (for ex, it gives a close answer, but misses, saying "lizard" in place of "iguana"), it asks the user for the right answer ("which is the animal you thought of?" -- iguana) and for a binary question
which would differentiate between the computer guess and the right answer ("Which is the difference between a lizard and an iguana?"). By this time, the "zoo keeper" knows a new animal, and the next time someone will chose "iguana", the computer will give the right answer. Download: The source code |