CS 480/580 Assignments
NOTE: As of November 15, 2009,
there are two more assignments left to do!
Assignment 9 - Due
November 16, in class - DEADLINE EXTENDED TO NOVEMBER 18, by popular
request - Put papers in Prof. Marling's Stocker mailbox or under
her office door by 5:00 PM on Wednesday, November 18
Peter Norvig has kindly put a simple Common LISP Eliza program
from his book, Paradigms of AI Programming, in the public domain.
This assignment is to implement your own simple chatbot, using
and extending the available code.
Notes about your Chatbot:
- Select one conversational topic for your chatbot.
Your chatbot should not be a psychoanalyst, but might
talk about soccer, chocolate, music, Hawaii, etc.
The possibilities are endless... use your imagination!
- Change the prompt in the Eliza code to display your chatbot's
name. Then change the code so that your chatbot responds to
the user in their own way.
- Unlike Norvig's Eliza, your chatbot should never
respond with NIL. Come up with some reasonable defaults,
like, "Oh, that's very interesting..." for uncovered situations.
- Cover as many situations as possible within the scope
of the conversational topic you choose.
Notes about Norvig's Code:
- Download the two files,
AUXFNS.LSP and
ELIZA1.LSP. Make sure you download them
as plain ASCII files (which is not necessarily your browser's default),
or you could have trouble using them in gcl.
- To run ELIZA1.LSP, you need to load AUXFNS.LSP and then ELIZA1.LSP
into the interpreter.
- Fully understanding the auxiliary functions in
AUXFNS.LSP is beyond the scope of this class. Take advantage of modular
abstraction and use the included functions without worrying about their guts.
(Note that you don't actually use most of this code. This is the
auxiliary file for his whole book.)
- You can and should understand the ELIZA1.LSP file. However,
you should expect it to take some time for you to understand it.
The only
conceptually new feature is the use of association lists and dotted pairs,
which is explained in the LISP PowerPoint slides. Some new functions are
used, and some familiar functions are used with new names. For example,
Norvig has adopted the style of calling
car first and cdr rest.
- The ELIZA1.LSP code is (intentionally) not very complete.
One irritating feature is that Eliza does not know how to exit when
you say goodbye. Implement this small extension before implementing
your chatbot, both to familiarize
yourself with the code and to make the code easier to test.
Your chatbot must
be able to exit gracefully.
Turn in:
- A paragraph describing your chatbot's topic and explaining
why someone might
want to converse with your chatbot
- Your complete LISP program, appropriately commented
- A printed typescript of your system holding a conversation
To get a printed typescript containing a
LISP session in a file, right before you enter the interpreter,
enter script
at the UNIX prompt. This will save everything you do in a file named
typescript. (It is a good idea to rename this file ASAP, because each
time you do this the old typescript file is overwritten.) When you
are finished working in the interpreter, enter
<Control> D
at the UNIX prompt. This will stop saving your work and close the
typescript file.
This assignment is to be turned in, on paper, during class.
Email submissions are not acceptable for this assignment.
Assignment 8 - Due November 15, by midnight
The purpose of this assignment is to help you prepare for the final exam.
Submit a question, or questions, for possible inclusion on the final exam.
Remember that it must be possible to answer the question(s) within the two
hour exam period without the use of books, notes, or calculators. Choose
one (1) of the following question formats:
- True/False: If you choose this option, submit eight (8) statements
that are either true or false. Tell if each statement is true or false.
For each false statement, explain why the statement is not true.
- Multiple Choice: If you choose this option, submit four (4)
multiple choice questions. Each question should have four (4) possible
answers, only one of which is correct. Indicate which of the four
answers is correct for each question.
- Fill in the Blanks: If you choose this option, submit eight (8)
sentences with blanks in them for the test-taker to fill in.
Vocabulary terms, numbers, and other very short answers make good
fill-in-the-blank items. Provide the correct answers.
- Program It: If you choose this option, describe one LISP function or
Prolog program for the test-taker to write. It must be possible to
write the function/program in ten lines of code or less.
Provide the correct solution.
Notes:
- Submit your assignment by Email to marling@ohio.edu
- The subject line for your Email should be: CS 480/580: Assignment
8 from <your name>
- Make sure that your Email message contains only plain ASCII text.
- Remember to sign your name to your message and to send a copy of the
message to yourself.
- It is pretty hard to lose points for this assignment, but you can
do it if your assignment is late, incomplete, in a non-ASCII format, or
if you answer your own questions wrong. It would not be too hard to
complete this assignment quickly... however, time and effort spent
on this will most definitely pay off on the final exam.
- I reserve the right to use zero or more of your questions on the
final exam.
Previous Assignments
Descriptions of the previous assignments are available
by clicking here.
Prof. Cindy Marling,
marling@ohio.edu .