|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.multiagent.gamer.ParameterizedObject | +--edu.stanford.multiagent.gamer.Game | +--edu.stanford.multiagent.gamer.MatrixGame
Class implements the straightforward normal form game.
Field Summary |
Fields inherited from class edu.stanford.multiagent.gamer.Game |
actions, DEFAULT_HIGH, DEFAULT_LOW, intMult, intPayoffs, players, pMaxPayoff, pMinPayoff, pNormalize, symActions |
Fields inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
parameters |
Constructor Summary | |
MatrixGame()
Constructor for a new matrix game. |
Method Summary | |
double |
getPayoff(int[] outcome,
int player)
Returns the payoff for a player for a given outcome. |
protected void |
initMatrix()
Initializes the payoff array. |
protected void |
setPayoff(int[] outcome,
int player,
double value)
Sets the payoff for a player for a given outcome. |
Methods inherited from class edu.stanford.multiagent.gamer.Game |
generate, getAutoNormPayoff, getDescription, getGameHelp, getHelp, getName, getNormPayoff, getNumActions, getNumActions, getNumPlayers, getOutputPayoff, getOutputPayoff, getPayoff, getRangeHelp, initialize, parseActions, parsePlayersActions, parsePlayersSameNumberActions, parseSameNumberActions, setDescription, setName, setNormMinAndMax, setNumActions, setNumActions, setNumPlayers, writeGame |
Methods inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
checkParameters, doGenerate, getBooleanParameter, getDoubleParameter, getLongParameter, getParamDescription, getParameter, getParameters, getStringParameter, randomizeParameters, setParameter, setParameter, setParameters, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MatrixGame() throws java.lang.Exception
Method Detail |
protected void initMatrix()
public double getPayoff(int[] outcome, int player)
getPayoff
in class Game
outcome
- an array containing the actions chosen by each playerplayer
- the player whose payoff should be returned.protected void setPayoff(int[] outcome, int player, double value)
outcome
- an array containing the actions chosen by each playerplayer
- the player whose payoff should be returned.value
- the amount of the payoff
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |