1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
animals for Debian
----------------------
Animals uses a binary-tree database to store questions (which are like lisp
cons-cells) and animals (which are like lisp atoms).
I wrote this, it's the typical animals game where you think of an animal
which is searched in a binary tree where non-leaf nodes are yes-or-no
questions and leaf nodes are animals.
Typical:
----> "frog"
/ YES
"does it /
live in --<
the water?" \
\ NO
----> "moose"
can become
----> "frog"
/ YES
----> "Does it /
/ YES have legs?" --<
"does it / \
live in --< \ NO
the water?" \ ----> "dolphin"
\ NO
----> "moose"
in one play.
Traditionally, all such animals games I ever saw always had an initial database
as shown in the first tree above. My version is not traditional: there are NO
animals and NO questions at all in the initial database. Hence, my databases
tend to be more flexible.
Play it; you'll see what I mean.
-- Jim Lynch <jim@laney.edu>, Fri, 4 Jun 1999 12:14:53 -0700
|