UNPKG

@nodots-llc/backgammon-ai

Version:

AI and integration for nodots-backgammon using gnubg as a backend engine.

26 lines 1.08 kB
import { BackgammonMoveBase } from '../../nodots-backgammon-types/src/move'; export interface MoveAnalyzerContext { board?: any; positionId?: string; [key: string]: any; } export interface MoveAnalyzer { selectMove(moves: BackgammonMoveBase[], context?: MoveAnalyzerContext): Promise<BackgammonMoveBase | null>; } /** * Randomly selects a move from the list. */ export declare class RandomMoveAnalyzer implements MoveAnalyzer { selectMove(moves: BackgammonMoveBase[]): Promise<BackgammonMoveBase | null>; } /** * Selects the move that leaves the most checkers furthest from being borne off. * If origin is available, uses its position; otherwise, falls back to dieValue. */ export declare class FurthestFromOffMoveAnalyzer implements MoveAnalyzer { selectMove(moves: BackgammonMoveBase[]): Promise<BackgammonMoveBase | null>; } export declare class ExamplePluginAnalyzer implements MoveAnalyzer { selectMove(moves: BackgammonMoveBase[], context?: MoveAnalyzerContext): Promise<BackgammonMoveBase | null>; } //# sourceMappingURL=moveAnalyzers.d.ts.map