Chooses a move the way searchTourney does, but thinks on worker threads through
threads.spawn, so a deep search does not drop the caller's frames. Each root move
is a self-contained tourneyThink task over a structured-cloned bitboard, scored
concurrently down a capped lane queue; the best child score from the opponent's
view is the worst for us, so the root plays the move whose child scored lowest,
with ties going to the earlier root move. rootScores exposes every candidate so
games can choose near-best moves without repeating the search on the UI thread.
An aborting signal rejects through
threads.spawn and terminates the workers.
Chooses a move the way
searchTourneydoes, but thinks on worker threads throughthreads.spawn, so a deep search does not drop the caller's frames. Each root move is a self-containedtourneyThinktask over a structured-cloned bitboard, scored concurrently down a capped lane queue; the best child score from the opponent's view is the worst for us, so the root plays the move whose child scored lowest, with ties going to the earlier root move.rootScoresexposes every candidate so games can choose near-best moves without repeating the search on the UI thread. An aborting signal rejects throughthreads.spawnand terminates the workers.