COSC 387: Artificial Intelligence

Project 4
Spring 2008

Due: Fri, Apr 11 @ 5 P.M.
13 points

  1. Using a language of your choosing, implement Neapolitan’s algorithm for probability propagation in trees. Your implementation must be general, meaning that it must work for any tree-structured Bayesian network.

  2. Test your implementation using the example from lecture involving the patients who participated in a drug study. Implement this test as example1. It should instantiate the evidence that the doctor has encountered a cured patient and print the probability that the patient was part of the drug study.

  3. Test your implementation using Neopolitan’s “cheating spouse example” (Section 6.2.2). Implement this test as example2. It should instantiate the evidence that the spouse is reported seen dining with another and print the probability that a strange man/lady calls on the phone.

Instructions for Electronic Submission

In the header comments of the primary file, provide the following information:
;;;;
;;;; COSC 387 Project 3
;;;; Name
;;;; E-mail Address
;;;; Platform: Windows, Linux (seva), etc.
;;;; Lisp Environment: clisp, gcl, cmucl
;;;;
;;;; In accordance with the class policies and Georgetown's Honor Code,
;;;; I certify that, with the exceptions of the course materials and those
;;;; items noted below, I have neither given nor received any assistance
;;;; on this project.
;;;;

If you need to submit a single file, assuming its name is p4.lisp, type

seva% java -jar submit.jar -a p4 -f p4.lisp
If you need to submit multiple files, if you haven't already, place all of your code in a subdirectory named p4. To create this subdirectory, type
seva% mkdir p4
To descend into the directory, type
seva% cd p4
All of the files for your project should be in this directory. The submit program should be above this directory:
seva% ls ..
p4/ submit.jar

If you need to include a message to me about your submission, then place the message in a file named README. Place the README file in the project's directory.

To move up from the p4 directory, type

seva% cd ..
You should be above the p4 directory:
seva% ls
p4/ submit.jar

(Additional useful Unix commands)

When you're ready to submit, change the name of the directory to your netid. For example, if your netid is maloofm, then rename the directory p4 by typing

seva% mv p4 maloofm
Create a zip file of the directory and its contents by typing
seva% zip -r p4.zip maloofm/*
This command creates a zip file named p4.zip by recursively (-r) copying all of the files (*) from the directory maloofm/.

To submit the zip file type

seva% java -jar submit.jar -a p4 -f p4.zip
p4 is the name of the assignment (-a) and p4.zip is the file (-f) to be submitted for that assignment.

If the program submits the file successfully, you will receive a receipt by e-mail at the address <netid>@georgetown.edu.

Submit your project only once.

Once you've submitted your project, it is important to keep an electronic copy on a university machine (e.g., seva) that preserves the modification date and time. If we lose your project or the submission system breaks, then we will need to look at the modification date and time of your project to ensure that you submitted it before it was due.

You can also change the directory's name back to the original name. For example,

seva% mv maloofm p4
Note that changing the name of the directory does not change the dates of the files in the directory. You can also remove the zip file from your directory:
seva% rm p4.zip

You must submit your project before 5 PM on the due date.

Plan B

If something goes wrong with submit, then send your project as an attachment to an e-mail to me. Remember that UIS strips zip files from e-mails, so rename your zip from p4.zip to p4.piz, or something like that.

Copyright © 2019 Mark Maloof. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.