|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectipdlx.GameResult
ipdlx.StandardGameResult
ipdlx.GameResultLog
public class GameResultLog
Log of the game. A exhaustive description of a game - what moves did players do, what was the result of every round. Usefull for strategy-testing purposes.
| Field Summary |
|---|
| Fields inherited from class ipdlx.GameResult |
|---|
nrRounds, payoffs, players |
| Fields inherited from interface ipdlx.PDValues |
|---|
COOPERATE, DEFAULT_MISTAKE_LEVEL, DEFAULT_PUNISHMENT, DEFAULT_REWARD, DEFAULT_SUCKER, DEFAULT_TEMPTATION, DEFECT, EXIT, moves, PLAYER_A, PLAYER_B |
| Constructor Summary | |
|---|---|
GameResultLog(int nbOfRounds,
java.lang.String[] strategies)
constructor. |
|
| Method Summary | |
|---|---|
void |
createStatistics()
creates statistics based on game log |
int |
getCoCoNumber()
|
float |
getCoCoPercent()
|
int |
getCoDeNumber()
|
float |
getCoDePercent()
|
int |
getDeDeNumber()
|
float |
getDeDePercent()
|
double[][] |
getLog()
returns game log (for both players) |
double[] |
getLogPlayer(int playerNb)
returns game log for one player |
int |
getNbOfRounds()
returns number of rounds in this game |
java.lang.String |
toString()
|
void |
writeMove(int nbOfRound,
int player,
double move)
write type of move made by players to game log |
| Methods inherited from class ipdlx.StandardGameResult |
|---|
addPayoff, getPlayerA, getPlayerB |
| Methods inherited from class ipdlx.GameResult |
|---|
addPayoff, getPayoffPlayer, getPayoffs, getPlayer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GameResultLog(int nbOfRounds,
java.lang.String[] strategies)
nbOfRounds - number of rounds in this gamestrategies - -
names of strategies for both players| Method Detail |
|---|
public void writeMove(int nbOfRound,
int player,
double move)
writeMove in class GameResultnbOfRound - -
which round is thisplayer - -
which player A or Bmove - -
type of move of player - COOPERATION or DEFECTIONpublic double[][] getLog()
getLog in class GameResultpublic double[] getLogPlayer(int playerNb)
playerNb - player A or B
public void createStatistics()
public float getCoCoPercent()
public float getCoDePercent()
public float getDeDePercent()
public int getCoCoNumber()
public int getCoDeNumber()
public int getDeDeNumber()
public int getNbOfRounds()
public java.lang.String toString()
toString in class GameResult
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||