cympfh / connect-four

Connect-Four Game AI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connect-Four Game AI


  1. wikipedia/Connect_Four
  2. nintendo/Club House Games


Input Text Format

Each Input is like


Character o and x are the colored discs for players. And . is for empty.

The height and width can be any size if >= 4. The following is also ok, and this is the minimal size.



This AI works with cargo.

cargo run --release -- --next x < ./sample.input

--next specifies which (o or x) is the next player.


Best move for the --next player will be outputed.

Graphical User Interface is written in Python3 and launch a server for UI.

pip3 install fastapi uvicorn
uvicorn server:app --port 8080
$(open-browser) http://localhost:8080
ezoic increase your site revenue


Connect-Four Game AI


Language:Python 52.8%Language:Rust 47.2%