Genetic Algorithm for Rock Paper Scissors Game
Due: Sunday October 22th, 2006 at 11:59pm with a penalty free extension until the 23rd at 11:59pm

Clarifications to the project will be posted here.

Genetic algorithms are useful for searching in a large search space. They have successfully been used to evolve constant values for character related variables in games. This homework assignment takes the basic rock paper scissors game where truly random games allow each player to win 33.3% of the time and puts a GA to work to find strategies for real human players. Real humans DO NOT play randomly and as a matter of fact, strategies have been devised for this game. Please see The Official Rock Paper Scissors Strategy Guide for more information. This is your chance to learn more about the RPS game, have fun creating tests for the GA, and to learn about the coding for a GA.

The goals of this homework are the following:

  1. To devise tests for a GA to learn about RPS
  2. To implement pieces of a genetic algorithm in Java
  3. To test how well your GA works


Game Specifics

Some basic Java code for your assignment is included in a jar file. A random version of the RPS game has been written up and put in the Game.java, RockPaperScissors.java, and PlayRockPaperScissors.java files. The GA.java and FitnessTests.java exist mostly as stubs and need to be filled in by you. There are read/write routines to enable you to save games to files.

Each game will consist of 21 trials/plays and your GA can assume that this part of the game will not change.

The code for viewing the game is simple. If you want to write something better, feel free. What exists is for your convenience.


The Assignment

For this assignment you should:

  1. Create test files for your GA.
  2. Complete the methods in GA and FitnessTests in order to have a working GA.
  3. Experiment with your GA
  4. Create a write-up that includes the following:


Collaboration

You may work on and submit this project with another student as stated in the syllabus, unless you are a graduate student. Graduate students should work individually. If you choose to work with another student, both of you should contribute significantly to the whole programming project. You should submit only one copy of the project with both your names on it. You should only submit work that is completely your own and you should be able to explain your work to me.


Submission

NOTE: TRY IS NOW UP For this particular homework there are 2-3 submissions:

  1. (50 points) Submitting the required code. If you write your own classes, they too can be submitted with the required classes.:

    try jdb-grd hmwk2-1 *.java

  2. (50 points) Submitting the writeup. The writeup may be in text, pdf, or html. I will not accept word docs as submissions. :

    You should also submit any training files that you may have used in training your GA.

    try jdb-grd hmwk2-2 writeup.* *.*

  3. (helps with the above credit) An optional writeup file in which you can describe any problems that you might have had, any difficult-to-understand code that you might have created. You are more likely to get partial credit if you are aware of your problems and describe them to me. The writeup file command is:

    try jdb-grd hmwk2-3 problems.txt

You can resubmit as often as you like before the deadline. try will be open for the grace period after the deadline.
If you work as a pair, you should submit all work from one account and both partner's names should appear on all submitted files.