Wednesday, December 09, 2009

Pandorabots Training Videos

Pandorabots has updated its collection of training videos. Here is an outline of the videos available today. If you are new to Pandorabots, you may want to consider going through the list in order. Experienced botmasters may find more advanced topics further down the outline.


Demos and Origins
Introduction to Pandorabots
Bot Content
Predicates and Properties
Custom HTML
Favorites

In addition to our own videos, the Pandorabots Youtube aimlinstructor channel includes links to some great fan videos and demos. Here is a sample:

Friday, November 06, 2009

Two Bots Talking













We've talked about it for years. Now it is finally possible. We can put together two different chat bot personalities and have them talk to each other. What happens? Find out in this exclusive offer to subscribe to Two Bots Talking.

Fake Captain Kirk, created by Pandorabots SpellBinder, meets the original A.L.I.C.E. bot in a match of robot wits. This application integrates Pandorabots chat bots with talking animated avatars from Oddcast, Inc. This is an early taste of the kind of synthetic drama that is possible with multiple A.I. bots interacting.

Enjoy up to 24 hours of Two Bots Talking over a one month period for only $9.99.

Or through our special offer, subscribe to Two Bots Talking for a full year for only $99.99, and get up to 40,000 chat interactions. That's more than 4 weeks of continuous entertainment, available for you to access at any time during the year.

While the bots are talking with each, you can interact with them too. You can say anything you want to either bot, to start the conversation, or get it moving in a different direction.

Enjoy watching and listening as the Two Bots Talking conversation goes off in different and unexpected directions. You never know what they might say. As the bots chat, drama and comedy emerges. It's more than TV!

Click here to access Two Bots Talking.



Wednesday, October 07, 2009

Pandorabots Announces the Availability of Bespoke Pandorabots SpellBinder Service



Oakland, CA - 07 October 2009: Pandorabots, Inc. is announcing a significant advance in the state of the art of chat bots based on artificial intelligence.

Previously the construction of believable characters based on artificial intelligence required hand-crafting thousands of sentences - aimed at creating a high-quality chat bot brain. A few creative people took up the challenge and authored some of the best chat bots around today. Until now, the tedious and expensive process of developing and training a high-quality believable chat bot remained a significant hurdle to widespread chat bot adoption.

The new, patent-pending Pandorabots SpellBinderTM technology reduces chat bot creation time enormously. Pandorabots SpellBinder automatically learns from conversational transcripts. Nothing else on the market today can create high-quality and unique chat bot characters as quickly and efficiently as Pandorabots SpellBinder (Synthetic PErsonality Language Learning for Bot Intelligence from Natural Dialog Example Recordings).

Transcripts are available from a wide variety of sources. Scripts of TV shows and movies contain many characters. Stored Instant Messenger logs are a source of dialog. Support and help desk services retain transcripts to improve service offerings. Even unstructured, live interviews with people who want to digitize their personalities provide a source of bot training data.

In a recent review of the technology, the non-profit ALICE A.I. Foundation reported that Pandorabots SpellBinder scanned publicly available fan-compiled transcripts of 72 episodes of the original Star Trek TV series. In those 72 episodes, Captain Kirk has about 9000 lines of dialog. Pandorabots SpellBinder read these lines and created a Captain Kirk chat bot with about 2000 categories and 6000 responses (a category is the basic unit of knowledge). Pandorabots SpellBinder also created a chat bot representations of Mr. Spock and Dr. McCoy. The A.I. Foundation has published these parody characters through this link: http://alicebot.org/kirk.

Generally, the more dialog samples available in the transcripts, the higher the fidelity of the resulting chat bot. In their review, the A.I. Foundation also used Pandorabots SpellBinder to scan the transcripts of the NASA Apollo 11 mission, involving conversations with Neil Armstrong and Buzz Aldin. Pandorabots SpellBinder was used to create chat bots representing Neil and Buzz. As the number of dialog samples was only about 1500 for each character, Pandorabots SpellBinder was able to create chat bots with about 1000 categories, around the minimum needed for a believable character.

Pandorabots announced the immediate availability of a bespoke chat bot development service based on Pandorabots SpellBinder. For as long as anyone can remember, Companies have been sponsoring cartoons and in return, cartoons have sponsored Companies. With chat bots, Companies may use this service to create branding and marketing opportunities which interact with people on an individual basis. Non-profit and Government entities may use this service to bring interactive capabilities to existing characters (examples include Smokey The Bear, Mickey Mouse. Homer Simpson, Bambi, Hello Kitty, Lica). Politicians and celebrities may also use this service as a means of expanding their visibility.

Additional information about Pandorabots SpellBinder service is available at: http://pandorabots.com/pandora/pics/spellbinder/desc.html

For more details about Pandorabots : http://www.pandorabots.com

Contact Information:

Dr. Richard Wallace
Chief Science Officer
rich@pandorabots.com
+1 609-379-2552

Tuesday, September 08, 2009

Updates on Loebner Prize 2009 Results

Loebner Prize winner David Levy has no plans to reveal how his program Do-Much-More works, at least for the next year or two.

Here
are some blogged comments about the InterSpeech conference, including some remarks by one of the judges, and the usual lament about "relative absence of progress in developing general purpose conversational agents".

Kris Schnee has published a version of the transcripts. Making readable transcripts is made complicated by the Loebner Prize protocol, which works like a keylogger, storing every individual character typed along with a time stamp. The judges and programs/confederates are allowed to type simultaneously, so these interleaved conversations have to be unraveled into transcript form.

Contest sponsor Hugh Loebner has increased the prize money for winning the Bronze medal to $5000 for 2010. The year 2010 marks the 20th annual Loebner contest. Loebner also announced that the contest will be held in the U.S. , and that "beloved Loebner Prize Protocol will be used for at least the next 5 years. This will remove the onus for contestants of having to change the I/O routines every year. I think that after 5 years we can re-examine the communications protocol in light possible advances in technology."

Update: Hugh Loebner has pubished a results page for the 2009 contest here.

Sunday, September 06, 2009

David Levy wins Loebner 2009


Congratulations to David Levy, winner of the Loebner Prize 2009 for "most human computer". The contest was held September 6, 2009 in Brighton, UK. This year the contest drew only three finalists. In addition to Mr. Levy's program, the competitors included previous Loebner winner Rollo Carpenter and newcomer Mohan Embar. (Update: David Levy's program is called Do-Much-More and it is not yet available online).

As has been the case in previous years, no program fooled the judges by passing as a human. Instead, a bronze medal and cash prize are awarded to the program that comes closest to chatting like a human. The programs were instead scored based on rank. The results were as follows:

First Place David Levy - Rank 4.5
Second Place Rollo Carpenter - Rank 5.0
Third Place Mohan Embar - Rank 5.5

As you can see, the scores were very close.

David Levy is an international chess master, whose program Converse previously won the Loebner prize in 1997. He becomes the third two-time Loebner prize winner. Joseph Weintraub's PC Therapist won the bronze medal four times, and A.L.I.C.E. won three times.

Thursday, July 09, 2009

Pandorabots Videos

We've begun producing a series of Pandorabots instructional videos. There are three available right now: Creating an Account and Creating a Bot, No Initial Content, and Creating a Mobile Application using Custom HTML.

The videos have been posted on Youtube. The first one is a basic introduction to accounts and bot creation on Pandorabots.




The second video is a bit longer, going into detail about creating a unique bot personality with no initial content. The same technique can be used to create a bot in a foreign language.




Our third video is all about Custom HTML. We show how to change the appearance of your bot's web page, and in particular, modify it to look good on a mobile browser.

Tuesday, July 07, 2009

AIML Wiki


The ALICE A.I. Foundation is announcing the opening of a new Wiki for sharing AIML files at
http://alicebot.wikidot.com. Many people have kindly contributed open source AIML files over the years, and we now have a place to collect all of them. The community has also suggested many editorial changes to the existing body of ALICE AIML and they will now have the opportunity to edit the shared files. For example, people who have contributed to an ALICE clone with a corporate sales-bot personality, now have a place share their files in a common community location.

We are proceeding with this project in baby steps. About one year ago we invited a small number of AIML botmasters to join and contribute to the Wiki, to see how the project would go and what kind of problems we might have. As you will see, the free Wiki software at wikidot has some problems with respect to AIML files. We plan to migrate to better Wiki software at some point in the future.

The Wiki is already populated with AIML from the AAA set, foreign language AIML, and contributions from Square-Bear and Peter Lafferty. If it works, it will become a large repository of "the latest and greatest" AIML available. Please give it a try and give us your feedback.

Thursday, July 02, 2009

Facebook Bot Groups


John Green has created a new exciting fan page (with a great logo) for chatbot fans and beginners. He has created this to help pepole with AIML, creating their own robot and letting people know about chatbots. The page also offers news, recommendeds chatbots, and provides chatbot support.

It contains AIML scripts useful tips and sources.

John says, “I would like to make AI's go further then they ever could before.”
Click here to view the Chatbot fan page: http://www.facebook.com/pages/Chatbots/63267344606

We've also created groups on Facebook for Pandorabots:
http://www.facebook.com/home.php?ref=home#/group.php?gid=59551538697
Chatbots:
http://www.facebook.com/home.php?ref=home#/group.php?gid=52874244674
Loebner Prize:
http://www.facebook.com/home.php?ref=home#/group.php?gid=22803394990

and Alicebot, A.L.I.C.E. and AIML:
http://www.facebook.com/home.php?ref=home#/group.php?gid=93555370620
If you are member of Facebook, please join us there for AIML social networking!





Wednesday, July 01, 2009

Pandorabots weclomes RunABot users

One of the long-running AIML chat bot hosting services, RunABot, has announced that it is no longer functioning. Some RunABot users have contacted us about migrating to Pandorabots. We welcome the RunABot community to the world of Pandorabots AIML.

There are three big concerns to RunABot users:
1. Converting RunABot AIML to standard AIML.
2. Migrating to Pandorabots.
3. AOL Instant Messenger (AIM) interface

Converting RunABot AIML to Pandorabots standard AIML



RunABot developed its own branch of AIML that differs slightly from the common standard.
Here we explain some of the steps you can follow to convert RunABot AIML to standard AIML.

RunABot has a different interpretation of the wildcard *.

<category> <pattern>* I AM FINE</pattern>
<template>Good then!</template> </category>

The * matches 0 or more words, instead of 1 or more words. In other words, this category matches "I am fine" by itself. On RAB, that would match "I am fine" as well as "blah blah I am fine".

It has to be split into 2 categories in standard AIML, the original one plus this one

<category> <pattern>I AM FINE</pattern>
<template>Good then!</template> </category>

In this one

<category> <pattern>* CALCULATE *|* CALCULATOR *</pattern>
<template>Ummmm...sowwy Hun. I dont do anything useful like that. I
can drive you crazy...but I cant help you with math stuff.</template>
</category>

the | symbol presumably means "or", i.e. it matches inputs with CALCULATE or CALCULATOR
So in this case we would split into 2 categories, one with CALCULATE and one with CALCULATOR. But then there would actually be 8 categories because of the difference in the interpretation of *.

The more typical approach in standard AIML would be to set up "keyword" categories:

