CS 117: AI Author

Overview

Artificial intelligence is an active and exciting area of computer science. Can computers be made to do tasks that seem "intelligent"? Some of the goals (and partial successes) of artificial intelligence include important areas such as medical diagnosis, drug discovery, and robotics. For this assignment, we will visit the part of artificial intelligence referred to as "natural language processing," i.e. getting a computer to work with a natural language such as English.

More specifically, you will write a program called AIAuthor that will actually write original prose in the style of a chosen human author. Can computers actually be creative? We'll find out!

Details

Find a source text. Specifically, find a text file that contains some text that you want the computer to creatively imitate. Project Gutenberg is a great place to start.

The technique that you will use works conceptually as follows:

Here's an example of some text that my program generates, using a window size of 5 on Grimm's fairy tales:

I will you learn home to taken his way, and around him, and left his come intender him in they cried: 'The little child,' said the other; 'let us for the cloak, and brough the peasant was to King.

Alternatively, when I tried it with a window size of 8, here's what I got one of the times that I ran it:

The servants running across the stables to salt and butter to eat and drink, the head you must get up quickly, and fell fainting to the test.

Final notes

Make sure that you use good object-oriented design. Think carefully about how to layout your program so that you use classes and objects appropriately, and so that your methods remain short and self-contained. Follow the course style guidelines.

Once you get your program running, try to get your program to write the most funny or insightful text that you can. I have created a Caucus conference for the course, titled "Comp Sci 117 Section 2 Spring 2005." Post your favorite results there so we can see them.