Used SQLite database engine as the container for the
Zoo Animal Classification
In this guessing game, the app can successfully narrow down to one or two results within
10 rounds through a SQLite statement sent to the database. The player can also input the
animal that is not successfully guessed and its features to expand the data in the
As my earliest project, this game developed from a pure Python terminal app into a
website based on Python Flask. The motivation behind was to transform a game I always
in real life into an interactive computer app that has higher calculation capability.
The original game starts with a person thinking of an animal and another person tries to
guess the animal by asking different questions such as "does it have a tail".
I always have trouble guessing. The results show that through a SQLite query,
the more features you give, the faster the computer can locate the answer.
All birds have feathers and animals that have feathers must be birds. However,
the program does not know that unless you write the logic. The app first tends to
ask all the questions about the features in the database, which is a useless move and
reduces the success rate. My goal is to give the right answer within the fewest rounds,
so the app has to eliminate the invalid question each round. After I optimized the
query by creating a function to find valid questions after each 'ask',
(eg. if all animals have the same feature, the feature is not a valid feature to be
the app can locate the animal within 10 rounds.