Artificial Intelligence Markup Language
Filename extension .aiml
Developed by Dr. Richard S. Wallace
Initial release August 3, 2001; 10 years ago (2001-08-03)
Latest release 1.0.1 / October 25, 2001; 10 years ago (2001-10-25)
Type of format Artificial intelligence
Extended from XML

AIML, or Artificial Intelligence Markup Language, is an XML dialect for creating natural language software agents.



The XML dialect called AIML was developed by Richard Wallace and a worldwide free software community between the years of 1995 and 2002. It formed the basis for what was initially a highly extended Eliza called "A.L.I.C.E." ("Artificial Linguistic Internet Computer Entity"), which won the annual Loebner Prize Competition in Artificial Intelligence[1] three times, and was also the Chatterbox Challenge[2] Champion in 2004.

Because the A.L.I.C.E. AIML set was released under the GNU GPL, and because most AIML interpreters are offered under a free or open source license, many "Alicebot clones" have been created based upon the original implementation of the program and its AIML knowledge base. Free AIML sets[3] in several languages have been developed and made available by the user community. There are AIML interpreters available in Java, Ruby, Python, C++, C#, Pascal, and other languages (see below). A semi-formal specification[4] and a W3C XML Schema for AIML[5] are available.

Elements of AIML

AIML contains several elements. The most important of these are described in further detail below.


Categories in AIML are the fundamental unit of knowledge. A category consists of at least two further elements: the pattern and template elements. Here is a simple category:

  <pattern>WHAT IS YOUR NAME</pattern>
  <template>My name is John.</template>

When this category is loaded, an AIML bot will respond to the input "What is your name" with the response "My name is John."


A pattern is a string of characters intended to match one or more user inputs. A literal pattern like


will match only one input, ignoring case: "what is your name". But patterns may also contain wildcards, which match one or more words. A pattern like


will match an infinite number of inputs, including "what is your name", "what is your shoe size", "what is your purpose in life", etc.

The AIML pattern syntax is a very simple pattern language, substantially less complex than regular expressions and as such not even of level 3 in the Chomsky hierarchy. To compensate for the simple pattern matching capabilities, AIML interpreters can provide preprocessing functions to expand abbreviations, remove misspellings, etc.


A template specifies the response to a matched pattern. A template may be as simple as some literal text, like

  My name is John.

A template may use variables, such as the example

 My name is <bot name="name"/>.

which will substitute the bot's name into the sentence, or

 You told me you are <get name="user-age"/> years old.

which will substitute the user's age (if known) into the sentence.

Template elements include basic text formatting, conditional response (if-then/else), and random responses.

Templates may also redirect to other patterns, using an element called srai. This can be used to implement synonymy, as in this example (where CDATA is used to avoid the need for XML escaping):

  <pattern>WHAT IS YOUR NAME</pattern>
  <template><![CDATA[My name is <bot name="name"/>.]]></template>
  <pattern>WHAT ARE YOU CALLED</pattern>
    <srai>what is your name</srai>

The first category simply answers an input "what is your name" with a statement of the bot's name. The second category, however, says that the input "what are you called" should be redirected to the category that matches the input "what is your name"--in other words, it is saying that the two phrases are equivalent.

Templates can contain other types of content, which may be processed by whatever user interface the bot is talking through. So, for example, a template may use HTML tags for formatting, which can be ignored by clients that don't support HTML.


AIML is considered clever and simple, and a good start for beginners writing simple bots. However, it is difficult to maintain and author more complex bots, and has weak pattern matching ability. Still, A.L.I.C.E. is a top chatbot, coming in 2nd in the 2010 Loebner Competition.[6]


  1. ^
  2. ^
  3. ^
  4. ^
  5. ^
  6. ^ Bruce Wilcox, Beyond Façade: Pattern Matching for Natural Language Applications

External links

Main Resources

Free / Open Source AIML Implementations

Actively developed:


Examples of Popular Online AIML Bots

AIML Communities & Bot Directories

AIML Resources


Windows XP+


Wikimedia Foundation. 2010.

Поможем решить контрольную работу

Look at other dictionaries:

  • AIML — (Artificial Intelligence Markup Language)  язык разметки для искусственного интеллекта. AIML  подмножество (диалект) XML, он предназначается для создания виртуальных собеседников. Содержание 1 Разработка 2 Элементы AIML …   Википедия

  • AIML — El AIML, o Artificial Intelligence Mark up Language es un lenguaje de programación basado en XML. Fue diseñado específicamente para ayudar en la creación de la primera entidad chatbot informática de lenguaje artificial online o A.L.I.C.E., en sus …   Wikipedia Español

  • AIML — L’Artificial Intelligence Markup Language (AIML) est un langage dérivé de XML utilisé pour gérer la connaissance des avatars et bots (robots virtuels). Ce langage utilise une vingtaine de balises de base. Le AIML a été développé par Richard… …   Wikipédia en Français

  • AIML — Artificial Intelligence Markup Language (AIML) ist eine auf XML basierende Auszeichnungssprache, mit der Chatbots wie z. B. A.L.I.C.E. entwickelt werden können. Ein Chatbot (von engl. chat: plappern und engl. bot: Roboter ) ist ein Programm, das… …   Deutsch Wikipedia

  • Alicebot — An Alicebot is an artificially intelligent software agent that processes natural language (a chatbot). Alicebots use the AI specific XML based programming language AIML, designed by Dr Richard Wallace, a notable AI researcher and creator of the… …   Wikipedia

  • Artificial Intelligence Markup Language — (AIML) ist eine auf XML basierende Auszeichnungssprache, mit der Chatbots wie z. B. A.L.I.C.E. entwickelt werden können. Ein Chatbot (von engl. chat: plappern und engl. bot: Roboter ) ist ein Programm, das sich so verhält, als kämen die… …   Deutsch Wikipedia

  • A.L.I.C.E. — У этого термина существуют и другие значения, см. ALICE (значения). A.L.I.C.E.  виртуальный собеседник, программа, способная вести диалог с человеком на естественном языке. Она создана по подобию первой программы собеседника, Элизы, и… …   Википедия

  • Artificial Linguistic Internet Computer Entity — A.L.I.C.E. (Artificial Linguistic Internet Computer Entity) is an award winning natural language processing chatterbot mdash;a program that engages in a conversation with a human by applying some heuristical pattern matching rules to the human s… …   Wikipedia

  • Charlix — [ Charlix] is an open source desktop assistant project on SourceForge. It is primarily designed for the Linux operating system. It is based in AIML Artificial Intelligence Markup Language, which is an XML dialect… …   Wikipedia

  • Syed Shamsul Hasan — (1885 1981) was an eminent leader of the All India Muslim League during pre partition years. He was the son of a doctor and wanted to follow his father’s footstep. However, his passion for politics led him to Sir Syed Wazir Hasan at an early age …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”