|
||||||||||
| 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.LocationGame
Returns an instance of the two player location game based on Hotelling's original model.
| Field Summary | |
protected static Parameters.ParamInfo[] |
lgParams
|
protected static Parameters.ParamInfo |
pADist
|
protected static Parameters.ParamInfo |
pBDist
|
protected static Parameters.ParamInfo |
pCost
|
protected static Parameters.ParamInfo |
pLDist
|
protected static Parameters.ParamInfo |
pLowAct
|
| 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 | |
LocationGame()
|
|
| Method Summary | |
protected void |
checkParameters()
Checks if Parameter values are consistent. |
void |
doGenerate()
All information for generating payoffs for the location game is contained in the parameter set. |
protected java.lang.String |
getGameHelp()
Return help screen information about the given game class. |
double |
getPayoff(int[] outcome,
int player)
Return the payoff for the given player at the given outcome. |
void |
initialize()
Initializes using preset parameter values |
void |
randomizeParameters()
Sets values of any unset parameters randomly. |
| 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 |
| Field Detail |
protected static Parameters.ParamInfo pADist
protected static Parameters.ParamInfo pBDist
protected static Parameters.ParamInfo pLDist
protected static Parameters.ParamInfo pCost
protected static Parameters.ParamInfo pLowAct
protected static Parameters.ParamInfo[] lgParams
| Constructor Detail |
public LocationGame()
throws java.lang.Exception
| Method Detail |
public void initialize()
throws java.lang.Exception
Game
initialize in class Gamejava.lang.Exception
protected void checkParameters()
throws java.lang.Exception
ParameterizedObject
checkParameters in class ParameterizedObjectjava.lang.Exception - if anything is wrong with the parameter
valuespublic void randomizeParameters()
ParameterizedObject
randomizeParameters in class ParameterizedObjectprotected java.lang.String getGameHelp()
Game
getGameHelp in class Game
public double getPayoff(int[] outcome,
int player)
getPayoff in class Gameoutcome - array of integers representing which actions
have been chosen by each playerplayer - the player whose payoff to returnpublic void doGenerate()
doGenerate in class ParameterizedObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||