Runner¶
-
public abstract class
Runner
¶ An abstract base for classes that manage running one or more episodes
Author: tim
Fields¶
configuration¶
-
protected Configuration
configuration
¶
stateCreator¶
-
protected StateCreator
stateCreator
¶
Constructors¶
Runner¶
-
public
Runner
(Configuration configuration, StateCreator stateCreator, Agent[] agents)¶
Methods¶
loadAgentData¶
saveAgentData¶
-
protected void
saveAgentData
(File directory, int agentIndex)¶ Save an agent. This stores a file (agent.agt) in the directory specified, overwriting the file and/or creating the directory as needed. The contents of the file is completely determined by the agent.
Parameters: - file – The directory to store the agent in.
- agentIndex – The agent to store.
Throws: - IllegalArgumentException – when the file exists but is not a directory.
saveAgentData¶
saveReplay¶
-
protected void
saveReplay
(File file, State initState, History finalHistory)¶ Save the initial state and history, as is needed to construct a replay. This stores two files (history.xml and initstate.xml) in the directory specified, overwriting those files and/or creating the directory as needed.
Parameters: - file – The directory to store the replay in.
Throws: - IllegalArgumentException – when the file exists but is not a directory.