socialbot tutorial

socialbot tutorial - Confidential and Proprietary Lesson...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Confidential and Proprietary Lesson #1: Talking with Socialbot and simple programming Socialbot is a artificial intelligence software program. In natural everyday language, it can do various intelligent functions such as: hear your name, recall your name, add two numbers, report the date, engage in a knock-knock joke, give you its name, infer your gender from your name, and so on. To use the program, launch "Socialbot.exe". A sample interaction: input: hello bot: hello there, nice to meet you input: what is my name bot: I don't know your name input: it is Dave bot: hello Dave, nice to meet you. Thank you for telling me your name input: no problem, what is your name bot: my name is Truman input: what is 2 plus 5 bot: The sum of 2 and 5 is 7. input: what is a horse bot: horse is a mount creature. horse is a fantasy object. go on. input: what month is it bot: It is Oct input: and what is my age bot: I don't know your age. I'm sorry, either I didn't understand you or you didn't tell me your age input: it is 33 bot: If you are 33 years old then you are a adult. Thank you for telling me your age input: goodbye bot: goodbye and hope to talk to you again When you exit the program, Socialbot quits and creates a data file called "history.txt" which contains all it learned about you. When you run the program again later, it uses this data file to continue the relationship with you. Socialbot's programming is organized into "cases". Each case keys to specific grammatical patterns. A grammar pattern is a single word, a phrase or something more complex (as well see later). As you see in <pattern> below, each pattern is separated by a | (called a pipe symbol). If there is a match between the user's typed input and a grammar pattern then additional programming inside <code> is activated to remember, infer and/or reply to the user's input. A simple behavior: <case> <function> say hello </function> <pattern> hello|hi there|hey there|good morning|good evening|greetings </pattern> <code> $output = "hello there, nice to meet you"; $expression = "greeting"; </code> </case> This behaviors <function> is to say hello. If the user types hello or good morning or any of the other words in <pattern> then Socialbot outputs whats indicated in $output, which is hello there, nice to meet you. If the animation feature is active then the character will give the greeting gesture as indicated by $expression. An educated Socialbot has hundreds or thousands of cases. It tries each case from first to last. In theory, an input might trigger several outputs. But Socialbot only displays the first output triggered by your input and stops searching other cases....
View Full Document

Page1 / 7

socialbot tutorial - Confidential and Proprietary Lesson...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online