An Interactive Story Telling System
Due: Saturday September 30, 2006 at 11:59pm

We saw how Eliza works as a simple production system. There is a genre of games known as interactive fiction (text adventures) and it is a genre that is alive and well on the internet. For a sample of how they work, please see:

Beginner Resources for Interactive Fiction
How to play interactive fiction

The goals of this homework are the following:

  1. To develop a short, interactive fiction program
  2. To develop a very basic natural language processing system for your storytelling using key words and pattern matching
  3. To be creative and have fun


Project Specifics

Please read Chapter 20 on "Understanding Language" from your book. It may give you ideas on how to implement language parsing.

You may write your program in any higher level language that works on the Suns and has a regular expression library. Flex/Bison, Perl and Java are examples of appropriate languages. It is highly suggested that you use regular expressions to help with word/grammar matching in your program. If you are unsure of what regular expressions are or don't remember them, please see my PLC web page for assistance. All code MUST work on the Sun machines. I will not grade work that doesn't compile/run on the target machines.

For your natural language processing system, you should separate the data (storyline, commands that can be typed) from the actual implementation of the interactive story. As an example, you could have a text file that has key words and links them with associated commands. Methods in your program would then deal with this mapping appropriately. This allows for future expansion and the possibility for different stories. The format you use for your data may be in any format you wish, but it should be in ASCII text so that I can look at it easily.

The story itself should be playable in a 15-minute time period (it should be short) and should use a variety of commands typed in simple natural language. Examples of natural language include "I hate you.", "Go left.", and "Turn the dial right.". The case of letters should not matter in your program and you may use one word responses, but please keep this to a minimum. Remember that you will be graded on the AI in your program, so don't take a lot of short cuts in conversational responses. Straight text input/output is just fine. Try to think of multiple ways a person can say things so that people going through your story to not easily become frustrated and give up. You may take material from existing stories and books (fairy tales and children's books are good resources), but make sure you do not take from copyrighted materials if you wish to publish your work on a web site.

In addition to your program, you will submit files that describe the architecture of your program, the story it tells, and that answer the following questions:

  1. What is the architecture of the AI for the program? Is it some kind of production system or other kind of system? What kinds of pattern matching are you doing in the program? Please be specific in your answers.
  2. Do you consider your story "playable" as submitted? Please note why it is not really playable if you feel this way. Note: stories can be complete for the purposes of the assignment, but still not playable for other reasons.
  3. How would you make your interactive story teller better from an AI perspective? Your answer to this question should be detailed.


Collaboration

All graduate students should work individually. Undergraduates may work on and submit this project with another student as stated in the syllabus. For the purposes of this assignment, you are expected to show more work done at the end of the project. As an example of "more work", your program may have a GUI, may have a good help/hint system, or may just allow for a wide variety of commands and different ways they can be said. If you choose to work with another student, both of you should contribute significantly to the whole programming project. You should submit only one copy of the project with both of your names on it. The required questions files should be answered individually. You should only submit work that is completely your own and you should be able to explain your work to me.


Submission

For your particular homework there are several submissions:

  1. (0 points) You must all register for the course separately as the course registration gives me info. on where to send your email. This course is section 1. The registration command is:

    try jdb-grd register /dev/null

  2. (50 points) Submitting the files needed for a working program. Submit program files with the command:

    try jdb-grd hmwk1-1 *.*

    The *.* above represents any files (such as the required data files) as well as program files.

  3. (20 points) A description of your program including a story synopsis, how to run the program, and any other information I may find helpful when testing your program.

    try jdb-grd hmwk1-2 description.txt *.*

    The *.* allows you to have pictures or pdf submissions. Please do not submit MS Word docs for this part of your submission.

  4. (30 points) Text answers to the questions posed above.

    try jdb-grd hmwk1-3 answers.txt

  5. (helps with the above credit) An optional writeup file in which you can describe any problems that you might have had and any difficult-to-understand code that you might have created. You are more likely to get partial credit if you are aware of your problems and describe them to me. The writeup file command is:

    try jdb-grd hmwk1-4 problems.txt

You can resubmit as often as you like before the deadline. try will be open for the 1-day grace period after the deadline.
If you work as a pair, you should submit all program files from one account and both partner's names should appear on all submitted files.