<category>
<pattern>CALCULATOR</pattern>
<template>Ummmm...sowwy Hun. I dont do anything useful like that.
I can drive you crazy...but I cant help you with math stuff.
</template>
</category>

<category>
<pattern>_ CALCULATOR</pattern>
<template><srai>CALCULATOR</srai></template>
</category>

<category>
<pattern>CALCULATOR *</pattern>
<template><srai>CALCULATOR</srai></template>
</category>

<category>
<pattern>_ CALCULATOR *</pattern>
<template><srai>CALCULATOR</srai></template>
</category>

The conclusion here is that the patterns can be converted It should be done by a translation program. That translation program is not difficult to develop.

Converting <that> and <topic>:

RAB put <that> and <topic> inside the <pattern> with a slightly
different format than we use:

<category>
<pattern>* <THAT=UMMM WHAT WERE WE TALKING *></pattern>
<template>Oh yea...Umm..well, ok then. I guess you think highly of
<star1> huh?</template>
</category>

We put the <topic> and <that> in slightly different places:

<category><pattern>*</pattern><that>WHAT IS YOUR NAME</that>
<template>Nice to meet you, <star/></template>
</category>

We can translate the AIML <that> and <topic> too, but it might be
worth doing it with a program instead of by hand

It seems that RAB does not use <srai>. They tried to create a simpler, "flatter" version of AIML by creating a more complex pattern language. However the conversion to standard AIML
seems straighforward if we introduce <srai>.


Migrating to Pandorabots

RAB customers should try setting up a free account on Pandorabots.

Use the option create a new bot with no initial content.

If you have an "ultimate default category" with <pattern>*</pattern> start with that one. This may be called a "no match" on RAB.

Usually I create a file called "Pickup.aiml" (for "pickup lines") and put that one category in there
you can call it "nomatch.aiml" or anything else you want.

Some RAB users like to train their bot to put to client into an infinite loop.
Pandorabots can achieve the same thing with:

<category>
<pattern>GET ME STUCK</pattern>
<template><think><set name="topic">STUCK</set></think> Ok you are
stuck. </template>
</category>

<topic name="STUCK">
<category>
<pattern>_</pattern>
<template>You can never get out of here.</template>
</category>
</topic>

gives you
Client: Get me stuck.
Bot: Ok you are stuck!
Client: Help
Bot: You can never get out of here.
Client: Let me out!
Bot: You can never get out of here.


AIM (AOL Instant Messenger)

On RunABot the bots communicated primarily by means of AOL Instant Messenger (AIM). On Pandorabots the default bot interface is a web page. We had our own Pandorabots
AIM interface working for a long time, and then AOL changed their API (called TOC). Unfortunately the Pandorabots AIM interface is not supported at this time.

In the meantime we have been offering another option Pandorabots has its own API called XML-RPC. Lots of people in the Pandorabots community use XML-RPC to connect Pandorabots to all kinds of third-party systems, including Second Life, Flash, and IM services

So if we want to support RAB customers with AIM, we have to dig around to find out if someone has a AOL client working now, and if not, find someone to create it.

These group has developed a script that puts Pandorabots on IRC:
http://www.hawkee.com/snippet/6306/?sid=3b80de9879b3943d760c3390667e77ff
Perhaps it could be modified to support AIM and other IM services.

Program O version 1.0.3


July 22 saw a new release of Program-O, the PHP and MySQL AIML interpreter by Elizabeth Perreau. Program O version 1.0.3 has already received positive reviews from users who say it feels more like version 2.0.

Version 1.0.3 includes;
==Support for the system tag
==Many bug fixes
==My Program-O - an easy to use botmaster admin area
==Installers for the bot and admin area

If you are doing a fresh install then there is now a handy installer script that will do it for you.
But don't run this if you are just upgrading--as it will reset your bots brain!

There is now an admin area, called My Program-O, a really simple place to train and monitor your bots. You can upload your AIML, teach your bot, update it's personality, read stats and logs.

Elizabeth says, "My Program-O is also available under the GNU license so please feel free to mash it up for your own needs."

You can check out Program O at http://www.program-o.com.
You can download the latest files here http://sourceforge.net/projects/program-o/

Tuesday, June 02, 2009

Superbot 2.0

Have you ever wanted to create your own totally unique custom bot character, as smart as ALICE, but with a completely different personality? Where do you start? It took us over ten years to build up the contents of the ALICE brain, but now your creative team can do it in about two weeks. We've put together a bot brain with blank templates. You fill in the answers.

The ALICE A. I. Foundation is offering a completely upgraded product, the Superbot 2.0, that helps you create a totally unique custom bot personality for your web site or application. The Superbot 2.0 offers you the folowing:

  1. Top 10K AIML Categories with blank responses: We've created an AIML set with input patterns and blank responses. Use this AIML set if you want to create a totally custom bot from scratch.
  2. 20K Safe AIML Reductions: AIML uses "reductions" to divide up and simplify inputs, and to link synonyms together. The "Safe" AIML reductions are designed to work with any bot. The Safe AIML Reductions save you from having to write thousands of AIML catgeories.
  3. Top 10K AIML Categories with ALICE responses: The Top 10K most activated AIML categories with the original ALICE bot responses. This set can be modified easily to quickly create a new bot personality.
  4. Top 10K AIML Categories split into "Atomic", "Wild" and "Reductions": "Atomic" categories are ones with no wild cards in the patterns, and no reductions in the response. "Wild" categories are ones with one or more wildcards in the pattern, and no reductions in the response. "Reduction" categories are all the ones with AIML reductions. This set helps you divide up the work of creating your custom chat bot.
  5. Free Riot Software SAE AIML Spreadsheet Editor: The Simple AIML Editor is a spreadsheet-oriented AIML editor for Windows that provides all the capabilities you need to create your bot with the Superbot AIML files.
The Superbot 2.0 is available now for $999.

"The Superbot script helps a lot." -- Ron C. Lee, Pasadena City College.

"If I were recreating Buddhabot today I probably would have started with the Superbot program but this was not available to me in 2004" -- Ron Ingram, Godsbot.

"an interesting resource...a decent value for such data."--Andrew Stren, Grand Text Auto.

http://Www.AliceBot.Org/superbot.html


The Superbot 2.0 is also available as an upgrade for earlier versions of the Superbot for only $199, if you previously purchased the Superbot-10K from the ALICE A.I. Foundation.

Wednesday, May 27, 2009

Business community for chatbots launched

Business community for chatbots launched

The evolution of chatbots, artificial entities designed to have interesting or entertaining conversations with us; also named 'conversational agents', is now supported by a worldwide community for chatbot developers, affiliated industry and users. Chatbots are getting a lot of attention from businesses right now as they can save costs in customer service centres and are therefore very welcome in the current economic climate. As there was no such business community in the world, Chatbots.org is now filling the gap.

Relevance
Chatbots are not just another hyped technology. They are part of the brand dialogue trend, as outlined in 2005 by futurist Erwin van Lun. Chatbots are today's representation of the growing ability of brands- of organisations - to move away from advertising- the automation of sending messages - towards the automation of listening to individuals. In the future, advertising will disappear and be wholly replaced by Chatbots which cannot be distinguished from real people, representing brands in an (extremely) intelligent conversation. Therefore the 'business news' feature within chatbots.org is demonstrating the evolution of business communication.

Features
Business news is the most important new feature. It will cover news on 'conversational technology', 'human identification' (biometrics for example), 'sensing' (like voice recognition), and 'appearance' (such as holographic projections). Individuals from the participating industry are all allowed to publish news themselves and the community invites professionals to comment on news or start as an editor for Chatbots.org. Furthermore, professionals can use their own page to profile themselves to the outside world.

About Chatbots.org
Chatbots.org was founded by Erwin Van Lun in 2008 and started as a worldwide listing of chatbots. Today, it's mission is 'to be the leading community for chatbot developers, users and affiliate industry on research, technology and innovation driving commercial success for all participants'.

Links and additional information for the media
Business News & Community:
http://www.chatbots.org/conversational

Background information:
http://www.chatbots.org/conversational/agent/welcome_to_chatbots.org_2.0

Brand dialogue trend:
http://www.erwinvanlun.com/ww/trends/brand_dialogue/

Copyright free images to use in your publications:
http://www.chatbots.org/gallery/

Information about Erwin van Lun: (contact information, including HiRes picture):
http://www.erwinvanlun.com/ww/erwinvanlun

Saturday, May 16, 2009

ALICE #3 in 2009 Chatterbox Challenge

ALICE came in third place in the "Best Overall Bot" category in this year's Chatterbox Challenge.

Jeeney AI is the best overall bot in CBC 2009.

The winners in CBC 2009 are as follows:

Jeeney AI - Best Overall Bot (1st place)

Artemis - Best Overall Bot (2nd place)

A.L.I.C.E. - Best Overall Bot (3rd place)

Artemis - Most Popular Bot

Suzette - Best New Bot

To view chat transcripts for the 2nd round of questions, please check the link below:

http://www.chatterboxchallenge.com/result.php#P4

For more info about final result, please check the link below:

http://www.chatterboxchallenge.com/result.php#P5

Many thanks to Ehab El-agizy and InfraDrive for sponsoring this year's contest.

Tuesday, April 21, 2009

AIML Superbot Upgrade

The AIML Superbot is a convenient way to create your own unique bot personality. The Superbot contains the top 10K most activated AIML patterns in the ALICE brain, with blank templates. Organized in a spreadsheet, the Superbot allows you to sort the AIML data by pattern, template or activation count.

The Superbot has now been upgraded to included the Safe AIML Reductions. These reductions can be used with any bot, and avoid the dreaded "infinite recursion in AIML" error message. The AIML Superbot is now available with the Safe AIML Reductions together as one package, for the same price of $999. To order click here.

The Safe AIML Reductions are not included with the Superbot-1K offer.

Monday, April 13, 2009

A.L.I.C.E. 2009 Chatterbox Challenge Finalist

Ehab El-agizy has announced that A.L.I.C.E. is one of the Top 9 finalists in the 2009 Chatterbox Challenge contest. The annual contest is on online variation of the Turing Test, as opposed to the Loebner Prize where the bots compete in a live event.

CBC Public Voting has just started (13 April 2009), you can now participate in the Public Voting at the link below:

http://www.chatterboxchallenge.com/voting.php

Results can also be viewed at the link below:

http://www.chatterboxchallenge.com/vote_res.php

Ehud says, "Share those links with your friends or put it in your website, so visitors can vote for you!"

There was a slight delay of Public Voting this year due to the technical development of the new CBC system, so Ehud decided to postponed the deadline for voting period to be 10 May 2009.

View the Chatterbox Challenge at:

http://www.chatterboxchallenge.com

Sunday, March 29, 2009

Safe AIML Reductions

The ALICE A.I. Foundation is pleased to make available a set of over 20,000 AIML reduction categories that can be used with any bot. These reductions simplify a huge range of natural language inputs. These categories:

Resolve Synonyms: Map inputs "Hello", "Hi there", "Howdy" etc. onto "Hi".

Simplify Inputs: Convert "I am feeling very happy right now" to "I am happy".

Divide and Conquer: Split "Yes my name is Jim" into "Yes" and "My name is Jim".

