Short answer
A.L.I.C.E. (Artificial Linguistic Internet Computer Entity) is a chatbot created by Richard Wallace, first brought to life on 23 November 1995, that replies by matching what you type against tens of thousands of hand-written patterns stored in a simple markup language called AIML. It has no understanding of meaning, yet careful writing of its rules made it the most human-like program at the Loebner Prize three times, in 2000, 2001 and 2004.
Follow-up question How is a rule-based chatbot like A.L.I.C.E. different from a language model like GPT-3?
If you have chatted with a customer-service bot that seemed friendly but strangely fixed in its answers, you have met a descendant of an idea that A.L.I.C.E. made popular. A.L.I.C.E., short for Artificial Linguistic Internet Computer Entity and often called Alicebot or just Alice, is a chatbot written by the researcher Richard Wallace. It is usually dated to 23 November 1995, the day it "came to life."
Alice does not learn language the way modern AI systems do. Every reply it gives was written in advance by a person. What made it remarkable was the scale and care of that writing, and the simple, open format that let hundreds of volunteers add to it.
Where Alice came from
Alice openly descends from ELIZA, the 1960s program by Joseph Weizenbaum that imitated a psychotherapist by turning a user's statements back into questions. Wallace accepted the comparison. Both programs work by stimulus and response: spot a pattern in the input, return a prepared reply. The difference was size. ELIZA had about 200 rules. Alice grew to roughly 41,000.
The first version of Alice was written in 1995 in SETL, a little-known programming language based on set theory. It was free software from the start, but attracted few helpers until it moved to Java in 1998, in a version code-named "Program A." Program B, launched in 1999, drew more than 300 developers. From November 2000, a newer Java version called Program D was the project's official version, backed by the ALICE A.I. Foundation. The AIML rule files are still available as open source.
The web was the other key ingredient. Because people chatted with Alice online, Wallace could collect large logs of real conversations, something ELIZA's creators never had.
How Alice works
Alice's knowledge is written in AIML, the Artificial Intelligence Markup Language, an XML format Wallace's group designed. The basic unit is a category, which pairs a pattern (what the user might say) with a template (Alice's reply). Patterns can include a wildcard, *, that matches any words.
Here is a category in the style Wallace uses to explain AIML:
<category>
<pattern>DO YOU KNOW WHO * IS</pattern>
<template><srai>WHO IS <star/></srai></template>
</category>
Step by step, this is what happens when you type "Do you know who Ada Lovelace is?":
- Alice searches its categories for the best-matching pattern.
- "DO YOU KNOW WHO * IS" matches, and the wildcard captures "Ada Lovelace."
- The
<srai>tag tells Alice to treat the input as if you had typed "Who is Ada Lovelace," and look again. - If a category exists for that simpler question, its template becomes the answer. If not, Alice falls back on a vaguer, all-purpose reply.
That trick of reducing many phrasings to one standard question is central. So are default categories, the noncommittal replies Alice gives when nothing specific matches. Wallace compared good defaults to a politician's answers: they should suggest understanding without committing to anything or offending anyone.
The patterns are stored in a tree, which Wallace's software calls the Graphmaster, so matching is fast even with tens of thousands of categories.
Try it: Write five patterns and replies for a pizza-ordering bot, including one with a wildcard ("I WANT A * PIZZA") and one default reply for anything else. Then ask a friend to type ten requests, and see how many land on a specific pattern and how many fall through to the default.
Learning by a human teacher
Alice improves, but not on its own. A person called the botmaster reads conversation logs and writes new categories for inputs that got poor answers. Wallace called this supervised learning, because a human supervises every change, and his software included a tool he called "targeting," which finds frequent inputs that lack a specific reply.
Wallace noticed that what people say to a chatbot follows a Zipf-like distribution: a small number of inputs ("Hello," "What is your name?") make up a large share of conversations, while a long tail of unusual sentences appears rarely. The practical strategy follows directly: write answers for the most common inputs first.
He also argued against letting a bot learn freely from the public, since many users deliberately feed chatbots false information. Someone, he wrote, has to separate the wheat from the chaff.
Why it mattered
Alice was ranked the most human computer at the Loebner Prize, the yearly Turing-test competition, in 2000, 2001 and 2004. It never fooled judges into ranking it above the human participants, and a casual user can usually expose its mechanical nature in a few exchanges. But its open format spread widely: volunteers wrote AIML interpreters in many programming languages, and many other bots were built on its rule files.
It reached popular culture too. The filmmaker Spike Jonze has said that chatting with Alicebot gave him the idea for Her, his film about a man who falls in love with an AI.
How is a rule-based chatbot like A.L.I.C.E. different from a language model like GPT-3?
Alice's every answer was written by a person. If no one wrote a category for a question, Alice has nothing specific to say. That makes it predictable and easy to inspect: you can open the file and read exactly why it replied the way it did, and fix it by editing a line.
A language model such as GPT-3, which OpenAI described this spring, works the other way round. Nobody writes its replies. It is trained on an enormous amount of text to predict the next word, and it composes new sentences on the fly. That lets it handle questions no one anticipated, but it also means it can produce confident nonsense, and there is no single rule to correct.
The two approaches can work together. Many practical assistants still use hand-written rules for the parts that must be exact, such as opening hours or prices, and leave open-ended chat to a statistical model.
Sources
- The Anatomy of A.L.I.C.E. — Richard S. Wallace, A.L.I.C.E. Artificial Intelligence Foundation (alicebot.org; later published in Parsing the Turing Test, Springer, 2009)
- Artificial Linguistic Internet Computer Entity — Wikipedia, June 15, 2020