12 releases
0.5.3 | Nov 27, 2023 |
---|---|
0.5.2 | Jun 7, 2023 |
0.5.1 | Mar 22, 2023 |
0.4.0 | Nov 5, 2022 |
0.0.2 | Sep 27, 2015 |
#591 in Machine learning
105KB
2.5K
SLoC
minimax-rs - Generic implementations of Minimax in Rust.
About
This library provides interfaces that describe:
- the rules for two-player, perfect-knowledge games;
- methods of evaluating particular game states for a player; and
- strategies for choosing moves for a player.
This crate implements multiple different strategies, so that any combination of custom evaluators and strategies can be tested against each other. These include single- and multi-threaded algorithms using alpha-beta pruning, iterative deepening, and transposition tables. There is also a basic implementation of multi-threaded Monte Carlo Tree Search, which does not require writing an evaluator.
Example
The ttt
and connect4
modules contain implementations of Tic-Tac-Toe and
Connect Four, demonstrating how to use the game and evaluation interfaces.
test
shows how to use strategies.
Dependencies
~0.3–2.2MB
~39K SLoC