Options
All
  • Public
  • Public/Protected
  • All
Menu

Engine Options that specify how the MatchEngine should operate on a Match

Hierarchy

  • EngineOptions

Index

Properties

commandDelimiter

commandDelimiter: string

Delimiter for seperating commands from agents in their stdout and then sending these delimited commands to Design.update. If an agent sent move a b 3,run 24 d,t 3 and the delimiter is ',' then the Design.update function will receive commands 'move a b 3' and 'run 24 d' and 't 3'

default

','

commandFinishPolicy

commandFinishPolicy: COMMAND_FINISH_POLICIES

Which kind of command finishing policy to use

default

'finish_symbol'

commandFinishSymbol

commandFinishSymbol: string

The finish symbol to use

default

'D_FINISH'

commandLines

commandLines: { max: number; waitForNewline: boolean }

Options for the COMMAND_FINISH_POLICIES.LINE_COUNT finishing policy. Used only if this policy is active

Type declaration

  • max: number

    Maximum lines of commands delimited by new line characters '\n' allowed before engine cuts off an Agent

    default

    1

  • waitForNewline: boolean

    Whether the engine should wait for a newline character before processing the line of commands received This should for most cases be set to true; false will lead to some unpredictable behavior.

    default

    true

commandStreamType

commandStreamType: COMMAND_STREAM_TYPE

The command streaming type

memory

memory: { active: boolean; checkRate: number; limit: number; memoryCallback: (agent: Agent, match: Match, engineOptions: EngineOptions) => void; usePs: boolean }

Options related to the memory usage of agents. The memoryCallback is called when the limit is reached

Type declaration

  • active: boolean

    Whether or not the engine will monitor the memory use. Currently is disabled on windows and this option does nothing.

    default

    true

  • checkRate: number

    How frequently the engine checks the memory usage of an agent in milliseconds

    default

    100

  • limit: number

    Maximum number of bytes an agent can use before the memoryCallback is called

    default

    1 GB (1,000,000,000 bytes)

  • memoryCallback: (agent: Agent, match: Match, engineOptions: EngineOptions) => void

    The callback called when an agent raeches the memory limit Default is kill the agent with Match.kill

  • usePs: boolean

    Whether or not to use ps instead of procfile for measuring memory through the pidusage package.

    default

    true

noStdErr

noStdErr: boolean

Whether agents output to standard error is logged by the matchengine or not

It's suggested to let agent output go to a file.

default

true

timeout

timeout: { active: boolean; max: number; timeoutCallback: (agent: Agent, match: Match, engineOptions: EngineOptions) => void }

Options for timeouts of agents

Type declaration

  • active: boolean

    On or not

    default

    true

  • max: number

    How long in milliseconds each agent is given before they are timed out and the timeoutCallback function is called

    default

    1000

  • timeoutCallback: (agent: Agent, match: Match, engineOptions: EngineOptions) => void

    the callback called when an agent times out. Default is kill the agent with Match.kill.

Generated using TypeDoc