CSCI.4430/6969 Programming Languages Spring 2010
Programming Assignment #3

This assignment is to be done either individually or in pairs(Please follow the submission requirements!). 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 RPILMS 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 RPILMS 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(updated on April 19). 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.

Note:The theaters.txt is a text file, the first line of which is the location of the nameserver and the rest are locatons of theaters. An example of theaters.txt:

monica.cs.rpi.edu:3030
barbara.cs.rpi.edu:4040
jupiter.cs.rpi.edu:4040
ashley.cs.rpi.edu:4040

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 Thursday, 04/29, 11:59 PM +10%
Before Friday, 04/30, 11:59 PM no modification (on time)
Before Saturday, 05/01, 11:59 PM -10%
Before Monday, 05/03, 11:59 PM -25%
After Tuesday, 05/04, 12:00AM 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 RCSID 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 RPILMS). Please submit your file via RPILMS. Your submission file should NOT include any of the files provided in chess.zip.