Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 891 Bytes

README.md

File metadata and controls

45 lines (28 loc) · 891 Bytes

Connect4AI

Connect 4 with AI powered by Monte Carlo Tree Search.

How to play

See the Wikipedia entry on Connect 4 for gameplay and rules.

Installation/Setup

Clone the repository and compile code.

git clone https://github.com/avikj/Connect4AI.git
cd Connect4AI
javac *.java

Two player

Play against another human locally.

java Connect4TwoPlayer

Single player against AI

Play against the AI.

java Connect4SinglePlayer <seconds>

Optional argument for time given to AI to determine move; defaults to 2 seconds. Higher time values result in stronger but slower AI.

AI against AI

Watch AI play against itself.

java Connect4AIvAI <seconds>

Optional argument for time given to AI to determine move; defaults to 2 seconds. Higher time values result in stronger but slower AI.