public class ArcadeMachine
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
VERBOSE |
Constructor and Description |
---|
ArcadeMachine() |
Modifier and Type | Method and Description |
---|---|
protected static AbstractPlayer |
createController(java.lang.String playerName,
StateObservation so)
Creates and initializes a new controller with the given name.
|
static double |
playOneGame(java.lang.String game_file,
java.lang.String level_file,
java.lang.String actionFile,
int randomSeed)
Reads and launches a game for a human to be played.
|
static double |
replayGame(java.lang.String game_file,
java.lang.String level_file,
boolean visuals,
java.lang.String actionFile)
Runs a replay given a game, level and file with the actions to execute.
|
static void |
runGames(java.lang.String game_file,
java.lang.String[] level_files,
int level_times,
java.lang.String agentName,
java.lang.String[] actionFiles,
int randomSeed)
Reads and launches a game for a bot to be played.
|
static double |
runOneGame(java.lang.String game_file,
java.lang.String level_file,
boolean visuals,
java.lang.String agentName,
java.lang.String actionFile,
int randomSeed)
Reads and launches a game for a bot to be played.
|
public static final boolean VERBOSE
public static double playOneGame(java.lang.String game_file, java.lang.String level_file, java.lang.String actionFile, int randomSeed)
game_file
- game description file.level_file
- file with the level to be played.public static double runOneGame(java.lang.String game_file, java.lang.String level_file, boolean visuals, java.lang.String agentName, java.lang.String actionFile, int randomSeed)
game_file
- game description file.level_file
- file with the level to be played.visuals
- true to show the graphics, false otherwise.agentName
- name (inc. package) where the controller is otherwise.actionFile
- filename of the file where the actions of this player, for this game, should be recorded.randomSeed
- sampleRandom seed for the sampleRandom generator.public static double replayGame(java.lang.String game_file, java.lang.String level_file, boolean visuals, java.lang.String actionFile)
game_file
- game description file.level_file
- file with the level to be played.visuals
- true to show the graphics, false otherwise.actionFile
- name of the file where the actions of this player, for this game, must be read from.public static void runGames(java.lang.String game_file, java.lang.String[] level_files, int level_times, java.lang.String agentName, java.lang.String[] actionFiles, int randomSeed)
game_file
- game description file.level_files
- array of level file names to play.level_times
- how many times each level has to be played.actionFiles
- names of the files where the actions of this player, for this game, should be recorded. Accepts
null if no recording is desired. If not null, this array must contain as much String objects as
level_files.length*level_times.protected static AbstractPlayer createController(java.lang.String playerName, StateObservation so) throws java.lang.RuntimeException
playerName
- Name of the controller to instantiate.so
- Initial state of the game to be played by the agent.java.lang.RuntimeException