import { BaseAdapter, IEngineAdapter, IEngineLoader, IEngineConfig, ISearchTask, MiddlewareCommand } from "@multi-game-engines/core"; import type { IGoSearchOptions, IGoSearchInfo, IGoSearchResult } from "@multi-game-engines/domain-go"; /** * KataGo ONNX adapter. * * Loads a pre-converted KataGo ONNX model (fp32, b6c96 or similar) via * onnxruntime-web and runs policy/value inference directly in the browser * without a Web Worker or proprietary binary. * * Architecture: * - Model URL supplied via config.sources.main.url * - InferenceSession created once in load() * - Board state maintained across moves via KataGoBoard * - search() encodes position → runs session → returns best policy move * * @example * ```typescript * const engine = createKataGoEngine({ sources: { main: { url: MODEL_URL } } }); * await engine.load(); * const result = await engine.search({ board: "startpos", size: 19, komi: 6.5 }); * console.log(result.bestMove); // e.g. "D4" * ``` */ export declare class KataGoONNXAdapter extends BaseAdapter { readonly version: string; readonly parser: { parseInfo: () => null; parseResult: () => null; createSearchCommand: () => string[]; createStopCommand: () => string; createOptionCommand: () => string; }; private _session; private _board; constructor(config?: IEngineConfig); /** No source URL validation — ONNX model URL is supplied via config. */ protected validateSources(): void; /** * Load the ONNX model from config.sources.main.url. * Falls back to a default model URL if none is provided. */ load(_loader?: IEngineLoader, signal?: AbortSignal): Promise; /** * Run ONNX inference to find the best move. * * @param options - Search options. * Supply `options.board = "startpos"` to reset the board. * Supply `options.size` for board size (default 19) and `options.komi` (default 6.5). */ search(options: IGoSearchOptions): Promise; /** * Advance internal board state by one move (GTP notation: "D4", "pass"). * Call this after each move (engine or opponent) to keep the model context. */ applyMove(gtpMove: string): void; searchRaw(_command: MiddlewareCommand): ISearchTask; stop(): Promise; dispose(): Promise; protected onBookLoaded(_url: string): Promise; } export declare function createKataGoAdapter(config: IEngineConfig): IEngineAdapter; //# sourceMappingURL=KataGoONNXAdapter.d.ts.map