- Created a new ComPlayer. It targets a particular score, and does it pretty well. It does this by counting the number of empty spaces and the number of empty spaces that can potentially be created by removing tiles then either playing to block or playing to extend the game.

- Created DumpResults.java, which simply outputs all scores in a player model so that they can be graphed.
This commit is contained in:
Marshall
2012-04-30 05:18:02 -04:00
parent 8de42a3562
commit 0724d44ec4
7 changed files with 364 additions and 2 deletions

View File

@@ -144,6 +144,13 @@ public class PlayerModel implements Serializable {
return null;
}
public ArrayList<GameLog> getScores() {
GameLog.SORT_BY_SCORE = false;
Collections.sort(scores);
return scores;
}
public GameGoal getTargetScore() {
GameGoal goal;
int targetScore;
@@ -210,7 +217,7 @@ public class PlayerModel implements Serializable {
public void train(boolean[] example) {
boolean[] hold = getOutputActivations();
System.out.println("TRAIN");
// System.out.println("TRAIN");
if (example.length == outputNode.length) {
for (int i = 0; i < outputNode.length; i++) {
outputNode[i].learn(example[i] == hold[i]);

View File

@@ -37,7 +37,7 @@ public class SigmoidNode implements Node {
}
}
System.out.println(strength());
// System.out.println(strength());
}
@Override