Connect 4 with AI powered by Monte Carlo Tree Search.
See the Wikipedia entry on Connect 4 for gameplay and rules.
Clone the repository and compile code.
git clone https://github.com/avikj/Connect4AI.git
cd Connect4AI
javac *.java
Play against another human locally.
java Connect4TwoPlayer
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.
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.