Worksheet #7
Eliza the Psychiatrist
Name ______________
You can find the Eliza program at /home/atlas1/ai/eliza.lsp
Or use a newer syntax version at /home/atlas1/ai/shrink2000.lsp
FOR A SAMPLE SESSION WITH ELIZA, go here.
1. Modify Eliza
Or use shrink2000.lsp, a version with newer syntax.
Modify so that instead of always using a "punt" it alternately uses a punt or a
reference to a previous item of dialog. You need to have a queue to store some
matched fragment in at least two of the production rules. The result of this
enhancement might be:
EARLIER YOU MENTIONED THAT YOU GROOMED YOUR DOG FLUFFY
A PUNT (random "filler"-type phrase)
A PUNT
LET'S DISCUSS THE FACT THAT YOU ATE 7 PIZZAS IN ONE DAY
A PUNT
A PUNT
2. a. Increase the number of punts (the random "filler" responses) to at least 12.
b. Change the verb list - add to it
c. Change the standard responses for LOVE, DREAM, etc.
3. a. Have a "family-check" or something similar so that you maintain a list of family
members such as mother, father, sister, sibling, etc, and when this family member
name comes up anywhere in the input you put it in the queue along with whatever
question you want to ask.
Example:
Your input
"I saw my sister on the roof of our house."
The response
"Let us go back to your remark about your <family member name>"
b. you maintain a list of verbs to check which you put into a queue. You will either
give a bland or a cheerful response. (These should be alternating among a list of
several adjectives such as "marvelous", "wonderful", "super", etc.)
Example:
Your input:
"I skateboarded in the pond behind our house." (skateboard* is a verb to check)
The immediate response (if using cheerful mode):
"How marvelous that you can skateboard."
and put on the queue (for later use) would be:
"Let us go back to skateboarding"
Hint: Look at the "you-me map" for ideas on this
Turn in:
Cover Sheet
Code (circle or highlight changes)
TEACHER CHECKS RUNS