Skip to content

BrainWatcher beta ​

Interface of @v12-engine/engine/ai

ts
export interface BrainWatcher

What follows a brain's play from outside it (Brain.watch): the commands it sends, its thinks as each ends, what it decides. For tests and tools (watchComputer, recordDecisions, the invariants of ai/checks.ts): a watcher reads, it never changes what the brain does

Members ​

decided ​

ts
decided?(decision: AiDecision, brain: Brain): void;

It wrote a decision down (Brain.decide)

sent ​

ts
sent?(command: PlayerCommand, brain: Brain): void;

A command it sent, as it goes (Brain.send): not one held back past its profile's cap

thought ​

ts
thought?(brain: Brain): void;

A think ended, all its ticks where it was sliced: the picture it read is still brain.view