Presentation is loading. Please wait.

Presentation is loading. Please wait.

Adeena Mignogna Riot Software riotsw.com. What is Zoe? A pure AIML chatbot Without system, javascript tags 2 nd Place in 2011 Loebner Contest Tied for.

Similar presentations


Presentation on theme: "Adeena Mignogna Riot Software riotsw.com. What is Zoe? A pure AIML chatbot Without system, javascript tags 2 nd Place in 2011 Loebner Contest Tied for."— Presentation transcript:

1 Adeena Mignogna Riot Software riotsw.com

2 What is Zoe? A pure AIML chatbot Without system, javascript tags 2 nd Place in 2011 Loebner Contest Tied for 1 st place in the Junior Loebner Contest Zoe is NOT a clone All 64,122 categories were created from scratch 2 Orion (Program E) Lucy (Program E) Khloe (AIML only / Pandorabots) Zoe (AIML only / Pandorabots ) Copyright 2012 RIOT Software3/31/2012

3 A bot needs a purpose… A bot cant (initially!) be all things to everyone 3 General Conversation Q&A Other Guided Conversation General Knowledge Memory Relationships Problem Solving Open Conversation Topical Zoe Copyright 2012 RIOT Software3/31/2012

4 Zoes Development Steps Step 1: Let the conversation continue Step 2: The knowledge database Step 3: Arrays and list structures Step 4: The tokenizer Step 5: The starting point Step 6 through N: (not currently implemented) Part-of-speech tagging Probabilistic models 4 Problem Solving Copyright 2012 RIOT Software3/31/2012

5 Step 1: Let the conversation continue No magic here…! Use the common sentence and question starters to capture 95% of the inputs and respond in a way that allows the conversation to go on: WHAT * DO YOU * HOW * WHERE * are all random questions, designed to keep the conversation going Tell me more! Why? Are you sure about that? I dont know. Tell me more. If you say so. What do you want to talk about now? 5Copyright 2012 RIOT Software3/31/2012

6 This is Incomplete… JUDGE:lets talk about cloads ORION:Sure. Tell me something interesting about cloads JUDGE:cloads are not always white ORION:They are? Tell me more JUDGE:you can get big cloads and small cloads ORION:How do you know this? JUDGE:I am a genius ORION:A genius? Cool. Are you a person? JUDGE:of coarse Im a person ORION:Tell me more. 6 Taken from Orions 2008 Loebner Contest logs Copyright 2012 RIOT Software3/31/2012

7 Step 2: Knowledge Database Initial knowledge base designed to handle the Loebner Prize sample questions Which is larger, a grape or a grapefruit? What is faster, a plane or a train? NounIs ARelative Size Relative Speed … catan animal32 elephantan animal53 grapea fruit10 grapefruita fruit20 hammera tool20 … 7Copyright 2012 RIOT Software3/31/2012

8 Knowledge Base In Action Spreadsheet gets written to AIML categories with Excel macros NOUNKEYWORD cat ISA an animal NOUNKEYWORD cat SIZE 3 Which is larger, a cat or a hammer? Template looks for each noun If both nouns are found, get the size If both have a size registered, compare the size numbers for an answer 8Copyright 2012 RIOT Software3/31/2012

9 Step 3: Array/List Structure The problem: Needed a way to keep track of things thoughout the conversation, like say, a running list of topics discussed. What it is… Declare a variable such as: topiclist SEP cats SEP Add things to the list: SEP cats SEP work SEP sleep SEP Need categories to: Add element at the end Count elements Find a specific element (first, last, by index) 9Copyright 2012 RIOT Software3/31/2012

10 Using Lists as Memory Structure The problem: The user wants to tell the bot many facts about him/herself: My eyes are blue I have a brown car My house is large One idea: Prepare a variable for every item… but that is very inefficient Better idea: Use parallel lists Ex: Person says: My eyes are blue Keying off of My * are *, but can determine the noun and the adjective and store: SEP eyes SEP SEP blue SEP This can build, no matter what the user says he has: SEP eyes SEP car SEP house SEP SEP blue SEP brown SEP large SEP 10Copyright 2012 RIOT Software3/31/2012

11 In practice: Adeena: My eyes are blue Zoe:Ill try to remember that Adeena: I have a brown car Zoe: Ill try to remember that Adeena: How are you today? Zoe: Im fine. How are you? Adeena: What color are my eyes? Zoe: You told me that your eyes are blue. Adeena: What did I tell you about my car? Zoe: You told me that your car is brown. 11 But what if the human isnt so nice… he or she tries to use multiple sentences to tell Zoe something? Human: I have a car. It is brown. Copyright 2012 RIOT Software3/31/2012

12 So easy, ever a toddler understands… The story of Frankie and it Me: Look at our new Christmas tree! Frankie: Me: Its really neat, right? Frankie: Me and Frankie: Me: So, Frankie, do you like it? Frankie: 12Copyright 2012 RIOT Software3/31/2012

13 But Humans Arent Perfect! Person A: I talked with my mother last night. Person B: Thats nice. I hope she is well. Person A: She is. She just started jogging with her friend Irene. Irene even bought a new pedometer. Person B: Does she like it? She == ?? It == ?? 13Copyright 2012 RIOT Software3/31/2012

14 Combine Knowledge Database & Array Structure to Handle Pronouns Human wants to say: I have a brother. His name is John. And follow up with: What is the name of my brother? When confronted with a pronoun, search the previous sentence for any noun: HIS NAME IS * ((looks at each word in for a noun.)) ((noun has already been stored in userhas array. Get index of this array entry and tie this new knowledge to corresponding array.)) Notes: currently assumes that the noun referred to is in the previous input. If not, this wont work… but as we know from real conversation, humans can mess this up, too! Will work for any noun found: I have a rock. His name is Jim. 14Copyright 2012 RIOT Software3/31/2012

15 Step 4: The Tokenizer Use the multiple star feature Example: I HAVE A * * could match: I have a red car. = red = car I have a really fast car. = really = fast car But will not match: I have a car. How to use this to count words and even find a word by index in a sentence on following slides… 15Copyright 2012 RIOT Software3/31/2012

16 How many words in a sentence? WORDCOUNTER * 1 WORDCOUNTER * * 2 WORDCOUNTER * * * 3 WORDCOUNTER * * * * 4 WORDCOUNTER * * * * * 5 WORDCOUNTER * * * * * * 6 WORDCOUNTER * * * * * * * 7 16Copyright 2012 RIOT Software3/31/2012

17 Find the Nth word in a sentence FINDWORD 1 * FINDWORD 1 * * FINDWORD 2 * * FINDWORD 2 * * * FINDWORD 3 * * * FINDWORD 3 * * * * FINDWORD 4 * * * * FINDWORD 4 * * * * * 17Copyright 2012 RIOT Software3/31/2012

18 Find a Specific Word in a Sentence FINDAWORDINSENTENCE WORD * SENT * Find the length of the input sentence and initialize a counter to 1 For each word in the sentence, does it match what we seek? Looking for word kitten findword 1 Call the wordmatch: MATCHWORD kitten This polls categories like: MATCHWORD kitten kitten true This works as long as Zoe has the word in her database 18Copyright 2012 RIOT Software3/31/2012

19 Step 5: The Starting Point Everything you say to Zoe matches * All remaining categories (except for support categories) contains a keyword: EVALTHIS Example: Say Hi to Zoe Matches: * executes the following: EVALTHIS Which in this case is: EVALTHIS Hi What can be done in this starting category? 19Copyright 2012 RIOT Software3/31/2012

20 Things to do in the Starting Category Count the input Is the input a question or statement? Look for keywords in the input and decide whether or not to do something other than match the expected category i.e., look for a known topic keyword and eval based on that Keep track of certain words that are used repeatedly Evaluate the quality of the match before returning to the user Every category in Zoe with an EVALTHIS tag has a variable set: which can be set to: Atomic Partial weak Partial strong 20Copyright 2012 RIOT Software3/31/2012

21 Sample * Category * EVALTHIS ((do something else!!)) What is something else? Idea: look for words in the input that match say, a topic list, or known nouns then do another EVALTHIS on a different input and look for either atomic or partial strong matches Idea: Count number of partial weak matches in conversation and steer conversation in a different direction 21Copyright 2012 RIOT Software3/31/2012

22 Partial vs. Atomic Matching User input: I went clothes shopping. Likely not an atomic match: I WENT * How was it? Zoes template includes setting variable matchtype: How was it? partial weak Upon returning to the * category, Zoe can look for an alternate response just based on other words like clothes and shopping and possibly poll her knowledge database to say something more interesting than How was it? 22Copyright 2012 RIOT Software3/31/2012

23 Zoes Ultimate Goal? This progression of development is to get to something useful: Problem Solving. Lateral logic puzzles Simple example: Two grandmasters played five games of chess. Each won the same number of games and lost the same number of games. There were no draws in any of the games. Another example: There were two Americans waiting at the entrance to the British Museum. One of them was the father of the other ones son. How could this be accomplished in AIML? Without hardcoding known puzzles * father * other * son 23Copyright 2012 RIOT Software3/31/2012

24 Solving Lateral Logic Puzzles Adeena: START PUZZLE Zoe: Ok Adeena: Romeo and Juliet are dead. They are in a locked room on the 29th floor. There is a table in the room, a puddle and some broken glass. The wind is blowing the curtains of the only window in the room. Apart from the bodies of the recently deceased, there is nothing else in the room. How did Romeo and Juliet die? Adeena: END PUZZLE 24 Note: NOT currently implemented! This is a goal! Copyright 2012 RIOT Software3/31/2012

25 Executing Algorithm Example (1/2) START PUZZLE Set up a counter to count the number of sentences Set up or initialize arrays that will hold the information Set topic=laterallogicpuzzle * Every sentence until END PUZZLE matches this category Parse every sentence to determine nouns, adjectives, verbs, names, etc and store relevant information in an array/list Increment the sentence counter 25Copyright 2012 RIOT Software3/31/2012

26 Executing Algorithm Example (2/2) END PUZZLE Set the topic to something else. Maybe topic=QandAtime Now the user lets the bot ask questions by asking: Do you have any questions? Bot looks for gaps in its new knowledge comparing what it knows to what it should know What are Romeo and Juliet? Eventually, the bot has no more knowledge it needs to acquire and makes a guess at the solution… 26Copyright 2012 RIOT Software3/31/2012

27


Download ppt "Adeena Mignogna Riot Software riotsw.com. What is Zoe? A pure AIML chatbot Without system, javascript tags 2 nd Place in 2011 Loebner Contest Tied for."

Similar presentations


Ads by Google