|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.anji.ttt.TttRotatingNeuralNetPlayer
public class TttRotatingNeuralNetPlayer
Tic-Tac-Toe subject whose moves are determined by a 10x9 neural network which is shown the board 4 times, once for each rotation in the 4 cardinal directions.
Constructor Summary | |
---|---|
TttRotatingNeuralNetPlayer(Activator anActivator)
Create subject whose "brains" are anActivator , 10 inputs and 9 outputs. |
Method Summary | |
---|---|
java.lang.String |
getPlayerId()
|
int |
move(int[] boardState)
Iteratively pass boardState rotated in each of the for cardinal directions, as
input to activator and place token in empty space corresponding to strongest output. |
void |
reset()
reset player state; after a call to reset, the player should be in the same state as it was when created; i.e., it has no memory of previous games played |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TttRotatingNeuralNetPlayer(Activator anActivator)
anActivator
, 10 inputs and 9 outputs.
anActivator
- Method Detail |
---|
public java.lang.String getPlayerId()
getPlayerId
in interface Player
Player.getPlayerId()
public int move(int[] boardState)
boardState
rotated in each of the for cardinal directions, as
input to activator and place token in empty space corresponding to strongest output.
move
in interface BoardPlayer
boardState
-
BoardPlayer.move(int[])
public void reset()
Player
reset
in interface Player
Player.reset()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |