- 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:
@@ -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]);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class SigmoidNode implements Node {
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(strength());
|
||||
// System.out.println(strength());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user