Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

generic-min-max

royhadad45MIT1.0.6TypeScript support: included

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

generic-min-max, minmax, minimax, min-max, ai, chess, chess-engine, chess-computer, tictactoe-engine, algorythm

readme

generic-min-max

This node.js module exports a generic min-max algorithm, alongside some implementations

This package comes with full typescript support!

Usage example (ES6/Typescript):

import minMax from "generic-min-max";
import {TicTacToe} from "generic-min-max/implementations";

const ticTacToe = new TicTacToe();
const continuation = minMax(ticTacToe, 9);

console.log('evaluation', continuation.evaluation);
console.log('best continuation', continuation.state);