public class DesignMachine
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int[] |
numValuesGenome |
ParameterContent[] |
parameterContents |
java.lang.String[] |
parameterStrings |
Player[] |
players |
GameSpace |
toPlay |
Constructor and Description |
---|
DesignMachine(java.lang.String game_file)
Creates a Game Space for the game passed as parameter.
|
Modifier and Type | Method and Description |
---|---|
int |
getDimSize(int dim_idx)
Returns the number of points in a given dimensions
|
int |
getNumDimensions()
Returns the number of dimensions of this game space.
|
double[] |
playGame(int[] parameters,
java.lang.String game_file,
java.lang.String level_file,
int randomSeed) |
double[] |
playGame2P(int[] parameters,
java.lang.String game_file,
java.lang.String level_file,
int randomSeed) |
void |
printDimensions() |
void |
printValues(int[] parameters)
DEBUG FUNCTIONS
|
double[] |
runOneGame(int[] parameters,
java.lang.String game_file,
java.lang.String level_file,
boolean visuals,
java.lang.String agentNames,
java.lang.String actionFile,
int randomSeed,
int playerID)
Reads and launches a game for a bot to be played.
|
public int[] numValuesGenome
public ParameterContent[] parameterContents
public java.lang.String[] parameterStrings
public GameSpace toPlay
public Player[] players
public DesignMachine(java.lang.String game_file)
game_file
- game to create the game space for.public double[] playGame(int[] parameters, java.lang.String game_file, java.lang.String level_file, int randomSeed)
public double[] playGame2P(int[] parameters, java.lang.String game_file, java.lang.String level_file, int randomSeed)
public double[] runOneGame(int[] parameters, java.lang.String game_file, java.lang.String level_file, boolean visuals, java.lang.String agentNames, java.lang.String actionFile, int randomSeed, int playerID)
parameters
- parameters for the game spacelevel_file
- file with the level to be played.visuals
- true to show the graphics, false otherwise.agentNames
- names (inc. package) where the tracks are otherwise. Names separated by space.actionFile
- filename of the files where the actions of these players, for this game, should be recorded.randomSeed
- sampleRandom seed for the sampleRandom generator.playerID
- ID of the human playerpublic int getNumDimensions()
public int getDimSize(int dim_idx)
dim_idx
- Index of the dimension to check.public void printValues(int[] parameters)
public void printDimensions()