- Java 7
- An unix-shell
- An Ant build system
Releases can be found online.
ant compile
Help can you find here.
From your console:
java -jar gp_connect_four.jar
You can set the options in the Main.java
file.
In the main method you can select what you want to do:
- Play against a player (calling the play method), or
- let the evolve a player for you (calling the evolve method).
You then have to compile the program, as of now no command line options have been integrated. Can take a long while with the right/wrong options.
-
Run the programing evolving an player. Save the code yourself, or redirect its output like this
java -jar gp_connect_four.jar > mi_01_only_ternary.txt
-
Create a new class in the package
org.samuelsmal.game.EvolvedPlayers
, extendingGPPlayer
. -
Implement the required methods (see below).
-
Insert into the
play()
-method of theMain
-class in theMain.java
-file an new Instance of your new class created in step 2, replace one of the old players. The argument sequence corresponds to the start player.@Override protected long evalGame(char playerColour, char enemyColour, Game game) { // PAST CODE FROM PROGRAMM HERE }
You can extract the data using grep
:
grep '^[0-9]' mi_01_only_ternary.txt > mi_01_only_ternary_points.txt
This will extract all the datapoints. If you want to extract only the winner use
grep '^0' mi_01_only_ternary.txt > mi_01_only_ternary_only_winner.txt
If you want to extract the number of nodes use:
grep 'Winner count of nodes' mi_01_only_ternary.txt > mi_01_only_ternary_node_count.txt
And some replacement tool of your own.