Match engine constructor
The design the engine runs on
Engine options
A coordination signal to ensure that all processes are indeed killed due to asynchronous initialization of agents There is a race condition when a tournament/match is being destroyed and while every match is being destroyed, some matches are in the initialization stage where they call the engine's initialize function. As a result, when we send a match destroy signal, we spawn some processes and haven't spawned some others for the agents. As a result, all processes eventually get spawned but not all are cleaned up and killed.
Logger
Single memory watch interval so that all memory checks are made together
Override options
approx extra buffer time given to agents due to engine processing for timeout mechanism
Returns a promise that resolves with all the commands loaded from the previous time step of the provided match This coordinates all the Agents and waits for each one to finish their step
The match to get commands from agents for
a promise that resolves with an array of MatchEngine.Command elements, holding the command and id of the agent that sent it
Get the engine options
Returns the logger for this match engine
Handles partial stdout from an agent
the agent to process the command for
the string the agent sent
Initializes a single agent, called by initialize
Kills an agent and closes the process, and no longer attempts to receive coommands from it anymore
the agent to kill off
Attempts to kill and clean up anything else for a custom design based match
the match to kill and clean up
Parses a list of arguments for a given match and populates relevant strings as needed
the match to parse arguments for
the arguments to parse
Attempts to gracefully and synchronously resume a previously stopped match
the match to resume
the match to resume
Run a custom match. A custom match much print to stdout all relevant data to be used by the engine and Dimensions framework. All output after the conclude command from Design.OverrideOptions is outputted is stored as a list of new line delimited strings and returned as the match results. The match must exit with exit code 0 to be marked as succesfully complete and the processing of results stops and this function resolves
the match to run
Sends a message to a particular process governed by an agent in a specified match specified by the agentID
the match to work with
the message to send to agent's stdin
id that specifies the agent in the match to send the message to
Set the engine options
Set log level
Attempts to gracefully and synchronously stop a match's agents
the match to stop
the match to stop
Generated using TypeDoc
The Match Engine that takes a Design and its specified EngineOptions to form the backend for running matches with agents.