@nodots-llc/backgammon-ai
Version:
AI and integration for nodots-backgammon using gnubg as a backend engine.
23 lines • 1.14 kB
TypeScript
import { BackgammonMoveBase } from '../../nodots-backgammon-types/src/move';
import { MoveAnalyzer } from './moveAnalyzers';
/**
* Calls GNU Backgammon to get the best move for a given position ID.
*
* @param positionId The GNU Backgammon Position ID.
* @returns A promise that resolves with the best move string (e.g., '8/4 6/4').
* @throws Error if gnubg execution fails or if the best move cannot be parsed.
*/
export declare function getGnubgMoveHint(positionId: string): Promise<string>;
/**
* Gets the best move for the standard starting position.
* @returns A promise that resolves with the best move string.
*/
export declare function getBestMoveForStartingPosition(): Promise<string>;
/**
* Selects a move from a list using the specified analyzer (defaults to random).
* @param moves List of BackgammonMoveBase
* @param analyzer Optional MoveAnalyzer (defaults to RandomMoveAnalyzer)
* @returns The selected move, or null if the list is empty
*/
export declare function selectMoveFromList(moves: BackgammonMoveBase[], analyzer?: MoveAnalyzer): Promise<BackgammonMoveBase | null>;
//# sourceMappingURL=index.d.ts.map