The Safe AIML Reductions contain only reduction responses and is stripped of all ALICE bot personality content. You can use the Safe AIML Reductions with any AIML chat bot. The Safe AIML Reductions will save a lot of time when you are developing a unique chat bot personality.

The Safe AIML Reductions avoid the dreaded "Too much recursion" error message in AIML by using <srai>'s that eventually terminate. The Safe AIML Reductions are delivered to you in the form of AIML files.

Saturday, March 28, 2009

Safe Reductions and Dangerous ones

In order to help people make their own chat bots, with their own unique personalities, we would like to leverage as much of the ALICE bot as possible. The ALICE bot contains a large number (around 20,000) of symbolic reduction categories that use <srai>. Generally speaking, these reductions should be applicable to all English speaking bots. They take care of such things as associating synonyms, transforming inputs into simpler forms, and splitting inputs into smaller chunks. Fortunately, it is fairly straightforward to extract these from the ALICE brain into a set of distinct reduction categories, and then try to use them with other bots.

A simple and useful application of the reduction categories by themselves is a bot called the Summarizer. The purpose of the Summarizer is to simplify paragraphs and reduce the number of words. The Summarizer works not by reducing the number of sentences, but by applying as many AIML reductions as possible to reduce the number of words in each sentence. The ultimate default category in the Summarizer with <pattern>*</pattern> simply echos back the input. When the Summarizer can find no more reductions, it prints out the result. The following are some examples of the types of simplifications found by the Summarizer:

I AM FEELING VERY TIRED RIGHT NOW --> I AM TIRED
IN FACT HE HAS GONE TO ANOTHER COUNTRY --> HE WENT ABROAD
YOU CAN REST ASSURED WHAT HE SAYS IS ABSOLUTELY CORRECT --> HE IS CORRECT

When we first created the Summarizer bot, the first step was to export the AIML reductions from the ALICE bot. Although the extraction was straighforward, we quickly noticed an unexpected problem. The ALICE bot contais reductions such as

<category>
<pattern>WHO IS * WALLACE</pattern>
<template><srai>WHO IS RICHARD WALLACE</srai></template>
</category>


The author's original intention for this category is clear. There conversation logs contain inputs such as "Who is DrRichard Wallace", "Who is Richrd Wallace" and "Who is Docter Wallace". The botmaster would like to capture all of these inputs to be classified the same as "Who is Richard Wallace". In the context of the ALICE bot, it is far less likely that the input will be "Who is Henry Wallace" or "Who is William Wallace". Given the topics ALICE talks about, an approrpiate startegy for the bot is to guess that the client intended to ask "Who is Richard Wallace?"

Once this category is extracted to the Summarizer bot however, there is a problem. The base category with the pattern WHO IS RICHARD WALLACE no longer exists. Suppose the input is now "Who is Richard Wallace?" AIML will match the input with <pattern>WHO IS * WALLACE</pattern> and then recursively try to match "WHO IS RICHARD WALLACE" again, leading to infinite recursion.

Therefore it became necessary to filter out these "dangerous" AIML reductions. How can we identify reductions that might lead to infinite loops? Technically it is mathematically impossible to prove that a reduction will lead to an inifinite loop (otherwise we would have solved the unsolvable Halting Problem). What we can do however is identify a set of reductions that are "safe", i.e. guaranteed to eventually produce an output by applying only a finite number of reductions.

A "safe" reduction is one that takes an input, and then calls <srai> with a shorter input, that is, it reduces the number of words. If every reduction reduces the number of words by at least one, then eventually the number of words has to reach one or zero, and the program will terminate. For example these reductions are safe:

<category>
<pattern>I AM REALLY *</pattern>
<template><srai>I AM <star/></srai></template>
</category>

<category>
<pattern>DO YOU KNOW WHAT * IS</pattern>
<template><srai>WHAT IS <star/></srai></template>
</category>

<category>
<pattern>YES *</pattern>
<template><srai>YES</srai> <srai><star/></srai></template>
</category>

The last example is considered safe because the divide and conqer splits the input into two parts, one of length one, and another with one fewer words than the original input.

Some reductions not considered safe are:

<category>
<pattern>WANT TO *</pattern>
<template><srai>DO YOU WANT TO <star/></srai></template>
</category>

<category>
<pattern>I LOVE *</pattern>
<template><srai>I LIKE <star/></srai></template>
<category>

<category>
<pattern>CAN YOU SPEAK *</pattern>
<template><srai>WHAT LANGUAGES DO YOU SPEAK</srai></template>
</category>

Again, it is not necessarily true that these categories will lead to infinite recursion. But the safe set is guaranteed to terminate, so we are better off using them in our general purpose AIML reduction library.

English Contractions and Expansions

I have searched for a list like this online, but have never been able to find one. So I thought I better publish my own list. These are all the common contractions of the English language, along with their expanded forms. AIML chat bots expand all contractions using a list like this, as a pre-processing step. Perhaps they may be of use to someone else besides us botmasters.

("AREN'T" "ARE NOT")
("CAN'T" "CAN NOT")
("CANNOT" "CAN NOT")
("COULD'VE" "COULD HAVE")
("COULDN'T" "COULD NOT")
("DIDN'T" "DID NOT")
("DOESN'T" "DOES NOT")
("DON'T" "DO NOT")
("EVERYTHING'S" "EVERYTHING IS")
("HADN'T" "HAD NOT")
("HASN'T" "HAS NOT")
("HAVEN'T" "HAVE NOT")
("HE S" "HE IS")
("HE'D" ("HE HAD" "HE WOULD"))
("HE'LL" "HE WILL")
("HE'S" "HE IS")
("HOW'D" ("HOW HAD" "HOW WOULD"))
("HOW'S" "HOW IS")
("I'D" ("I HAD" "I WOULD"))
("I'LL" "I WILL")
("I'M" "I AM")
("I'VE" "I HAVE")
("ISN'T" "IS NOT")
("IT S" "IT IS")
("IT'D" ("IT HAD" "IT WOULD"))
("IT'LL" "IT WILL")
("IT'S" "IT IS")
("LET S" "LET US")
("LET'S" "LET US")
("MIGHT'VE" "MIGHT HAVE")
("SHE'LL" "SHE WILL")
("SHE'S" "SHE IS")
("SHOULD'VE" "SHOULD HAVE")
("SHOULDN'T" "SHOULD NOT")
("THAT S" "THAT IS")
("THAT'D" ("THAT HAD" "THAT DID"))
("THAT'LL" "THAT WILL")
("THAT'S" "THAT IS")
("THERE S" "THERE IS")
("THERE'LL" "THERE WILL")
("THERE'S" "THERE IS")
("THERE'S" "THERE IS")
("THEY'D" ("THEY HAD" "THEY WOULD"))
("THEY'LL" "THEY WILL")
("THEY'RE" "THEY ARE")
("THEY'VE" "THEY HAVE")
("THEY'VE" "THEY HAVE")
("THIS'LL" "THIS WILL")
("WASN'T" "WAS NOT")
("WE'D" ("WE HAD" "WE WOULD"))
("WE'LL" "WE WILL")
("WE'RE" "WE ARE")
("WE'VE" "WE HAVE")
("WEREN'T" "WERE NOT")
("WHAT'D" ("WHAT HAD" "WHAT DID"))
("WHAT'LL" "WHAT WILL")
("WHAT'S" "WHAT IS")
("WHERE S" "WHERE IS")
("WHERE'S" "WHERE IS")
("WHO'S" "WHO IS")
("WHO'S" "WHO IS")
("WHY'S" "WHY IS")
("WON'T" "WILL NOT")
("WOULD'VE" "WOULD HAVE")
("WOULDN'T" "WOULD NOT")
("YOU'D" "YOU HAD YOU WOULD")
("YOU'LL" "YOU WILL")
("YOU'RE" "YOU ARE")
("YOU'VE" "YOU HAVE")
("'TIS" "IT IS")
("'EM" "THEM")


Bot Training I: Lingustic Targets

The construction of a chat robot has a video game metaphor. The botmaster writes some AIML, then reads the conversation logs with the resulting bot. Spotting places in the dialog where the bot breaks down, the botmaster writes new AIML to improve the broken dialog, and then repeats this cycle again and again. When we find an opportunity to improve the bot's response in the conversation log, we call that a “target”. Thus authoring the chat bot becomes a process of identifying targets and “filling them up” with new AIML content. The more content, the
more AIML categories created the higher you “score” in this video game metaphor.

Pandorabots has taken the game metaphor a step further and automated the process of finding targets. How do we know when the bot gives an incorrect, vague, or imprecise response? In AIML, the answer is simple: whenever the input pattern contains a wildcard (* or _character). If the input pattern contains no wildcards, then thematch was exact, and in most cases, the bot can formulate an exact reply. If there are wildcards, then the bot by definition only recognized part of what the client said.

(The above describes the situation only to a first order approximation. Strictly speaking, we should consider the input <pattern>, <that> and <topic>. Only if all three contain no wild cards is there truly an exact match. If for example the <pattern> is YES and the <that> pattern is thewildcard *, it is a potential target, because we can make a more exact response by taking into account a <that> value. But as happens many times with AIML, it is simpler to explain a principle of the language by thinking about the input <pattern> in isolation and ignoring the details of <that> and <topic> until later. The extension of the principle to <that> and <topic> is a matter of bookkeeping.)

Strictly speaking, a Target consists of two things: an input, and an AIML category that it matches. For example, the input HE IS STRONG together with the category

<category>
<pattern>HE IS *</pattern>
<template>I did not know he is.</template>
</category>

form a Target. Let's call the input the “Target input” and the category the “Target category”. The Target input “He is strong” together with the Target category above give the botmaster to create a
new, more specific category:

<category>
<pattern>HE IS STRONG</pattern>
<template>Does he work out?</template>
</category>

Pandorabots Targeting algorithm scans the conversation logs, re-classifying the inputs into the AIML Graphmaster, and finds matches. When the matches contain a wildcard, the algorithm saves the input and the matched category on a list of matches. As we might expect, there is a Zipf distribution over the Target categories. Usually there is one category, typically the ultimate default category with <pattern>*</pattern& gt;, associated with more Target inputs than any other category. Then there is a second most activated category, and a third, and so on, down to a long tail of Target categories with only one Target input each.

Using the Targeting algorithm, the botmaster can have quite an enjoyable afternoon building his bot by “filling up lingusitic targets” and accumulating category-count points. To use the Targeting algoritm, the botmaster first selects the conversation logs for analysis. Then by choosing the “Find Targets” option, the botmaster generates a list of Target categories, each with a link to the associated Target inputs. The program provides a direct link from the Target inputs to the Pandorabots Training section, so that the botmaster can efficiently move from Targets to writing new categories.

Friday, March 27, 2009

<srai>: The basics: Table of Common <srai> forms

In writing AIML response templates, certain forms of <srai> responses occur over and over again. They are common enough to be worth identifying and naming them. The following table summarizes the four basic types of common <srai> templates: the Synonym, Simple Wildcard, Multiple Wildcard and Divide and Conquer forms.


Synonym form:

<srai>PHRASE</srai>

Simple Wildcard forms:

<srai><star/></srai>

<srai>PHRASE <star/></srai>

<srai><star index="2"/></srai>

Multiple Wildcard forms:

<srai><star/> <star index="2"/></srai>

<srai><star/> PHRASE <star index="2"/></srai>

Divide and Conquer forms:

<srai><star/></srai>. <srai><star index="2"/></srai>

<srai>PHRASE1 <star/></srai>. <srai>PHRASE2 <star index="2"/></srai>

Thursday, March 26, 2009

<srai>: The basics II: Simple wildcard reductions

AIML uses a wildcard * (the star character) to stand for one or more words. An AIML pattern such as <pattern>I AM *</pattern>, taken by itself, matches a wide range of inputs such as "I am tired", "I am reading a book", "I am waiting for a reply" and so on. If the input is "I am tired", the wildcard is said to be bound to the word "tired" (1 word). If the input is "I am reading a book", the wildcard is bound to "reading a book" (3 words), and similarly, if the input is "I am waiting for a reply", the wildcard is bound to "waiting for a reply" (4 words).

Inside the template, AIML uses the <star/> tag to access wildcard bindings.

Trivially, the category

<category>
<pattern>*</pattern>
<template><star/></template>
</category>

will just echo the client's input:

Human: Hello!
Robot: Hello!
Human: Who are you?
Robot: Who are you?

The simplest form of AIML reduction using <srai> together with <star/>, involves reducing or simplifying the input by one or a few words:

<category>
<pattern>I AM ESPECIALLY *</pattern>
<template><srai>I AM <star/></srai></template>
</category>

If someone says, "I am especially tired", or "I am especially interested in this book", it is really no different logically from saying "I am tired" or "I am interested in this book". A philosopher might say, the word "especially" plays no logical role in the sentence. More practically, the bot may have a reply for "I am tired" and "I am interested in something", so reducing the input by removing the
word "especially" will link these inputs to appropriate responses.

The categories:

<category>
<pattern>I AM TIRED</pattern>
<template>Maybe you should take a nap?</template>
</category>

<category>
<pattern>I AM ESPECIALLY *</pattern>
<template><srai>I AM <star/></srai></template>
</category>

produce the dialog:

Human: I am especially tired.
Robot: Maybe you should take a nap?

As a bonus, these types of reduction categories can reduce a sentence with "I am" followed by any number of occurrences of "especially":

Human: I am especially especially especially tired.
Robot: Maybe you should take a nap?

A slightly related, also very common form of reduction, eliminates sequences of words (clauses) that can be eliminated from the input without changing its meaning significantly. Such clauses are decoration, added by the human personality, perhaps as social conventions, but again, the philosopher might say they have no logical purpose. "I will state that I warned you about his condition" is really the same as "I warned you about his condition", at least as far as the robot is concerned. The robot may already have a response to "I warned you about something", so by reducing the input, the bot stands a better chance of making an intelligent sounding reply.

In these cases we use a <pattern> with a wildcard, but end up throwing away all the words in the pattern except for the wildcard:

<category>
<pattern>I WILL STATE THAT *</pattern>
<template><srai><star/></srai></template>
</category>

Another example is a category for inputs that start with "At any rate..."

<category>
<pattern>AT ANY RATE *</pattern>
<template><srai><star/></srai></template>
</category>

A last example handles sentences that begin "I assure you that..."

<category>
<pattern>I ASSURE YOU THAT *</pattern>
<template><srai><star/></srai></template>
</category>

<srai>: The basics I: Linking Synonyms

The simplest form of category in AIML is one with an atomic pattern, namely, a pattern with no wild cards.

For example

<category>
<pattern>NAME</pattern>
<template>My name is ALICE.</template>
</category>

produces the dialog:

Human: Name?
Robot: My name is ALICE.

But there are many different ways of asking for a name. "What is your name?", "Who are you?", "Tell me your name", "Do you have a name?", "Your name is?" are all synonyms for "Name?".

In AIML we link all of these synonyms together using the <srai> tag.

The category:

<category>
<pattern>WHAT IS YOUR NAME</pattern>
<template><srai>NAME</srai></template>
</category>

used in conjunction with the category above, produces the dialog:

Human: What is your name?
Robot: My name is ALICE.

Similarly, we can add categories such as:

<category>
<pattern>DO YOU HAVE A NAME</pattern>
<template><srai>NAME</srai></template>
</category>

and

<category>
<pattern>YOUR NAME IS</pattern>
<template><srai>NAME</srai></template>
</category>

and so on for all the variations of "Name?"

Creating a new chat bot involves writing an enormous amount of original AIML content. Because of its minimalism, AIML lets the botmaster approach content creation one small step at a time. Typically when creating a bot, we identify in the chat logs a new variation of an input we have already seen before. For example, we might see "I want to know your name", and realize there is already a response for this. The convenience of <srai> is that we don't have to go searching through files and files of code to find the response. We know the response is already in there somewhere, so we can just link to it with <srai>:

<category>
<pattern>I WANT TO KNOW YOUR NAME</pattern>
<template><srai>WHAT IS YOUR NAME</srai></template>
</category>

Notice that we linked to WHAT IS YOUR NAME. This doesn't matter, because there is already another category linking WHAT IS YOUR NAME to NAME.

As a general rule of thumb, a good design principle of AIML is to follow the rule that each <srai> should "shorten" then input. In this case that means that reducing WHAT IS YOUR NAME (4 words) to NAME (1 word) is ok, and reducing I WANT TO KNOW YOUR NAME (6 words) to WHAT IS YOUR NAME (4 words) is ok, but we should avoid categories like:

<category>
<pattern>TELL ME YOUR NAME</pattern>
<template><srai>I WANT TO KNOW YOUR NAME</srai></template>
</category>

By avoiding such designs, the AIML program is guaranteed to terminate, and we will never see the "Too much recursion in AIML" error. Why this is, will be explained in more detail later. For now, keep in mind the design rule that in AIML, it is better to store actual responses along with the simplest and shortest possible patterns. That is why putting the response "My name is ALICE" inside the category with pattern NAME, is better than putting it with WHAT IS YOUR NAME.

Tuesday, March 10, 2009

New AIML Learning File

AIML Botmaster Steve Worswick (Square Bear) has written a file that will allow users to teach your bot new facts rather than just correcting its replies using badanswer.aiml. The user should say LEARN then the fact. For example:

Human: Learn the sun is hot
Bot: Ok I will learn that the sun is hot.

Human: Learn London is in England
Bot: Ok I will learn that London is in England.

Human: Learn a cat has four legs.
Bot: Ok I will learn that a cat has 4 legs.

Human: What has 4 legs?
Bot: a cat.

Human: What is the sun
Bot: hot.

Human: Learn the sun is hot and yellow
Bot: Ok I will learn that the sun is hot and yellow.

Human: What is hot and yellow
Bot: the sun.

Human: What is the sun
Bot: hot and yellow.

Human: Where is London
Bot: in England.

Human: What is in England
Bot: London.

Human: Learn Dr Wallace is an AI expert
Bot: Ok I will learn that Dr Wallace is an AI expert.

Human: What is an AI expert
Bot: Dr Wallace.

Human: Who is an AI expert
Bot: Dr Wallace.

Human: Who is Dr Wallace
Bot: an AI expert.

Human: What is hot
Bot: the sun.

Human: What has a cat?
Bot: 4 legs.

Square-Bear will update this file to cover more complicated knowledge such as "Learn the 2012 Olympic Games will be held in London", "Where will the 2012 Olympic Games be?". The current version of the file is available, along with all my other public AIML files at: http://square-bear.co.uk/aiml Square-Bear says, "Feel free to use it in your bots!"

Tuesday, February 24, 2009

McKinney Agency Launches Chat Bot


The ad agency McKinney.com has launched a new web site that mashes a variety of advanced technologies including an AIML chat bot. McKinney is one of the top ten advertising agencies in the US. Working in partnership with Othersource, McKinney has been developing the site for the past 9 months.

It's a site you can talk to. You can type questions in natural language, the site will answer and show you different parts of its content. So McKinney.com is one of the first examples of web 3.0 - it adapts to you, rather than the other way around. The site looks beautiful, too, and most of it is in 3D. Have a look for yourself: http://mckinney.com/

Monday, February 16, 2009

Program O on Sourcefourge


This week Elizabeth Perreau placed Program O under the GNU General Public License (same as Linux) on Sourceforge. Program O allows you to host a chatbot on your website using in PHP with MySQL. If you would like a demo or more information please visit http://www.program-o.com.

The Specifications for Program O:
  • Database Environment : MySql
  • Development Status : 4 - Beta
  • License : GNU General Public License (GPL)
  • Programming Language : PHP
  • Topic : Intelligent Agents
  • User Interface : Web Based
The AIML botmaster may consider Program O as an alternative to the now unsupported Program E, an earlier AIML interpreter in PHP.




Thursday, January 22, 2009

Simple AIML Editor


Adeena Mignogna has written a new AIML editor, simply called, "Simple AIML Editor". Adeena said she got a little frustrated with the choices out there to manage her AIML
file content, so she wrote a new AIML editor.

The SAE is the latest development in the evolution of spreadsheet-style AIML editors like GaitoBotEditor and the Ai-Dealer AIML Spreadsheet editor. The SAE has simplified the interface and reduced the number of operations to a few, common botmaster tasks.

One of the challenges in managing AIML is that, although the AIML is in XML format, the data is a hybrid of highly structured, row-oriented fields (file name, pattern, that, topic, pattern, template) combined with hierarchical XML data in the template. The large amount of row-oriented data makes it hard to edit AIML with off-the-shelf XML editors. The spreadsheet seems to be the best metaphor to manage the large number of AIML categories found in convincing A.I. bots. Then other tools, at minimun a text editor, such as provided by the SAE, are required to edit the AIML template-side responses.

The SAE also allows the botmaster to load an XML schema to check for valid AIML. The editor supports file character encodings utf-8 and iso-8859-1. The editor also includes a "comment manager" to help the botmaster store comments and copyright statements at the head of each AIML file.

The editor is a C# application written for Windows. The program has been tested on both Windows XP and Vista machines and it seems to run fine on both of them.

Adeena would appreciate any feedback on the application and would definitely like to know if anyone experiences any problems with it.

The Simple AIML Editor can be found here:
http://riotsw.com/sae.html

Wednesday, January 14, 2009

Program O


Elizabeth Perreau, creator Shakespearebot, has written a new AIML interpreter. In keeping with the tradition of naming AIML interpreters with letters of the alphabet (Program B, Program C, Program D etc.) Elizabeth has chosen to name hers Program O (the letter O, pronounced "Oh"). Like the no longer actively supported Program E, Program O is based on PHP and MySQL. You can check out Program O at http://www.program-o.com.

Program E has some well known bugs, and without active support, it can be frustrating to try to make modifications to its source code. Elizabeth says, "I just got to the stage where if I wanted to get into AIML more I had to re-write alot of it for my needs." Program O is written to make it easy to add new AIML tags and extensions. Elizabeth has already implemented the custom Pandorabots tags <eval> and <learn> for client-based bot training.

Program O is set for release on March 1, 2009. Meanwhile you can help Elizabeth debug the code by visiting the site and chatting with her bot.
 

blogger templates | Make Money Online