#connect #solver #four #score #perfect #strong #player

bin+lib connect-four-solver

A strong and perfect connect four solver in Rust

6 releases

0.2.4 Jan 27, 2025
0.2.3 Jan 27, 2025
0.1.0 May 10, 2023

#545 in Math

Download history 1/week @ 2024-10-30 1/week @ 2024-11-06 210/week @ 2025-01-08 57/week @ 2025-01-15 266/week @ 2025-01-22 52/week @ 2025-01-29 28/week @ 2025-02-05

467 downloads per month
Used in monte-carlo-tree-search

AGPL-3.0

140KB
626 lines

Perfect Connect Four

A perfect connect four solver in Rust.

Inspired by this tutorial for writing a perfect and strong solver for connect four: http://blog.gamesolver.org/solving-connect-four/01-introduction/

This crate provides an efficient bitboard implementation of Connect Four and a score function which tells you how many turns the current player needs to win, loose or draw from this position.

No runtime deps