Skip to content

AiProfile beta ​

Interface of @v12-engine/engine/ai

ts
export interface AiProfile extends AiSettings

How a computer player plays, as plain data: the settings of its areas (AiSettings) and how well it plays, every field optional, layered (see the file's comment). What a difficulty, a personality and a game's defaults give

Members ​

brain ​

ts
brain?: string;

The brain it plays with, by id (one the game lists in Rules.brains): what a race's profile says (GameAi.races, campaign plan AR3), for a seat that names none and a map that says none. The game's first brain where nothing says

budget ​

ts
budget?: ThinkBudgetOptions;

How much of a think one tick may do (ThinkBudgetOptions): modules a tick, units looked at a tick, the milliseconds a module is warned over (4). Nothing sliced when left out: a game sets it where its numbers ask, at many computers

commandsPerThink ​

ts
commandsPerThink?: number;

Commands a think may send at the most, like a person's hands: no limit when left out

difficulty ​

ts
difficulty?: string;

The difficulty by name: easy, normal, hard, insane, or a game's own (Rules.ai.difficulties). normal when left out

every ​

ts
every?: number;

Seconds between thinks: its reactions

handicap ​

ts
handicap?: AiHandicap;

What it is given beyond the rules, each a factor (1 is none), through the game's hooks while it is seated: income, what its workers bring in (1.5: half again; beforeDeposit); health, the most health of everything it has (stats); damage, the damage it deals (beforeDamage, before armour); buildTime, how long what it trains, builds and researches takes (0.8: a fifth sooner; beforeProduce). The classic handicap is health

mistakes ​

ts
mistakes?: number;

How often it slips, 0 to 1: a think's fights left alone, a wave sent early. Drawn with the brain's own numbers

personality ​

ts
personality?: string;

The personality by name: balanced, rusher, turtle, expander, harasser, or a game's own. balanced when left out

vision ​

ts
vision?: 'fair' | 'all';

fair: it sees what its seat does. all: it sees through the fog (an observer's session), for insane only