proj1c.dist - CS51 Project 1c: An Infinite Number of...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS51 Project 1c: An Infinite Number of Monkeys Due: Tuesday, 3 March 2009 at 11:59 PM Total Points: 45 (including 5 style points) This is the third part of Project 1. By now, youve worked a bit with dictionaries and queues in the process of learning about interfaces, and then built a generative grammar (Arrr!). In this piece of the project, we will implement a Markov chain babbler. 1 Downloads This project will require you to download multiple files. You will still only need to submit your .scm file. Download the following files from the website and place them in the same directory in which you will be saving your work. proj1c-utils.ss: I/O functions. graph.ss: Undirected graphs with weighted edges. rj-text: Act I of Romeo and Juliet. You may use any subset of this file for your babble. (Or any other text you feel like using, but this one has been pre-formatted for you.) 2 What you must do From now on, well be doing our best to provide an up-front description of what you must actually turn in. The first part of these assignments tends to be write-up, which can be pretty long, and sometimes its hard to tell what the actual exercises are. 2.1 Write-up Markov Chain Babbler Random walk on a graph 1 3 MARKOV CHAIN BABBLER CS51 Project 1c: An Infinite Number of Monkeys Our chosen implementation Logistics and utilities 2.2 Exercises Helper functions and tests for tokens-to-graph . Helper functions and tests for babble-ngrams . Actual babbling, minutes-spent and feedback. Challenge problem, worth no points. Feel free to skip any parts of the write-up that you already understand, but do be sure you dont miss anything youll need for the assignment. The actual exercises begin on page 5. 3 Markov Chain Babbler For this portion of the problem set, you will implement a babbler in Scheme using a probabilistic algorithm. A Markov chain is, loosely defined, a chain built by choosing each link with a probability based on no more memory than a few preceding links in the chain. A Markov chain is thus essentially a random walk on a graph. You start with a graph with some nodes and edges (links) between them; at each node, you choose semi-randomly where to move based on some information you have about the probabilities associated with each of the edges that you might choose to follow. This algorithm can be used to model natural language, where each link is a clearly defined piece of the language. Such links could be phonemes, letters, words, or even phrases. For this assignment, we will use words, punctuation marks, and end-of-paragraph ( eop ) for our links. All of our words, including eop , will be represented in Scheme as symbols , which is a data type that we havent discussed yet this semester. You dont need to know much about symbols; basically, eop may appear in your Scheme interpreter with a single quote in front of it. Note also that Scheme might represent lists with a single quote in front; this isfront of it....
View Full Document

Page1 / 10

proj1c.dist - CS51 Project 1c: An Infinite Number of...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online