Const
The chess rules adapter consumed by the shared ai.alphaBetaSearch primitive.
ai.alphaBetaSearch
import { chessGame, startingChess } from '@datamoc/mw_games/board';import { alphaBetaSearch } from '@datamoc/mw_games/ai';const result = alphaBetaSearch(chessGame, startingChess(), { depth: 2 });console.log(result.move !== null); // true Copy
import { chessGame, startingChess } from '@datamoc/mw_games/board';import { alphaBetaSearch } from '@datamoc/mw_games/ai';const result = alphaBetaSearch(chessGame, startingChess(), { depth: 2 });console.log(result.move !== null); // true
The chess rules adapter consumed by the shared
ai.alphaBetaSearchprimitive.