ELIZA facts for kids
ELIZA was one of the very first computer programs that could talk to people using natural language. It was created between 1964 and 1967 at MIT by a scientist named Joseph Weizenbaum. ELIZA was designed to explore how humans and machines could communicate.
ELIZA worked by looking for certain words and patterns in what a person typed. Then, it would use special rules to create a reply. This made it seem like the program understood what you were saying, even though it didn't really "think" or "understand" like a human.
The most famous part of ELIZA was a script called DOCTOR. This script made ELIZA act like a therapist. It would often ask questions or reflect back what the person said, which is a common technique in that type of therapy. Because of this, ELIZA was one of the first "chatterbots" (what we now call "chatbots"). It was also one of the first programs to try to pass the Turing test, which is a test to see if a computer can trick a human into thinking it's another human.
Joseph Weizenbaum, ELIZA's creator, was surprised by how people reacted to it. Some people, including his own secretary, started to believe ELIZA had human-like feelings. Many experts thought ELIZA could help people, especially those with mental health issues. But Weizenbaum always said ELIZA didn't truly understand.
The original instructions (source code) for ELIZA were lost for a long time. But recently, they were found in the MIT archives! This discovery is very important because it shows how programming was done back then and how early computer programs were built.
What Is ELIZA?
ELIZA was a computer program that could have simple conversations. Joseph Weizenbaum created it to show that talking to a computer could feel very real, even if the computer didn't truly understand. ELIZA is best known for acting like a therapist, but this was due to the special instructions in its DOCTOR script.
ELIZA worked by looking for keywords in what you typed. It would then use rules from its script to change your words into a reply. The DOCTOR script was chosen because it didn't need the program to know a lot about the real world. It just needed to reflect what the person said to keep the conversation going. This made ELIZA's responses seem quite smart, and some early users were fooled!
Weizenbaum named his program ELIZA after a character named Eliza Doolittle from a play called Pygmalion. In the play, Eliza Doolittle learns to speak with a fancy accent. Weizenbaum thought his ELIZA program was similar because different users could "improve" it by changing its scripts. However, unlike the human Eliza, the computer ELIZA couldn't learn new ways of speaking on its own. Any changes had to be made directly to its instructions.
Weizenbaum first built ELIZA using a programming language called SLIP. Some of ELIZA's replies were so convincing that people became emotionally attached to the program. Weizenbaum's own secretary even asked him to leave the room so she could have a "private" conversation with ELIZA! Weizenbaum was shocked by this, realizing how easily people could believe a simple computer program had human feelings.
In 1966, talking to computers was very new. This was long before personal computers were common or before most people used internet services like Ask.com. ELIZA was a big step because it was the first time someone tried to make a computer seem like it was having a human-to-human conversation.
In 1972, ELIZA even had a conversation with another early artificial intelligence program called PARRY. ELIZA acted as the doctor, and PARRY was designed to act like a patient with schizophrenia.
How ELIZA Works
Weizenbaum created ELIZA to allow natural conversations with a computer. To do this, he had to solve five main problems:
- Finding important words (keywords).
- Understanding a small part of the conversation.
- Choosing the right way to change words.
- Creating replies even when no keywords were found.
- Allowing people to change ELIZA's instructions (scripts).
ELIZA didn't have its own understanding of the world. Instead, it relied completely on the instructions in its script to know how to respond.
When you typed something to ELIZA, it first looked for "keywords." These were words that the ELIZA script marked as important. Each keyword had a "rank" or importance number. The program would put the most important keywords at the top of a list. Then, it would use rules linked to that top keyword to create a reply.
For example, if the DOCTOR script saw words like "alike" or "same," it might reply with "In what way?" This is because these words had a high rank. ELIZA could also change pronouns, like switching "you" to "I" and "I" to "you," because these words also had high importance.
After finding keywords, ELIZA would use "transformation rules." These rules had two parts: a "decomposition rule" and a "reassembly rule."
First, the "decomposition rule" would break down your sentence into smaller parts. It looked for patterns to understand the basic meaning. Weizenbaum gave an example: if you typed "You are very helpful," ELIZA might change it to "I are very helpful." Then, it would break this into parts like "(1) empty (2) 'I' (3) 'are' (4) 'very helpful'." This rule helped ELIZA pull out the important words and information.
Next, the "reassembly rule" would put these parts back together to form ELIZA's reply. It would take the broken-down pieces, rearrange them, and add new words from its script. Using the same example, a reassembly rule might take the parts and fit them into the phrase "What makes you think I am (4)?" This would result in ELIZA replying, "What makes you think I am very helpful?"
These steps were how ELIZA usually created its responses. But ELIZA could also handle special situations. For instance, if it couldn't find any keywords, it had two ways to respond:
- It might say something general like "I see" or "Please go on."
- It could use a "MEMORY" feature. This feature remembered things you had said earlier. If ELIZA didn't find keywords, it might use something from your past conversation to create a reply.
All these functions were built into ELIZA's main program. But the specific way it broke down, examined, and rebuilt sentences was decided by the script it was running. Scripts could be changed or new ones created. This allowed ELIZA to be used in different ways, like the famous DOCTOR script that acted like a therapist.
Many different versions of ELIZA were created over the years. A version written in a language called BASIC became very popular in the 1970s and was used on many early personal computers.
In 2021, the complete original instructions (source code) for ELIZA were found in the MIT archives. This code, including the DOCTOR script, has now been made available for everyone to see and use.
You can even find a version of ELIZA in a popular computer program called GNU Emacs. If you type `M-x doctor` in Emacs, you can chat with a version of ELIZA!
See also
In Spanish: ELIZA para niños
- ELIZA effect
- ChatGPT