import { searchTourney, startingBitboard, tourneyThink } from '@datamoc/mwg/board';
const direct = tourneyThink(startingBitboard(), { depth: 1 });
const result = searchTourney(startingBitboard(), { depth: 2 });
console.log(direct.move !== null && result.move !== null); // true - the opening position always has legal moves
Chooses a move with the tournament search: the same
tourneyThinktask the workers run, called directly, so one implementation serves both sides.This is the stronger engine beside
board/Engine's small deterministic one: the minigame path keeps the small search and never pays for this module. Scores are centipawns from the side to move's view; mate scores sit near 100000, adjusted so the faster mate scores higher.