@nodots-llc/backgammon-ai
Version:
AI and integration for nodots-backgammon using the @nodots-llc/gnubg-hints native addon.
28 lines • 1.16 kB
TypeScript
import type { HintRequest } from '@nodots-llc/gnubg-hints';
import { BackgammonMoveBase } from '@nodots-llc/backgammon-types';
export interface MoveAnalyzerContext {
board?: any;
positionId?: string;
hintRequest?: HintRequest;
[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