Welcome!

Industrial IoT Authors: William Schmarzo, Elizabeth White, Stackify Blog, Yeshim Deniz, SmartBear Blog

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)

    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.


    IoT & Smart Cities Stories
    Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
    Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
    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 standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
    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...
    Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
    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...
    To Really Work for Enterprises, MultiCloud Adoption Requires Far Better and Inclusive Cloud Monitoring and Cost Management … But How? Overwhelmingly, even as enterprises have adopted cloud computing and are expanding to multi-cloud computing, IT leaders remain concerned about how to monitor, manage and control costs across hybrid and multi-cloud deployments. It’s clear that traditional IT monitoring and management approaches, designed after all for on-premises data centers, are falling short in ...
    In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
    Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...