Skip to content

ThinkBudgetOptions beta ​

Interface of @v12-engine/engine/ai

ts
export interface ThinkBudgetOptions

How much of a think one tick may do (AiOptions.budget, AiProfile.budget, ComputerSeatOptions.budget), counted in work and never in milliseconds: the same on every machine, so that a game with a sliced think is the same game everywhere. Nothing is limited where a field is left out

Members ​

modulesPerTick ​

ts
modulesPerTick?: number;

Modules of a brain a think may run in one tick: a think with more goes on at the next tick, over the same picture of the game. All of them in one tick when left out

unitsPerTick ​

ts
unitsPerTick?: number;

Units a tick's modules may look at, as the modules say (ai.budget.spent(n)): a module that walks the squads or the bases stops once the tick has looked at this many, and goes on at the next tick from where it was (later). No limit when left out. A module that says nothing of what it looks at is never stopped by it

warnAfterMs ​

ts
warnAfterMs?: number | false;

Milliseconds a module may take before the log says so (once a module, a warning): what to measure first. A module is never cut short for it. 4 when left out; false for never