Welcome!

Machine Learning Authors: Progress Blog, Elizabeth White, Jason Bloomberg, Dan Blacharski, Darren Anstee

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

    @CloudExpo Stories
    Mobile device usage has increased exponentially during the past several years, as consumers rely on handhelds for everything from news and weather to banking and purchases. What can we expect in the next few years? The way in which we interact with our devices will fundamentally change, as businesses leverage Artificial Intelligence. We already see this taking shape as businesses leverage AI for cost savings and customer responsiveness. This trend will continue, as AI is used for more sophistica...
    Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, discussed some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he covered some of the best practices for structured team migration an...
    Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, discussed how given the magnitude of today's application ...
    The “Digital Era” is forcing us to engage with new methods to build, operate and maintain applications. This transformation also implies an evolution to more and more intelligent applications to better engage with the customers, while creating significant market differentiators. In both cases, the cloud has become a key enabler to embrace this digital revolution. So, moving to the cloud is no longer the question; the new questions are HOW and WHEN. To make this equation even more complex, most ...
    In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and B...
    As you move to the cloud, your network should be efficient, secure, and easy to manage. An enterprise adopting a hybrid or public cloud needs systems and tools that provide: Agility: ability to deliver applications and services faster, even in complex hybrid environments Easier manageability: enable reliable connectivity with complete oversight as the data center network evolves Greater efficiency: eliminate wasted effort while reducing errors and optimize asset utilization Security: imple...
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
    With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
    The past few years have brought a sea change in the way applications are architected, developed, and consumed—increasing both the complexity of testing and the business impact of software failures. How can software testing professionals keep pace with modern application delivery, given the trends that impact both architectures (cloud, microservices, and APIs) and processes (DevOps, agile, and continuous delivery)? This is where continuous testing comes in. D
    Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the bene...
    Digital transformation is about embracing digital technologies into a company's culture to better connect with its customers, automate processes, create better tools, enter new markets, etc. Such a transformation requires continuous orchestration across teams and an environment based on open collaboration and daily experiments. In his session at 21st Cloud Expo, Alex Casalboni, Technical (Cloud) Evangelist at Cloud Academy, explored and discussed the most urgent unsolved challenges to achieve f...
    The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based infrastructure. Delivering modern applications to end users, therefore, is a constantly shifting challenge. Delivery automation helps IT Ops teams ensure that apps are providing an optimal end user experience over hybrid-cloud and multi-cloud environments, no matter what the current state of the infrastructure is. To employ a delivery automation strategy that reflects your business rules, making r...
    The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
    In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha...
    SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone in...
    Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
    In his general session at 21st Cloud Expo, Greg Dumas, Calligo’s Vice President and G.M. of US operations, discussed the new Global Data Protection Regulation and how Calligo can help business stay compliant in digitally globalized world. Greg Dumas is Calligo's Vice President and G.M. of US operations. Calligo is an established service provider that provides an innovative platform for trusted cloud solutions. Calligo’s customers are typically most concerned about GDPR compliance, application p...
    Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex ...
    In his session at 21st Cloud Expo, Michael Burley, a Senior Business Development Executive in IT Services at NetApp, described how NetApp designed a three-year program of work to migrate 25PB of a major telco's enterprise data to a new STaaS platform, and then secured a long-term contract to manage and operate the platform. This significant program blended the best of NetApp’s solutions and services capabilities to enable this telco’s successful adoption of private cloud storage and launching ...
    You know you need the cloud, but you’re hesitant to simply dump everything at Amazon since you know that not all workloads are suitable for cloud. You know that you want the kind of ease of use and scalability that you get with public cloud, but your applications are architected in a way that makes the public cloud a non-starter. You’re looking at private cloud solutions based on hyperconverged infrastructure, but you’re concerned with the limits inherent in those technologies.