Course:CPSC312-2016-Project1-20Questions

From UBC Wiki

Authors: Sophia Chen, Alice Zhu, Dayoung (Dorothy) Min


What is the problem:

We will create a 20 question game (whether or not we can do 20 questions is still up in the air in terms of feasibility) where the user has a word from a finite domain specifically about mammals that the computer has to guess by asking yes or no questions. (We say finite, because of similar feasibility issues). We will loosely model our game from the natural language querying system. A player beats the computer if the computer is unable to guess correctly.


What is the something extra:

In our project, we will mimic a more dynamic approach to the natural language querying system, in that the user continues to query in order to get more responses from the computer. The computer's feedback directs the course of the questions that must be answered by the user. By the end of "n" number of questions, the computer should have enough information to make a guess. A list of the properties that describes and the chosen mammal is also displayed. (Example: herbivore(X), native_to_africa(X) , etc).

Example (Code is just a proof of concept, still subject to change):

1 ?- query(start, Response, Facts, Answer). Answer = [q1, is, it, alive] ;

2 ?- query(q1, yes, Facts, Answer). A = [alive], Answer = [q2a, is, it, a, mammal] ;

OR

2 ?- query(q1, no, Facts, Answer). A = [not_alive], Answer = [q2b, is, it, edible] ;


What did we learn from doing this?

We learned about the limitations of prolog and the tediousness that is involved since it is unable to store data. We have a better appreciation for arrays and data structures now. However we also learned that we can actually manage to create a "dynamic" program despite prolog's limitations. We learned that if the array is too long, prolog will automatically trail off, which sorta affected the effectiveness of our program at guessing. We also learned a wholleee lot about animals, particularly mammals as that is what our domain was restricted to. We have a deeper appreciation for biologists who do this for a living.