ai-connect4
A Connect Four rules and search library built on two bitboards.
Play against it compiled to Wasm here: https://thegustafson.com/games/connect-four
Self-play
The selfplay binary runs deterministic paired-color matches. Each opening is
played twice with the engines swapping Red and Yellow.
The six built-in profiles are beginner, easy, medium, hard, expert,
and maximum. Use --a-depth, --a-nodes, and the corresponding --b-*
options to override their limits. Library users can read the same settings with
search_preset or SEARCH_PRESETS.
Use it
Add the crate to your project:
[]
= "0.1"
use ;
let mut position = default;
position
.make_move
.expect;
let result = search;
assert!;
The crate includes reversible moves, perft, alpha-beta search, move ordering, and an optional transposition table.
Licensed under the MIT License.