|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.anji.roshambo.AnjiNetScanningRoshamboPlayer
public class AnjiNetScanningRoshamboPlayer
Field Summary |
---|
Fields inherited from interface com.anji.roshambo.RoshamboPlayer |
---|
DRAW, LOSS, PAPER, ROCK, SCISSORS, WIN |
Constructor Summary | |
---|---|
AnjiNetScanningRoshamboPlayer(AnjiNet aNet)
|
|
AnjiNetScanningRoshamboPlayer(AnjiNet aNet,
int anActivationCycles)
|
|
AnjiNetScanningRoshamboPlayer(AnjiNet aNet,
java.util.Random aRand)
|
|
AnjiNetScanningRoshamboPlayer(AnjiNet aNet,
java.util.Random aRand,
int anActivationCycles,
int aHistorySize,
int aScanningWindowSize)
Must have at least 6 inputs. |
Method Summary | |
---|---|
java.lang.String |
getAuthor()
|
java.lang.String |
getPlayerId()
|
int |
nextMove()
Produce your next move. |
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 |
void |
reset(int aTrials)
Initialize a new match against an unknown opponent. |
void |
storeMove(int aMove,
int aScore)
Store the opponent's choice and the outcome of the latest move. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AnjiNetScanningRoshamboPlayer(AnjiNet aNet, java.util.Random aRand, int anActivationCycles, int aHistorySize, int aScanningWindowSize)
WIN
,LOSS
,
DRAW
). Input 4 is hourglass, and input 5 is bias. Must have at least 3
outputs. Outputs 0-2 are rock, scissors, paper, values between 0 and 1 (inclusive) indicating
affinity for each.
aNet
- aRand
- if null, player deterministically chooses each move as the maximum output of the
net; otherwise, each move is chosen as a weighted probability based on each outputanActivationCycles
- number of cycles network is activated for each moveaHistorySize
- number of previous moves to storeaScanningWindowSize
- number of moves (from move history) input to net each cyclepublic AnjiNetScanningRoshamboPlayer(AnjiNet aNet)
aNet
- AnjiNetScanningRoshamboPlayer(AnjiNet, int)
public AnjiNetScanningRoshamboPlayer(AnjiNet aNet, java.util.Random aRand)
aNet
- aRand
- AnjiNetScanningRoshamboPlayer(AnjiNet, Random, int, int,
int)
public AnjiNetScanningRoshamboPlayer(AnjiNet aNet, int anActivationCycles)
aNet
- anActivationCycles
- AnjiNetScanningRoshamboPlayer(AnjiNet, Random, int, int,
int)
Method Detail |
---|
public void reset(int aTrials)
RoshamboPlayer
reset
in interface RoshamboPlayer
reset
in interface IteratedPlayer
aTrials
- number of iterations for current game; player will be reset again before
playing another gameRoshamboPlayer.reset(int)
public void reset()
Player
reset
in interface Player
Player.reset()
public void storeMove(int aMove, int aScore)
RoshamboPlayer
storeMove
in interface RoshamboPlayer
RoshamboPlayer.storeMove(int, int)
public int nextMove()
RoshamboPlayer
nextMove
in interface RoshamboPlayer
RoshamboPlayer.nextMove()
public java.lang.String getPlayerId()
getPlayerId
in interface RoshamboPlayer
getPlayerId
in interface Player
Player.getPlayerId()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String getAuthor()
getAuthor
in interface RoshamboPlayer
RoshamboPlayer.getAuthor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |