CSCI.4430/6969 Programming Languages Fall 2006
Programming Assignment #2

This assignment is to be done either individually or in pairs. Do not show your code to any other group and do not look at any other group's code. Do not put your code in a public directory or otherwise make it public. However, you may get all the help you need from the TA or the instructor. You are encouraged to use the WebCT Discussions page to post questions so that other students can also answer and see the answers. Students are encouraged to work in pairs. Students working individually will be graded in the same manner as students working in pairs. You are encouraged to post to WebCT if you are unable to find someone to work with.

A Distributed Chess Player in Salsa

Computerized chess players are rather common. One way to improve the performance of a chess program is to use distributed computing, thereby allowing it to potentially perform a deeper search for best possible moves. Your goal in this assignment is to produce a distributed version of a chess program which will evaluate different branches of a search tree on different computers.

Part 1 - 70%

Download chess.zip. In addition to a readme file which you should read, it includes a sequential chess package (chess.jar) and an interface (the submit directory). submit/Sample.java is a simple Java program which, given a search depth and a chess position, outputs a move sequence with the strongest value. It runs sequentially.

Produce a distributed version of this program in Salsa, which performs the same task using multiple actors. Your program should output all the strongest move sequences. Your program should read in a file, theaters.txt, with the names of the theaters where actors are to be created. Your program should access the UNMODIFIED chess package functionality ONLY through the UNMODIFIED interface files.

Part 2a - 25%

Create a new version of the above program which uses load balancing. That is, no theater should be idle while other theaters have multiple actors doing work. This can be performed by sending a work-stealing message from idle to busy theaters.

Part 2b - 5%

You can test load balancing by creating all actors on a single theater and seeing if the other theaters are stealing work. Include the test code and an explanation of the results in your submission.

Extra Credit :

Due Date:
Received Time Grade Modification
before Monday, November 13, 11:55PM +5%
before Tuesday, November 14, 11:55PM no modification (on time)
before Wednesday, November 15, 11:55PM -10%
before Friday, November 17, 11:55PM -25%
after Friday, November 17, 11:55PM not accepted

The assignment will be graded mostly on correctness, but code clarity / readability will also be a factor (comment, comment, comment!). Be sure your solutions are robust.

Submission Requirements: Your code should consist of part1 and part2 directories with their corresponding Salsa files, plus a README file for both. Combine these into a single ZIP file with your WebCT user name(s) as the filename, either userid1.zip or userid1_userid2.zip. Only submit one assignment per pair (the other does not need to submit anything via WebCT). Please submit your file via WebCT. Your submission file should NOT include any of the files provided in chess.zip.