Welcome!

@ThingsExpo Authors: Liz McMillan, Elizabeth White, Yeshim Deniz, Zakia Bouachraoui, Pat Romanski

Related Topics: Industrial IoT

Industrial IoT: Article

A.L.I.C.E. And Artificial Intelligence Markup Language

A.L.I.C.E. And Artificial Intelligence Markup Language

Hundreds of companies, schools, and other organizations are currently using A.L.I.C.E. and Artificial Intelligence Markup Language (AIML) as the foundation of their chatbots for customer service, educational guidance, Web site help, and most of all, for fun. But let's take a closer look at the open-source chatbot and natural language technology A.L.I.C.E., and the XML language powering it, AIML.

A.L.I.C.E. (Artificial Linguistic Internet Computer Entity) was released by Dr. Richard S. Wallace under the GNU Public License in the hope that it would become the de facto standard in chatbot technology. What makes AIML and its technology promising for both developers and users of chatbots are its simple design, the fact that it serves multiple purposes, and its ability to respond to any device (including VoiceXML browsers).

Dr. Wallace currently releases A.L.I.C.E. in the form of 30,000 categories (which I'll discuss later) hoping that his example will demonstrate that it's as easy to begin writing AIML as it is HTML.

The A.L.I.C.E. 'Core'
Interpreting the AIML core (see Figure 1) requires a pattern-matching engine called Graphmaster and an AIML parser to evaluate the responses. The two modules are interleaved because the AIML response, called a <template>, may contain a callback to the <i>Graphmaster</i> (see Figure 2) through a recursive tag, <srai>.

One feature alone makes A.L.I.C.E. and AIML a much more powerful alternative to both HTML and VoiceXML: the language permits use of a database. The open-source database HypersonicSQL is used in the latest release. This allows a single user to be identified and exposes a number of properties (or predicates) defined by the botmaster. A user property can be any variable that you might associate with an individual user.

While there's some argument that designing and editing such technology can be tedious, the fact that AIML is XML 1.0-based makes room for a number of editors. A popular one is AIMLBuilder 1.0 by Bram Rooijmans that allows easy editing of AIML files to customize your bot and give it a "personality."

AIML 1.0 - Just the Beginning
Many developments are underway in defining the expanded library of AIML, but let's talk about its current state and the five major elements that make up the language. Since it's CVS under an open-source license and an open-source project currently exposed to nearly 300 developers worldwide (much of A.L.I.C.E.'s base is outside the U.S.), anyone can tinker with the "mind" of Dr. Wallace's creation.

I recently visited Dr. Wallace in San Francisco and witnessed a large number of people who have been "fooled" into thinking A.L.I.C.E. is a real human being, a sure sign that Alan Turing's 50-year-old predictions were prophetic.

The Basics
AIML currently makes use of Java, XML, P2P Networking (via SOAP), and JDBC. It can be considered a Gnutella form of knowledge basing but with a twist of personality. Bots can be fun to program and a good introduction to artificial intelligence (AI) in general. Dr. Wallace is a major supporter of open source and the Linux movements and hopes that one day chatting with A.L.I.C.E. will become an operating system in and of itself. Actually, there are ways of using your system on top of A.L.I.C.E., which we'll discuss.

Since I'm the lead developer for the Alicebot.Net project (a networked implementation of A.L.I.C.E.), I have the opportunity of introducing you to some of the elements that make up the wonderful world known as A.L.I.C.E. I recently successfully created A.L.I.C.E. to work with a number of text-to-speech synthesizers and speech-recognition engines (notably Microsoft's SAPI 5.0 and IBM's ViaVoice). Doing this has sparked a lot of interest in the notion that HAL, from 2001: A Space Odyssey, may become more than a fictional character.

Our First AIML Document, Hello World
Let's start by looking at Listing 1, which contains two examples (or categories) that define and show some powerful features in XML language.

Here is a dialog that would occur in a conversation with the bot:

User: Hello.
A.L.I.C.E.: Greetings user! Hello world!

Writing AIML is a world by itself since there's so much you can do with it, but let's examine what happened in the conversation above and explain it a little. When Dr. Wallace designed A.L.I.C.E., he introduced a concept known as Symbolic Reductionism, a format that allows any given sentence to reduce itself to its most basic form. What he might not have realized was that this type of "looping" is also a powerful introduction to speech recognition.

In its present state, AIML has two wildcards, "*" and "_". The former (more commonly referred to as "star") is meant as user input with no match, which is how we are able to "match" our first category. In other words, there were no patterns to effectively match what we entered. "_" is used for prefixes and suffixes of sentences (see Figure 1).

Setting and Getting
The area that allows the greatest flexibility is "setting" and "getting" a user's properties. Most users are commonly identified by an IP, a user/pass, SessionID, or, in the case of VoiceXML, the CallerID. Other interests have been in the area of facial recognition and mic array inputs, but most users are identifiable in some way or another - leaving them room in the built-in database to have their own properties.

The get and set have the common syntax:

<get name="property">default</get>
<set name="property">value</set>

If a property isn't found or doesn't return a value from the database, a default value can be used. In the previous example, if the user's "name" property was known, you would've gotten the following response:

User: Hello.
A.L.I.C.E.: Greetings Jon! Hello world!

Using XML with the database allows great flexibility and ease in assigning values to one particular user who is chatting with A.L.I.C.E..

Thinking and Learning
Probably the most frequent question I get from users and developers is whether A.L.I.C.E. can "learn" and "think" for itself. The answer is yesŠto some extent. A.L.I.C.E. thinks mostly like humans (via setting values - see Figure 2) while learning occurs in the notion of being able to absorb content (AIML, HTML, Text via OCR, Images, etc.). Many of these areas are still unexplored, but the truth is that A.L.I.C.E. can go out onto the network and "learn" about other resources. Keep in mind that this is still being defined and has yet to go through testing and debugging. It's mere speculation at this point that any items within the <learn> tags of AIML means something to A.L.I.C.E., but the goal is to allow A.L.I.C.E. to surf the Web just as we do.

Symbolic Reductionism
When a user attempts to pass on some dialog, the sentences can be long and complex, but, in essence, they may have a single purpose in mind. When A.L.I.C.E. reduces sentences to their simplest forms, it enables developers to focus on what exactly the user is requesting. For example:

HELLO ALICE. CAN YOU PLEASE TELL ME WHAT LINUX IS

From this sentence we can attempt:

<pattern>HELLO <name/> *</pattern>
<template><srai><star/></srai></template>

We have now reduced the input to:

CAN YOU PLEASE TELL ME WHAT LINUX IS

From this sentence we can attempt:

<pattern>CAN YOU PLEASE *</pattern>
<template><srai><star/></srai></template>

We have now reduced the input to:

TELL ME WHAT LINUX IS

From this we can finally attempt:

<pattern>TELL ME WHAT * IS</pattern>
<template><srai>DEFINE <star/></srai></template>

We have now reduced it to its simplest input form:

DEFINE LINUX

If you're thinking this may be a lot of work to start from scratch, you may be right. Dr. Wallace and his collaborators have developed the A.L.I.C.E. personality after more than five years of research. Fortunately, he has released A.L.I.C.E. and its 30,000 categories under GNU Public license for all to share.

When I discovered A.L.I.C.E. about six months ago, I added my own items, such as Database Pooling and JavaScript support (via Mozilla's Rhino). Combined with JavaScript, a developer now has the ability to determine items at runtime rather than static patterns.

That's a basic introduction to the world of A.L.I.C.E., but there's far more to be learned and explored than just chatterbot technology (in fact A.L.I.C.E. is used on the Web site for the Steven Spielberg movie A.I. Artificial Intelligence, and powers Ramona, Ray Kurzweil's artificial intelligence project).

Recently, Dr. Wallace and his collaborators established the A.L.I.C.E. Artificial Intelligence Foundation, a nonprofit corporation, to promote the adoption of A.L.I.C.E. and AIML technology worldwide.

Following the precedents established by other open-source nonprofits, such as the Free Software Foundation, the Apache Foundation, and the Python Foundation, the A.L.I.C.E. A.I. Foundation will protect and preserve the open-source software, making it available to all commercial players equally.

Just be careful the next time you're chatting with someone on the Internet: "someone" may turn out to be an Alicebot.

Acknowledgment
Special thanks to the members of the Alicebot mailing list ([email protected]) for their continued support of the project.                       .

Resources

  • A.L.I.C.E. AI Foundation: www.alicebot.org
  • The Alicebot.Net AI Project: www.alicebot.net
  • A.I.:Artificial Intelligence: http://aimovie.warnerbros.com
  • AgentLand (Cybelle): www.agentland.com
  • AIML Programming Language: www.alicebot.net/aiml/index.html
  • AIML Builder 1.0 by Bram Rooijmans: www.infobots.nl/Downloads/AIMLBuilder100.zip
  • MacALICE by Joost Van Brug: www.extrapink.com/alicemac
  • Open Source Foundation: www.opensource.org
  • More Stories By Jon Baer

    Jon Baer is a Java, Speech, and VoiceXML developer for MTV, Musicphone, Inc., and the lead developer for the Alicebot.Net AI Project. He has been developing wireless application for the past 3 years (including ThinAirMail 1.4 for PalmVII) and is currently working on an open source speech enabled Alicebot browser. Jon recently presented A.L.I.C.E. to the Interactive Telecommunications Program at New York University. He lives in Brooklyn, New York.

    Comments (1) View Comments

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    Most Recent Comments
    edward siew 05/23/03 12:44:00 PM EDT

    ai

    IoT & Smart Cities Stories
    SYS-CON Events announced today that IoT Global Network has been named “Media Sponsor” of SYS-CON's @ThingsExpo, which will take place on June 6–8, 2017, at the Javits Center in New York City, NY. The IoT Global Network is a platform where you can connect with industry experts and network across the IoT community to build the successful IoT business of the future.
    IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
    The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
    CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
    Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
    DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
    Disruption, Innovation, Artificial Intelligence and Machine Learning, Leadership and Management hear these words all day every day... lofty goals but how do we make it real? Add to that, that simply put, people don't like change. But what if we could implement and utilize these enterprise tools in a fast and "Non-Disruptive" way, enabling us to glean insights about our business, identify and reduce exposure, risk and liability, and secure business continuity?
    DXWorldEXPO LLC announced today that Telecom Reseller has been named "Media Sponsor" of CloudEXPO | DXWorldEXPO 2018 New York, which will take place on November 11-13, 2018 in New York City, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
    The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
    Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...