- Reorganized the constructors in Move.java.
- Made the getBoardState method in Referee.java static. - Created NeuralNetworkPlayer.java, though I don't know how to make the computer use it. - Updated the Player interface to include passing the PlayerModel. Most of the current com agents ignore the data, but it is now available. - Updated the train function in PlayerModel.java.
This commit is contained in:
@@ -203,7 +203,9 @@ public class PlayerModel implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
public void train(boolean[] example) {
|
||||
public void train(boolean[] boardState, boolean[] example) {
|
||||
getOutputNodes(boardState);
|
||||
|
||||
if (example.length == outputNode.length) {
|
||||
for (int i = 0; i < outputNode.length; i++) {
|
||||
outputNode[i].learn(example[i]);
|
||||
|
||||
Reference in New Issue
Block a user