Skip to content

domw95/minimaxer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0946746 · Mar 27, 2023
Jan 19, 2023
Jan 19, 2023
Feb 5, 2023
Mar 16, 2023
Mar 27, 2023
Mar 26, 2023
Mar 27, 2023
Mar 27, 2023
Jan 19, 2023
Jan 19, 2023
Jan 25, 2023
Jan 19, 2023
Jan 19, 2023
Mar 27, 2023
Jan 19, 2023
Mar 16, 2023
Jan 25, 2023
Mar 27, 2023
Mar 27, 2023
Jan 19, 2023
Jan 18, 2023
Mar 16, 2023

Repository files navigation

Minimax Library for Typescript and Javascript

This library features the negamax, minimax and maxn (experimental) algorithms for find the best moves in turn based games. It can be used to build game-playing 'A.I'.

It features a number of tuning options:

  • Depth based searches | Search to a specified depth (number of moves ahead).
  • Iterative Deepening searches | Search 1 depth further each time until final depth reached.
  • Time based searches | Search deeper and deeper until time expires.
  • Alpha-beta pruning | Greatly reduces search space.
  • Presorting nodes | Combines with alpha-beta pruning for even better results.
  • Optimised sort | Makes presorting even faster.
  • Random selections | Select moves randomly (weighted or not) to appear less 'robotic'.

and many more!

Installation

npm i minimaxmer

Usage

See the docs at https://domw95.github.io/minimaxer/index.html.

How it works

See the series of blog posts at https://domwil.co.uk/minimaxer/.

Examples

See the examples directory for some simple implementations.

See my Azul project for a more advanced use case.

About

Library for building game trees and running the minimax algorithm for turn-based games

Resources

License

Stars

Watchers

Forks

Packages

No packages published