net.sourceforge.jabm.gametheory
Class GameTheoreticSimulationController
java.lang.Object
net.sourceforge.jabm.event.AbstractModel
net.sourceforge.jabm.SimulationController
net.sourceforge.jabm.SpringSimulationController
net.sourceforge.jabm.gametheory.GameTheoreticSimulationController
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, Model, EventScheduler, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
public class GameTheoreticSimulationController
- extends SpringSimulationController
- implements java.io.Serializable
A simulation controller which can be used to generate a heuristic payoff
matrix, as described in the following paper:
Wellman, M. P. (2006). Methods for Empirical Game-Theoretic Analysis.
Twenty-First National Conference on Artificial Intelligence (AAAI-06) (pp.
1152-1155). Boston, Massachusetts.
- See Also:
- Serialized Form
-
-
Methods inherited from class net.sourceforge.jabm.SimulationController |
addReport, fireEvent, getModelDescription, getNumSimulations, getPopulation, getReports, getSimulation, getSimulationFactory, getSimulationTime, getSlowSleepInterval, isRunning, runSingleSimulation, setListeners, setModelDescription, setNumSimulations, setReports, setSimulation, setSimulationFactory, setSlowSleepInterval, slow, terminate, wireReports, wireSimulation |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
payoffMatrix
protected CompressedPayoffMatrix payoffMatrix
strategies
protected java.util.List<Strategy> strategies
strategyInitialisers
protected java.util.List<StrategyInitialiser> strategyInitialisers
payoffByStrategy
protected PayoffByStrategyReportVariables payoffByStrategy
currentEntry
protected CompressedPayoffMatrix.Entry currentEntry
csvFileName
protected java.lang.String csvFileName
fileNamePrefix
protected MutableStringWrapper fileNamePrefix
binFileName
protected java.lang.String binFileName
csvOut
protected CSVWriter csvOut
binaryOut
protected java.io.ObjectOutputStream binaryOut
GameTheoreticSimulationController
public GameTheoreticSimulationController()
initialise
public void initialise()
resize
public void resize(int numAgents)
run
public void run()
- Description copied from class:
SimulationController
- Run the batch of simulations in sequence.
- Specified by:
run
in interface java.lang.Runnable
- Overrides:
run
in class SimulationController
constructSimulation
protected void constructSimulation()
- Overrides:
constructSimulation
in class SpringSimulationController
getPayoffDistribution
public org.apache.commons.math3.stat.descriptive.SummaryStatistics getPayoffDistribution(Strategy strategy)
updatePayoffs
public void updatePayoffs(CompressedPayoffMatrix.Entry entry)
initialiseAgents
public void initialiseAgents(CompressedPayoffMatrix.Entry entry)
getPayoffMatrix
public CompressedPayoffMatrix getPayoffMatrix()
setPayoffMatrix
public void setPayoffMatrix(CompressedPayoffMatrix payoffMatrix)
getStrategies
public java.util.List<Strategy> getStrategies()
getAgents
public java.util.Collection<Agent> getAgents()
getStrategyInitialisers
public java.util.List<StrategyInitialiser> getStrategyInitialisers()
setStrategyInitialisers
public void setStrategyInitialisers(java.util.List<StrategyInitialiser> strategyInitialisers)
getPayoffByStrategy
public PayoffByStrategyReportVariables getPayoffByStrategy()
setPayoffByStrategy
public void setPayoffByStrategy(PayoffByStrategyReportVariables payoffByStrategy)
getCsvFileName
public java.lang.String getCsvFileName()
setCsvFileName
public void setCsvFileName(java.lang.String csvFileName)
getFileNamePrefix
public MutableStringWrapper getFileNamePrefix()
setFileNamePrefix
public void setFileNamePrefix(MutableStringWrapper fileNamePrefix)
getBinFileName
public java.lang.String getBinFileName()
setBinFileName
public void setBinFileName(java.lang.String binFileName)
exportPayoffPatrix
public void exportPayoffPatrix()
initialiseOutput
public void initialiseOutput()
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in class SpringSimulationController
- Throws:
java.lang.Exception