My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Project Information
Members
Featured
Wiki pages

This program will guess which animal you are thinking of by asking yes/no questions. If it doesn't guess the animal you are thinking of then it will ask you for the animal and a yes/no question which will help it guess the animal in the future. The question should have an answer of "yes" for the animal in question.

It will store the questions and answers in an XML file. The data will be stored as a binary tree with each node storing a question and having a "yes" and a "no" fork. Answers will be stored on the "yes" leaf nodes.

The program will walk the tree, presenting the user with the question stored at each node. If a "yes" leaf node is reached then the user will be presented with the animal stored there and asked if it is the animal they are thinking of. If the answer is no or if a "no" leaf node has been reached then the user is asked what animal they were thinking of and the user is asked for a yes question which would distinguish their animal from other animals. A new question node is added in place of the "no" leaf node. A "yes" leaf node with the new animal and a "no" leaf node is added to the new question node.

Questions should be unique but answers are not required to be unique. Due to the nature of text input this requirement may be tough to implement and should be a goal rather than a hard requirement.

Powered by Google Project Hosting