Skip to content

winRates beta ​

Function of @v12-engine/engine/testing

ts
export declare function winRates(games: readonly SimulatedGame[]): Record<string, BrainResults>;

The win rate of each brain over games of simulate, by brain id (ComputerMeasures.brain): what a balance run of two brains reads. A seat that named no brain is left out

const games = await simulate( ...duel, brains: 1: meleeBrain, 2: myBrain , seeds ) winRates(games) // 'core.melee': rate: 0.4, … , 'mygame.brain': rate: 0.55, …