|
||||||||||
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.GraphicalGame | +--edu.stanford.multiagent.gamer.RandomGraphicalGame
Generate a Graphical Game with any given structure as long as the structure has been implemented as a graph class. For example, can be used to create Ring Structured Games and Tree Structured Games. This is a working version of the graphical game with random payoffs. Other styles of payoffs are not yet implemented.
Field Summary |
Fields inherited from class edu.stanford.multiagent.gamer.GraphicalGame |
graph |
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 | |
RandomGraphicalGame()
|
Method Summary | |
protected void |
checkParameters()
Checks if Parameter values are consistent. |
void |
doGenerate()
Generate the matrices for each node of the graph graph and the graph connecting neighbors to each other. |
protected java.lang.String |
getGameHelp()
Return help screen information about the given game class. |
protected void |
initGraph()
Initialize a graph with the number of nodes equal to the number of players. |
void |
initialize()
Initializes using preset parameter values |
void |
randomizeParameters()
Sets values of any unset parameters randomly. |
void |
setParameters(edu.stanford.multiagent.gamer.ParamParser p,
boolean randomize)
Sets multiple parameters at once using a ParamParser. |
Methods inherited from class edu.stanford.multiagent.gamer.GraphicalGame |
addEdge, addEdge, getPayoff, setNodeMatrix, writeGame |
Methods inherited from class edu.stanford.multiagent.gamer.Game |
generate, getAutoNormPayoff, getDescription, getHelp, getName, getNormPayoff, getNumActions, getNumActions, getNumPlayers, getOutputPayoff, getOutputPayoff, getPayoff, getRangeHelp, parseActions, parsePlayersActions, parsePlayersSameNumberActions, parseSameNumberActions, setDescription, setName, setNormMinAndMax, setNumActions, setNumActions, setNumPlayers |
Methods inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
getBooleanParameter, getDoubleParameter, getLongParameter, getParamDescription, getParameter, getParameters, getStringParameter, setParameter, setParameter, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RandomGraphicalGame() throws java.lang.Exception
Method Detail |
public void setParameters(edu.stanford.multiagent.gamer.ParamParser p, boolean randomize) throws java.lang.Exception
ParameterizedObject
setParameters
in class ParameterizedObject
p
- the ParamParser containing the parameters and
their valuesrandomize
- should be set to true if it is desired
that any unset parameters be randomized
java.lang.Exception
public void initialize() throws java.lang.Exception
Game
initialize
in class Game
java.lang.Exception
protected void checkParameters() throws java.lang.Exception
ParameterizedObject
checkParameters
in class ParameterizedObject
java.lang.Exception
- if anything is wrong with the parameter
valuespublic void randomizeParameters()
ParameterizedObject
randomizeParameters
in class ParameterizedObject
protected java.lang.String getGameHelp()
Game
getGameHelp
in class Game
protected void initGraph()
initGraph
in class GraphicalGame
public void doGenerate()
doGenerate
in class ParameterizedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |