| ?- [askme]. {consulting /ug/u3/kly/ai_project/askme.pl...} {loading /igor/sicstus37/lib/sicstus37/library/db.ql...} {loading /igor/sicstus37/lib/sicstus37/library/fastrw.ql...} {loaded /igor/sicstus37/lib/sicstus37/library/fastrw.ql in module fastrw, 10 msec 17936 bytes} {loaded /igor/sicstus37/lib/sicstus37/library/db.ql in module db, 40 msec 81656 bytes} {loading /igor/sicstus37/lib/sicstus37/library/lists.ql...} {loaded /igor/sicstus37/lib/sicstus37/library/lists.ql in module lists, 10 msec 34808 bytes} {/ug/u3/kly/ai_project/askme.pl consulted, 60 msec 119712 bytes} yes | ?- begin. {consulting /ug/u3/kly/ai_project/game1.pl...} {/ug/u3/kly/ai_project/game1.pl consulted, 30 msec 13780 bytes} {consulting /ug/u3/kly/ai_project/game2.pl...} {loading /igor/sicstus37/lib/sicstus37/library/random.ql...} {loaded /igor/sicstus37/lib/sicstus37/library/random.ql in module random, 10 msec 19464 bytes} {loading /igor/sicstus37/lib/sicstus37/library/charsio.ql...} {loaded /igor/sicstus37/lib/sicstus37/library/charsio.ql in module charsio, 0 msec 20992 bytes} {/ug/u3/kly/ai_project/game2.pl consulted, 50 msec 54712 bytes} {consulting /ug/u3/kly/ai_project/statistics.pl...} {/ug/u3/kly/ai_project/statistics.pl consulted, 10 msec 5040 bytes} {consulting /ug/u3/kly/ai_project/generalizations.pl...} {/ug/u3/kly/ai_project/generalizations.pl consulted, 10 msec 14216 bytes} {consulting /ug/u3/kly/ai_project/displayKB.pl...} {/ug/u3/kly/ai_project/displayKB.pl consulted, 10 msec 1640 bytes} Welcome to ASK ME! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. I give up! What are you thinking of? A: cat. What is an attribute that describes it? A cat is: furry. Thank you, I didn't know that! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(cat,[furry],[],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(furry,3,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is the object you're thinking of a cat? (y/n): n. I give up! What are you thinking of? A: dog. What is an attribute that describes it? A dog is: friendly. Thank you, I didn't know that! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(cat,[furry],[],-1) -> object(dog,[friendly],[],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(furry,3,0) -> attribute(friendly,3,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is it furry? (y/n/d): y. Is it friendly? (y/n/d): d. Is the object you're thinking of a cat? (y/n): n. Is the object you're thinking of a dog? (y/n): n. I give up! What are you thinking of? A: giraffe. What is an attribute that describes it? A giraffe is: tall. Thank you, I didn't know that! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(cat,[furry],[],-2) -> object(dog,[friendly],[],-1) -> object(giraffe,[tall,furry],[],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(friendly,3,0) -> attribute(furry,3.0,0) -> attribute(tall,3,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is it friendly? (y/n/d): n. Is it furry? (y/n/d): n. I give up! What are you thinking of? A: sweater. What is an attribute that describes it? A sweater is: warm. Thank you, I didn't know that! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 3. There are 4 objects in my world. There are 4 attributes in my world. The highest-ranked objects are: sweater, giraffe The most useful (highest-ranked) attributes when trying to guess what you're thinking are: furry Please keep playing to add to my world! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(cat,[furry],[],-2) -> object(dog,[friendly],[],-1) -> object(giraffe,[tall,furry],[],0) -> object(sweater,[warm],[furry,friendly],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(tall,3,0) -> attribute(friendly,3.3333333333333335,0) -> attribute(furry,4.0,0) -> attribute(warm,3,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is it furry? (y/n/d): n. Is it friendly? (y/n/d): n. Is the object you're thinking of a sweater? (y/n): n. I give up! What are you thinking of? A: pencil. What is an attribute that describes it? A pencil is: useful. Thank you, I didn't know that! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(cat,[furry],[],-2) -> object(dog,[friendly],[],-1) -> object(giraffe,[tall,furry],[],0) -> object(sweater,[warm],[furry,friendly],-1) -> object(pencil,[useful],[friendly,furry],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(tall,3,0) -> attribute(warm,3,0) -> attribute(furry,4.5,0) -> attribute(friendly,3.8333333333333335,0) -> attribute(useful,3,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is it furry? (y/n/d): n. Is it friendly? (y/n/d): n. Is it warm? (y/n/d): n. Is the object you're thinking of a pencil? (y/n): n. I give up! What are you thinking of? A: iceberg. What is an attribute that describes it? A iceberg is: big. Thank you, I didn't know that! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(cat,[furry],[],-2) -> object(dog,[friendly],[],-1) -> object(giraffe,[tall,furry],[],0) -> object(sweater,[warm],[furry,friendly],-1) -> object(pencil,[useful],[friendly,furry],-1) -> object(iceberg,[big],[warm,friendly,furry],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(tall,3,0) -> attribute(useful,3,0) -> attribute(furry,4.9,0) -> attribute(friendly,4.166666666666667,0) -> attribute(warm,3.5,0) -> attribute(big,3,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is it furry? (y/n/d): n. Is it friendly? (y/n/d): n. Is it warm? (y/n/d): n. Is it useful? (y/n/d): y. Is it big? (y/n/d): n. Is the object you're thinking of a pencil? (y/n): y. M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(cat,[furry],[],-2) -> object(dog,[friendly],[],-1) -> object(giraffe,[tall,furry],[],0) -> object(sweater,[warm],[furry,friendly],-1) -> object(iceberg,[big],[warm,friendly,furry],0) -> object(pencil,[useful],[big,warm,friendly,furry],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(tall,3,0) -> attribute(furry,5.233333333333333,0) -> attribute(friendly,4.416666666666667,0) -> attribute(warm,3.8333333333333335,0) -> attribute(useful,3.0,0) -> attribute(big,3.5,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 2. I'm thinking of an object... I will give you clues, and you can try to guess it. Remember to follow each guess with a period. Here is your first clue: The object I am thinking about is friendly. What is your guess? It is a: cat. Sorry, it's not a cat. The object I am thinking of has 3 letters. What is your guess? It is a: dog. Congratulations, you guessed it in 2 tries! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(dog,[friendly],[],-1) -> object(giraffe,[tall,furry],[],0) -> object(sweater,[warm],[furry,friendly],-1) -> object(iceberg,[big],[warm,friendly,furry],0) -> object(pencil,[useful],[big,warm,friendly,furry],0) -> object(cat,[furry],[],-2) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(tall,3,0) -> attribute(furry,5.233333333333333,0) -> attribute(warm,3.8333333333333335,0) -> attribute(useful,3.0,0) -> attribute(big,3.5,0) -> attribute(friendly,4.416666666666667,1) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 2. I'm thinking of an object... I will give you clues, and you can try to guess it. Remember to follow each guess with a period. Here is your first clue: The object I am thinking about is not friendly. What is your guess? It is a: bat. Sorry, it's not a bat. The object I am thinking about is big. What is your guess? It is a: house. Sorry, it's not a house. The object I am thinking about is not warm. What is your guess? It is a: mountain. Sorry, it's not a mountain. The object I am thinking about is not furry. What is your guess? It is a: elephant. Sorry, it's not a elephant. The object I am thinking of has 7 letters. What is your guess? It is a: octopus. Sorry, it's not a octopus. The next letter is i What is your guess? It is a: iceberg. Congratulations, you guessed it in 6 tries! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(dog,[friendly],[],-1) -> object(giraffe,[tall,furry],[],0) -> object(sweater,[warm],[furry,friendly],-1) -> object(iceberg,[big],[warm,friendly,furry],0) -> object(pencil,[useful],[big,warm,friendly,furry],0) -> object(cat,[furry],[],-2) -> object(bat,[],[friendly],0) -> object(house,[big],[friendly],0) -> object(mountain,[big],[warm,friendly],0) -> object(elephant,[big],[furry,warm,friendly],0) -> object(octopus,[big],[furry,warm,friendly],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(tall,3,0) -> attribute(useful,3.0,0) -> attribute(furry,5.233333333333333,2) -> attribute(warm,3.8333333333333335,3) -> attribute(big,3.5,4) -> attribute(friendly,4.416666666666667,6) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is it furry? (y/n/d): y. Is it friendly? (y/n/d): n. Is it warm? (y/n/d): d. Is it big? (y/n/d): y. Is it tall? (y/n/d): y. Is the object you're thinking of a giraffe? (y/n): n. Is the object you're thinking of a house? (y/n): n. Is the object you're thinking of a mountain? (y/n): n. Is the object you're thinking of a bat? (y/n): n. Is the object you're thinking of a cat? (y/n): n. I give up! What are you thinking of? A: bear. What is an attribute that describes it? A bear is: 'a mammal'. Thank you, I didn't know that! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(dog,[friendly],[],-1) -> object(sweater,[warm],[furry,friendly],-1) -> object(iceberg,[big],[warm,friendly,furry],0) -> object(pencil,[useful],[big,warm,friendly,furry],0) -> object(elephant,[big],[furry,warm,friendly],0) -> object(octopus,[big],[furry,warm,friendly],0) -> object(giraffe,[tall,furry],[],-1) -> object(house,[big],[friendly],-1) -> object(mountain,[big],[warm,friendly],-1) -> object(bat,[],[friendly],-1) -> object(cat,[furry],[],-3) -> object(bear,[a mammal,tall,big,furry],[friendly],0) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(useful,3.0,0) -> attribute(warm,3.8333333333333335,3) -> attribute(furry,5.6878787878787875,2) -> attribute(friendly,4.583333333333334,6) -> attribute(big,3.5,4) -> attribute(tall,3.0,0) -> attribute(a mammal,3,0) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 1. Think of an object, and I will try to guess it! I will ask you questions about it. Please let me know if the answer is Yes (y), No (n), or that you don't know (d). Remember to follow all answers with a period! Are you ready? (enter 'y'): y. Is it furry? (y/n/d): n. Is it friendly? (y/n/d): n. Is it warm? (y/n/d): n. Is it big? (y/n/d): n. Is the object you're thinking of a pencil? (y/n): y. M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 5. Objects consist of the object name, the list of positive attributes, the list of negative attributes, and the object's rank. Objects: -> object(dog,[friendly],[],-1) -> object(sweater,[warm],[furry,friendly],-1) -> object(iceberg,[big],[warm,friendly,furry],0) -> object(elephant,[big],[furry,warm,friendly],0) -> object(octopus,[big],[furry,warm,friendly],0) -> object(giraffe,[tall,furry],[],-1) -> object(house,[big],[friendly],-1) -> object(mountain,[big],[warm,friendly],-1) -> object(bat,[],[friendly],-1) -> object(cat,[furry],[],-3) -> object(bear,[a mammal,tall,big,furry],[friendly],0) -> object(pencil,[useful],[big,warm,friendly,furry],1) done! Attributes consist of the attribute name, its rank in Game 1, and its rank in Game 2. Attributes: -> attribute(useful,3.0,0) -> attribute(tall,3.0,0) -> attribute(a mammal,3,0) -> attribute(furry,5.9378787878787875,2) -> attribute(friendly,4.694444444444445,6) -> attribute(warm,3.9583333333333335,3) -> attribute(big,4.214285714285714,4) done! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 3. There are 12 objects in my world. There are 7 attributes in my world. The highest-ranked objects are: pencil The most useful (highest-ranked) attributes when trying to guess what you're thinking are: furry Please keep playing to add to my world! M a i n M e n u 1. Play Game 1: I try to guess what you're thinking of 2. Play Game 2: You try to guess what I'm thinking of 3. Statistics: See what's true about my world 4. Generalizations 5. View the current state of my knowledge base 0. Exit Please enter the number of your choice: 0. yes