Contents
Beyond AIML: Chatbots 102
 
 
Printer-Friendly VersionPrinter-Friendly Version
 
Latest News
spacer View All spacer
 
November 22, 2009
 
Video Game Watchdog National Institute On Media And The Family Shutting Down [11]
 
Modern Warfare 2 Infinity Ward's 'Most Successful PC Version' Yet [12]
 
New Tech, Design Details Of Project Natal To Emerge At Gamefest In February
spacer
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
November 22, 2009
 
Trion Redwood City
Sr. Evnironment Modeler
 
Trion Redwood City
Sr. Environment Artist
 
Sucker Punch Productions
3D Environment Artist
 
Sucker Punch Productions
Network Programmer
 
Sucker Punch Productions
Character Artist
 
Sucker Punch Productions
Texture Artist
 
Monolith Productions
Sr. Software Engineer, Engine - Monolith Productions - #113767
 
Sony Online Entertainment
Brand Manager
spacer
Latest Features
spacer View All spacer
 
November 22, 2009
 
arrow Upping The Craft: Susan O'Connor On Games Writing [6]
 
arrow Small Developers: Minimizing Risks in Large Productions - Part II [7]
 
arrow iPhone Piracy: The Inside Story [48]
 
arrow And Yet It Grows: Analyzing the Size and Growth of the European Game Market [5]
 
arrow NPD: Behind the Numbers, October 2009 [13]
 
arrow Reflecting On Uncharted 2: How They Did It [5]
 
arrow Sponsored Feature: Rasterization on Larrabee -- Adaptive Rasterization Helps Boost Efficiency
 
arrow Postmortem: Wadjet Eye's The Blackwell Convergence [2]
spacer
Latest Blogs
spacer View All     Post     RSS spacer
 
November 22, 2009
 
Time Fcuk [1]
 
Accepting the Inherent Value of Games
 
Planckogenesis, Part II: Song Structure & Gravy Train [1]
spacer
About
spacer News Director:
Leigh Alexander
Features Director:
Christian Nutt
Editor At Large:
Chris Remo
Advertising:
John 'Malik' Watson
Recruitment/Education:
Gina Gross
 
Features
  Beyond AIML: Chatbots 102
by Bruce Wilcox
4 comments
Share RSS
 
 
August 14, 2008 Article Start Previous Page 5 of 6 Next
 

The pattern ends at the balancing closing parenthetical, the remainder being the "template" area. The default behavior is to output the words, but you can add ^-commands and execute them as well. I allow the * wildcard on input and can use it on output, just as AIML does.

And if I really just want to duplicate an AIML pattern, I can use a quoted string to say test for these words in this order, i.e., ?: ( "Do you love this movie" ) , though they can start anywhere in the sentence.

Advertisement

If the user is outside this topic and types in What is the plot?, this topic will not react because the topic keywords do not show up in the sentence. But if you say What is the plot of Aliens? the keyword Aliens will allow the engine to examine inside this topic to see if the input can be matched.

Or, if you are already within this topic and the user types in What is the plot? or merely grunts plot? it can react with Alien creatures hatch inside humans.

Unlike AIML, the data and keyword list for the topic are stored in an SQL database, and so are not in memory until they are needed. And setting the topic is a responsibility of the engine, not the data.

There are a collection of other tricks, allowing you to check for words or not based on whether you are already in this topic. And aside from ~ words which are synonym collections, there are % words that have special parse or dictionary meanings (like %subject, %noun, or %tense=past).

I can also add pattern-match responses to output lines, to support followups. This replaces the that ability of AIML so that there is much less typing and much tighter visual integration. AIML would have written something like:

<pattern> What is your relationship to Bonnie? </pattern> <template> We don't see each other anymore. </template>

<pattern> Why not </pattern> <that> We don't see each other anymore</that>

<template> Because we hate each other now.</template>

<pattern> How did that happen </pattern> <that> Because we hate each other now </that>

<template> We had a big fight. </template>

<pattern> Since when </pattern> <that> We don't see each other anymore</that>

<template> Since last year.</template>

In the equivalent CHAT-L data below, once you have said you don't see each other anymore, the system will look at the next user input to see if either a: line is matched. The a is just a level marker. There is an a/b path shown and an a-only alternate path shown.

The point is that related continuations are visually tied to each other and you don't have to repeat yourself with a that specification (which if you made a typo would fail to match).

?: ( relationship AND Bonnie) We don't see each other anymore.
a: ( why THEN not ) Because we hate each other now.
b: (how THEN happen) We had a big fight.
a: ( Since THEN when ) Since last year.

 
Article Start Previous Page 5 of 6 Next
 
Comments

Mike Rozak
profile image
What you really need to do is include probabilities in AIML. For example, instead of the synonym "George Bush" -> "George W Bush", include a probability of the synoym being correct, such as 90%. Likewise, "George" -> "George W Bush" might have a 1% chance. You might also have "George" -> "George Washington" with a 2% chance.

Also associate a probability with the context. If a player asks, "Does George like flying in Airforce one?", this will be parsed to "Does George W Bushlike flying in Airforce one?" (1%) as well as "Does George Washington like flying in Airfoce one?" (2%). However, some context logic will know that George W Bush is associated with airforce one, and have a higher probability for the context (90% context probability for a modern president, with 1% probability for anyone else).

Then, a combination of sentence-parse probabilities and context probabilities (1% x 90% = 0.9% vs. 2% x 1% = 0.02%) can disambiguate the meaning of a statement. This is a common speech recognition trick. (So you might want to learn about speech recognition, Viterbi searches, and Hidden Markov Models.)

I've already implemented this and am using it in my game, http://www.CircumReality.com .

You might find its use of text-to-speech interesting too. You'll find that your AIML tags for responses are completely inadequate, and need to include facial emotions, spoken emotions, and nuanced prosody.

You'll also find that hand-coding millions of responses isn't worth the work. Most of what players want to ask is more procedural, such as "Where is the nearest merchant/guard/toilet?" and "Did you see where Frank went before the murder occured?"

Kyle laozhao
profile image
well the dialog very interesting
sehr interessant!

you will find more in the http://sglab.cn/blog

Meng Mao
profile image
@Mike Rozak

Yeah, but your game has dialog like this:
http://www.circumreality.com/ScreenPreRelease4b.jpg

Mike Rozak
profile image
@Meng Mao

If you send me E-mail, I'll go into detail... but basically, without a mostly menu-driven dialogue system, players don't know what to say and/or get into ye-olde "guess the verb" problems that Zork and other IF often has.


none
 
Comment:
 


Submit Comment