IMGD 4000 (D 08)
Individual Homework Assignment #4
Darkstar Chess
Due by Web Turn-In: Midnight, Sunday, April 6
(See general homework instructions for turn-in details.)
The goal of this fourth assignment in the sequence of five is to set up an online server for playing chess using the Darkstar framework. The client side of this assignment will also be used as your entry into the Darkstar-mediated computer chess tournament on the last day of class.
Here's instructions for how to get started working on this assignment:
As an aid to development, we are providing the following two small Java class definitions for you to download. Both of these are initially defined in the unnamed package. Feel free to edit them as needed to integrate them into your code.
- The class ChessProtocol defines the communication protocol to be used between the chess client and server. This will make it possible for all of your assignments to communicate in the tournament. Following a common Java convention, the main method of this class is a test program which illustrates how the class is intended to be used.
- The class InOrderTree defines an abstract class for performing a depth-first ordered tree search without exceeding the time limit for Darkstar tasks (threads). It should be straightforward to implement your minimax search as an extension of this class.
Here are some additional special instructions regarding how to turn in your homework:
- Copy the following files to your turnin directory: sgs-client.jar, mina-core-1.1.jar, slf4j-api-1.4.0.jar, slf4j-jdk14-1.4.0.jar
- Add 'sgs-client.jar' as shown below to the Class-Path declaration in the manifest.mf file in your turnin directory:
Class-Path: ../../jme/bin/ ../../jme/lib/lwjgl.jar sgs-client.jar
- Create a file named 'darkstar.properties' in your turnin directory with the following contents:
com.sun.sgs.app.name=Chess
com.sun.sgs.app.root=.
com.sun.sgs.app.port=1139
com.sun.sgs.app.listener=Chess
- Create an empty directory named 'dsdb' in your turnin directory. This is where the data will be stored for your chess server whenever you start it with the sgs command below. You will need to delete its contents every time you want a fresh run of the server.
- Use the same procedure for creating a jar file as for previous assignments, except make sure to also include both your server and client code in the same jar file.
- To test your homework, in the turnin directory, first start the server using the following command (assuming you named your jar file for this assignment 'darkstar.jar');
sgs darkstar.jar darkstar.properties
- Then start your client as usual with the command:
java -Djava.library.path="../../jme/lib" -jar darkstar.jar
Technical Requirements
Please post any questions to the myWPI discussion board for the course.