|
||||||||||
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.GeometricGame | +--edu.stanford.multiagent.gamer.SimpleInspectionGame
Return an instance of the Simple Inspection 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 | |
SimpleInspectionGame()
|
Method Summary | |
double |
calculatePayoff(int player,
java.util.BitSet R,
java.util.BitSet B,
java.util.BitSet intersection)
All geometric games must provide a function to calculate the payoff for each player based on the sets chosen and the intersection between them. |
protected void |
checkParameters()
Checks if Parameter values are consistent. |
void |
doGenerate()
Generate game, set all variables so that payoffs can be calculated when they are needed |
protected java.lang.String |
getGameHelp()
Return help screen information about the given game class. |
void |
initialize()
Initializes using preset parameter values |
void |
randomizeParameters()
Sets values of any unset parameters randomly. |
Methods inherited from class edu.stanford.multiagent.gamer.GeometricGame |
getGeoNumActions, getPayoff, initVariables |
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, writeGame |
Methods inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
getBooleanParameter, getDoubleParameter, getLongParameter, getParamDescription, getParameter, getParameters, getStringParameter, 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 SimpleInspectionGame() throws java.lang.Exception
Method Detail |
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
public double calculatePayoff(int player, java.util.BitSet R, java.util.BitSet B, java.util.BitSet intersection)
calculatePayoff
in class GeometricGame
player
- the player whose payoff should be returnedR
- the set chosen by player 1B
- the set chosen by player 2intersection
- the intersection of the sets chosen by
players 1 and 2public void doGenerate()
doGenerate
in class ParameterizedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |