public class RuleGenMachine
extends java.lang.Object
Constructor and Description |
---|
RuleGenMachine() |
Modifier and Type | Method and Description |
---|---|
protected static AbstractRuleGenerator |
createRuleGenerator(java.lang.String ruleGenerator,
SLDescription sl) |
static boolean |
generateRules(java.lang.String gameFile,
java.lang.String levelFile,
java.lang.String ruleGenerator,
java.lang.String modifiedFile,
int randomSeed)
create a new game file using the new generated rules
|
static double[] |
playOneGame(java.lang.String original_game,
java.lang.String generated_game,
java.lang.String level_file,
java.lang.String actionFile,
int randomSeed)
Reads and launches a game for a human to be played.
|
static double[] |
runOneGame(java.lang.String original_game,
java.lang.String generated_game,
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 static double[] playOneGame(java.lang.String original_game, java.lang.String generated_game, java.lang.String level_file, java.lang.String actionFile, int randomSeed)
original_game
- original game description file.generated_game
- generated game description file.level_file
- file with the level to be played.public static double[] runOneGame(java.lang.String original_game, java.lang.String generated_game, java.lang.String level_file, boolean visuals, java.lang.String agentNames, java.lang.String actionFile, int randomSeed, int playerID)
original_game
- original game description file.generated_game
- generated game description file.level_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 static boolean generateRules(java.lang.String gameFile, java.lang.String levelFile, java.lang.String ruleGenerator, java.lang.String modifiedFile, int randomSeed)
gameFile
- current game filelevelFile
- current level fileruleGenerator
- current rule generatormodifiedFile
- the resulted game filerandomSeed
- random seed used in encoding game spritesprotected static AbstractRuleGenerator createRuleGenerator(java.lang.String ruleGenerator, SLDescription sl) throws java.lang.RuntimeException
ruleGenerator
- rule generatordsl
- Level Descriptionjava.lang.RuntimeException