Project Phase #4 - COMP 303

Running a Competition

The purpose of this milestone is to design and implement a tournament for ants. The input will be three directory names, a directory containing a collection of worlds, a collection of ants and a directory to hold the output files.

The tournament should simulate, for each each world, a competition for each pairing of ants (for the two different mappings of ants to red/black). An ant should not be paired with itself. The total score for an ant will be the total of all food collected over all worlds and all pairings.

Your program should be designed to that it could easily support different output kinds (for example, ordinary text, XML, HTML). You must implement at least one of the output kinds, although more would be nice. The common theme of the outputs is that there should be:

You should be able to invoke your tournament using:

java ant.Tournament <WorldDir> <AntDir> <ResultDir>

where the arguments give the directory names for the worlds, the ants, and where the results should be put.

What to hand-in

  1. A discussion of the design for this milestone. In particular, what kinds of outputs do you support and how did you design it so it was easy to support several kinds of output. (hardcopy)
  2. A discussion of the sorts of JUnit tests you implemented. (hardcopy)
  3. An example of your output(s) running a tournament on all the worlds in http://www.sable.mcgill.ca/~hendren/303/AntCompetition/worlds/ and all the ants (these are the winning ants from the ICFP contest) in http://www.sable.mcgill.ca/~hendren/303/AntCompetition/contest_ants/. A tar.gz file of all the worlds and ants can be found at http://www.sable.mcgill.ca/~hendren/303/AntCompetition/tournament.tar.gz. You can untar this using tar zxvf tournament.tar.gz . (hardcopy)
  4. The html generated using javadoc for your implementation.
  5. The build.xml file needed for your project to date. This should support targets for init , clean , compile , build , javadoc and junit .
  6. Your build target should now generate another .jar file, tournament.jar . You should be able to run the tournament using java -jar tournament.jar.
You should hand in a hardcopy for questions 1, 2 and 3. In addition, you should e-mail to the TA a file YourLastname.jar file which has the following directory structure.
YourLastName/
           README
           build.xml   build file for  ant  
           bin/        any scripts you have developed 
           classes/    where your generated classes go 
           design/     any online design documentation 
           doc/        where your generated javadoc html goes  
           lib/        where generated .jar files go 
           src/        java/aspectj/junit source files for your project 
                          (organized into a good package structure) 
You can create a clean directory (that does not have the hidden svn files) using:
 
  svn export YourSVNWorkingDirectory YourLastName 
to export a clean copy of your project to a directory called YourLastName.

You can create the jar file by using:

   jar -cvf YourLastName.jar YourLastName 
to create the jar file to send to the TA.