UNPKG

generic-min-max

Version:

This node.js module exports a generic min-max algorithm, alongside some implementations This package comes with full typescript support!

13 lines (12 loc) 324 B
export interface BoardGameState { player1Turn: boolean; } export interface Game<State extends BoardGameState> { initialState: State; getAllNextStates: (state: State) => Array<State>; getHeuristic: (state: State) => number; } export interface Continuation<State> { evaluation: number; state: State; }