kids encyclopedia robot

ELIZA facts for kids

Kids Encyclopedia Facts
Quick facts for kids
ELIZA
ELIZA conversation.png
A conversation with ELIZA
Original author(s) Joseph Weizenbaum
Developer(s) MIT
Initial release 1966
Written in MAD-SLIP
Operating system CTSS
Platform IBM 7094
Type Chatterbot
License Public domain

ELIZA is an early computer program created by Joseph Weizenbaum at MIT from 1964 to 1967. It was designed to explore how humans and computers could communicate. ELIZA pretended to understand conversations by using a clever trick: it matched patterns in what people typed and then used rules to respond. It didn't truly understand what was being said, but it made users feel like it did.

ELIZA was written in a programming language called SLIP. Most of its "language skills" came from separate files called "scripts." The most famous script was called DOCTOR. This script made ELIZA act like a therapist who often repeated what the user said back to them. Because of this, ELIZA was one of the very first chatterbots (now called "chatbots"). It was also one of the first programs that tried to pass the Turing test, which checks if a machine can think like a human.

Weizenbaum wanted to see how humans and machines could talk to each other. He was surprised when some people, even his own secretary, thought ELIZA had human feelings. This reaction became known as the ELIZA effect. Many experts thought ELIZA could help people, especially those with mental health issues. They believed it could even help doctors. Even though ELIZA could talk, it didn't truly understand. Still, many early users believed ELIZA was intelligent, even though Weizenbaum said it wasn't.

The original code for ELIZA was missing for a long time. It wasn't common to publish computer code back in the 1960s. However, the MAD-SLIP code was found in the MIT archives more recently. It's now available online. This code is important because it shows how programming was done back then. It also shows the early ideas of building software in layers.

How ELIZA Works

Video Game Museum in Berlin (44129332940)
A conversation between a human and ELIZA's DOCTOR script

Joseph Weizenbaum created ELIZA to show that talking between a person and a computer was not deep. ELIZA, especially with its DOCTOR script, could have conversations that seemed like a first meeting with a therapist. ELIZA itself looked for important words, gave them values, and changed what was typed into a response. The script told ELIZA which words were important and how to change them.

Weizenbaum chose the DOCTOR script to avoid needing ELIZA to know a lot about the real world. This way, ELIZA could just repeat parts of what the user said to keep the conversation going. This made ELIZA's responses seem smart, and some early users were fooled.

Weizenbaum named his program ELIZA after Eliza Doolittle. She is a character in a play called Pygmalion. In the play, Eliza Doolittle learns to speak like a fancy person. Weizenbaum said his ELIZA was similar because different users could make it better. But unlike the human Eliza, the computer ELIZA couldn't learn new words or ways of speaking on its own. Changes had to be made directly to its script.

Weizenbaum first built ELIZA using his own SLIP language. Depending on what the user typed, ELIZA could seem very smart or quickly show it wasn't. Some of ELIZA's responses were so convincing that people became emotionally attached to the program. They sometimes forgot they were talking to a computer. Weizenbaum's secretary even asked him to leave the room so she could have a "real" conversation with ELIZA. Weizenbaum was surprised. He later wrote that even short talks with a simple program could make normal people believe strange things.

In 1966, talking to computers using a teletype was new. This was long before personal computers were common. It was also decades before people saw similar programs online or in computer help systems. ELIZA was a big step because it was the first time a programmer tried to make a computer seem like another human in conversation.

In 1972, ELIZA even had a conversation with another early artificial intelligence program called PARRY. ELIZA acted as the doctor, and PARRY pretended to be a patient with schizophrenia.

How ELIZA Responds

ELIZA responds to what a user types by first looking for "keywords." A keyword is an important word chosen by the ELIZA script. Each keyword has a rank, or importance number. If keywords are found, the most important one is put at the top of a list. The computer then changes the user's sentence based on rules linked to that top keyword.

For example, if the DOCTOR script saw words like "alike" or "same," it might say "In what way?" This shows how certain words, chosen by the script, could be changed no matter what else was said. For instance, words like "you" and "I" were often swapped.

After finding keywords, ELIZA applies a "transformation rule." This rule has two parts: a "decomposition rule" and a "reassembly rule." First, ELIZA looks at the sentence for patterns to understand a small part of its meaning. Using the keywords and other words nearby, it tries different rules until it finds one that fits. The sentence is then broken down into parts, as the decomposition rule for the most important keyword says.

For example, if you typed "You are very helpful," ELIZA might change it to "I are very helpful." Then it would break it into parts like (1) empty (2) "I" (3) "are" (4) "very helpful."

The decomposition rule then picks a "reassembly rule." This rule takes the broken-down parts, rearranges them, and adds new words to create a response. Using the example "You are very helpful," the reassembly rule might use the phrase "What makes you think I am (4)." This would result in ELIZA saying, "What makes you think I am very helpful?" ELIZA then shows this new sentence to the user.

These steps are how ELIZA usually creates a response. But ELIZA can also handle special situations. For example, if it doesn't find any keywords, it might say something simple like "I see" or "Please go on." It could also use a "MEMORY" system. This system remembered earlier things the user typed. If no keywords were found, ELIZA could use these old inputs to create a response.

All these functions were part of ELIZA's programming. But the exact way it broke down, looked at, and put together sentences was decided by the script it was running. The script could be changed or a new one created. This allowed ELIZA to be used in many different ways, like the famous DOCTOR script that acted as a therapist.

A version of ELIZA was written in the Lisp language. Another version, written in BASIC, appeared in Creative Computing magazine in 1977. This BASIC version was moved to many early personal computers and then translated into many other languages.

In 2021, the full original ELIZA code in MAD-SLIP, including the DOCTOR script, was found in MIT's archives. The Weizenbaum family allowed this code to be shared freely. It can be found on the ELIZAGEN website. This 1965 code has been studied by researchers to understand ELIZA's complex history.

In December 2024, engineers successfully rebuilt the original ELIZA using most of the discovered 1965 code. They showed that this rebuilt ELIZA could almost perfectly repeat conversations from Weizenbaum's 1966 paper. This was done on a computer system that copied the original MIT CTSS and 7094 computer.

Another popular version of ELIZA is found in GNU Emacs, a text editor. You can access it by typing `M-x doctor`.

External links

  • ELIZAGEN - Weizenbaum's original code for ELIZA
  • Collection of several source code versions at GitHub
  • , a collection of dialogues between ELIZA and various conversants, such as a company vice president and PARRY (a simulation of a paranoid schizophrenic)
  • Weizenbaum. Rebel at work – Peter Haas, Silvia Holzinger, Documentary film with Joseph Weizenbaum and ELIZA.
  • CORECURSIVE #078; The History and Mystery Of Eliza; With Jeff Shrager – Adam Gordon Bell interviews Jeff Shrager, author of the 1973/77 BASIC ELIZA, and discoverer of the original ELIZA code.
  • ELIZA Reanimated ELIZAGen.org blog post describing Rupert Lane's restoration of the original MAD-SLIP ELIZA running on CTSS on a 7094 emulator

See also

Kids robot.svg In Spanish: ELIZA para niños

kids search engine
ELIZA Facts for Kids. Kiddle Encyclopedia.