Agent generation meta data used by Dimension.createMatch
Agent Generation meta data with paths to files only
Agent generation meta data used by tournaments
Agent ID. Always a non-negative integer and all agents in a match have IDs that are strictly increasing from 0
For example, in a 4 agent match, the ids are 0, 1, 2, 3
.
Language specic options mapping programming language to the agent options to use for that programing language. Used to customize options such as docker image, compile time limits etc. on a per language basis
internal buffer to store stdout from an agent that has yet to be delimited / used
Clears out the timer associated with the agent during a match
a promise that resolves when the Agent's current move in the Match is finished
Size of agent's logs so far
A number that counts the number of times the agent has essentially interacted with the MatchEngine
whether agent is allowed to send commands. Used to help ignore extra output from agents
The command used to run the file
Associated docker container running the agent
Creation date of the agent
The commands collected so far for the current move
The current working directory of the source file. If in insecure mode, this is always a temporary directory that will get deleted later.
The extension of the file
The original file path provided
This agent's ID in a match. It is always a non-negative integer and agents in a match are always numbered
0, 1, 2, ...n
where there are n
agents.
Key used to retrieve the error logs of this agent
Interval that periodically watches the memory usage of the process associated with this agent
List of all messages written to this agent are directly pushed to here when in detached mode
Name of the agent
The agent's options
The associated process running the Agent
The source path to the file that runs the agent
file without extension
Current status of the agent
A tournmanet ID if Agent is generated from within a {@link Tournament}
Agent version, used by tournament
Allow agent to send commands again
Compile whatever is needed and validate files. Called by MatchEngine and has a timer set by the maxCompileTime option in Agent.Options
Disallow an agent from sending more commands
Stop this agent from more outputs and mark it as done for now and awaiting for updates. Effectively force agent to sync with match
Get process of agent
Install whatever is needed through a install.sh
file in the root of the bot folder
Setup the agent timer clear out method
Used by MatchEngine only. Setups the memory watcher if docker is not used.
engine options to configure the agent with
Spawn the process and return the process
Spawns the compilation process
command to compile with
argument for the compilation
Spawns process in this.cwd accordingly and uses the configs accordingly. Resolves with the process if spawned succesfully
Note, we are spawning detached so we can kill off all sub processes if they are made. See _terminate for explanation
Store process for agent
process to store
Terminates this agent by stopping all related processes and remove any temporary directory. this is the only function allowed to set the status value to killed.
Executes the given command string in the agent's container and attaches stdin, stdout, and stderr accordingly
the command to execute in the container
Whether or not input is destroyed
Check if agent is set to be allowed to send commands. The EngineOptions affect when this is flipped
Returns true if this agent was terminated and no longer send or receive emssages
call out agent for exceeding memory limit
Resume an agent as long it is not terminated already
Stop an agent provided it is not terminated. To terminate it, see _terminate;
timeout the agent
Generates a list of agents for use
List of files to use to make agents or a list of objects with a file key for the file path to the bot and a name key for the name of the agent
Options to first override with for all agents
Options to second overrided with for agents depending on language
Options to lastly override with depending on agent's index
Streams associated with the agent
Default Agent options
Generated using TypeDoc
The agent is what participates in a match and contains details on the files powering the agent, the process associated and many other details.
Reads in a file source for the code and copies the bot folder to a temporary directory in secure modes and creates an
Agent
for use in the MatchEngine and MatchThis is a class that should not be broken. If something goes wrong, this should always throw a error. It is expected that agents are used knowing beforehand that the file given is validated