checkBrain beta
Function of @v12-engine/engine/ai
ts
export declare function checkBrain(brain: Brain, options?: AiCheckOptions): {
checks: BrainChecks;
stop: () => void;
};Checks a brain against the invariants after each of its thinks from now on: throws at the first broken rule, or tells onViolation of each. Returns the checks (their violations) and the way to stop: what watchComputer does for a seat, and every brain does by itself while debugChecks.ai is on
const checks = checkBrain(brain, onViolation: (each) = found.push(each) )