import { TrainData } from '../game/TrainData'; import { AiAction, AiObservation, AiPlayAction, CandidateGenerator } from './types'; /** * Indices (into `obs.trains`) the player may legally build on under standard * Mexican Train access: your own train, plus any train flagged public. Games * with richer access rules (Warp12's Distress Beacon, locked fractures, …) * supply their own {@link CandidateGenerator}. */ export declare function getAccessibleTrainIndices(obs: AiObservation): number[]; /** Union of every played tile's key across all trains (uniqueness is global). */ export declare function collectAllPlayedKeys(trains: readonly TrainData[]): Set; /** Every legal placement of a hand tile onto an accessible train. */ export declare function generatePlayActions(obs: AiObservation): AiPlayAction[]; export interface CandidateGeneratorOptions { /** * Offer `draw` even when legal plays exist. Off by default (canonical "must * play if you can"). Turn on for variants where drawing is always optional — * combined with a high blunder rate this is what makes a beginner draw when * they didn't have to. */ allowOptionalDraw?: boolean; } /** * Builds the standard candidate set: all legal plays, plus `draw` when the pile * isn't empty (and either there are no plays, or optional drawing is enabled), * falling back to `pass` only when nothing else is possible. */ export declare function createCandidateGenerator(options?: CandidateGeneratorOptions): CandidateGenerator; export declare const defaultCandidateGenerator: CandidateGenerator;