AiReport beta
Interface of @v12-engine/engine/ai
export interface AiReportWhat a computer player is thinking, as plain data (Brain.report, Brain.inspect): what the debug panel's AI tab draws, and what a test reads. Each module adds its section (AiModule.report, AiModule.inspect)
Members
brain
brain: string;The brain's id (core.melee)
budget
budget?: ThinkBudgetOptions & {
ticks: number;
};How much of a think one tick may do, where its budget slices it (ThinkBudget), and the ticks its last think took. Left out where a think is one tick
decisions
decisions: AiDecision[];What it decided, the last fifty, oldest first
defence
defence?: DefenceReport;The raids on its bases with what answers each, every base's raids so far, the towers it wants (DefenceReport)
economy
economy: {
resources: Record<string, number>;
income: Record<string, number>;
supply: [used: number, cap: number];
} & Partial<EconomyReport>;What it has to spend and how it comes in: its resources, its income a minute, its supply; and its economy's say (EconomyReport): each base with its workers on each resource against what it wants and what is served, the workers that fled a raid, the workers had against wanted, where the next hall stands
goal
goal?: string;The goal that scored highest above the minimum this think: what the army is on. None when nothing is worth doing
goals
goals: GoalReport[];Every goal as the picker last saw it: its score, each consideration's raw and curved value, what it holds, why not
held
held?: number;Commands it would have sent its last think past what its profile lets a think send (commandsPerThink)
knowledge
knowledge?: KnowledgeReport;What it remembers of the enemy: left out by a brain that keeps no knowledge
micro
micro?: MicroReport;Its fights: each squad in one and whom it hits, the units that fled, its heroes and what each learns next, who shops for what
paused
paused?: true;Whether it sits still (world.computers.pause)
plans
plans: PlansReport;Its plans: the purse (what is free, promised, held), and every want of the build plan with what it waits for
player
player: PlayerId;The player it plays
playing
playing?: AiProfile;What it plays by (Brain.profile): the profile resolved, layer over layer; code (a flag's function) left out
profile
profile: Record<string, unknown>;What it was seated with: the data of its options (AiOptions: the difficulty, the numbers); code left out
roles
roles: Record<string, string[]>;The roles it found among the types it can make: { worker: ['peasant'] }
scouting
scouting?: ScoutingReport;Its plan of looks with how long since each was in sight and whether it is due, its scout and where it goes (ScoutingReport)
sections
sections: Record<string, unknown>;What each module says of itself that the report has no part for (AiModule.inspect), under the module's id
sent
sent: number;Commands it sent its last think
squads
squads: SquadReport[];Its squads: whose each is, its units and their strength, where it is, its task and how it goes, its last change
stats
stats: AiStats;What its play adds up to since it was seated (AiStats): commands, idle army seconds, churn, seconds blocked on money
team
team?: TeamReport;Its team: the computers of it, the requests on its board, the plan of an attack together (TeamReport)
thinks
thinks: number;How many times it has thought
threat
threat?: ThreatReport;Where the strength is, as its threat map read it last think (ThreatReport): what the AI overlay draws as heat
tick
tick: number;The tick of its last picture of the game
tickRate
tickRate: number;Ticks a second: what turns a decision's tick into the game's time
time
time: number;Seconds into the game, as of its last picture
timing
timing?: ComputerTiming;Milliseconds its thinks take, for reading only: the last, an average, the longest, and by module while the world profiles. Given by the seat (inspect of the player), which times the thinks
told
told: {
word: string;
tick: number;
}[];The words the game told it that no module has taken yet
v
v: 1;The version of this shape
waves
waves?: WavesReport;Its waves: the one whose turn it is, its group as it stands and when it may go, the waves sent (WavesReport)