Connect Four with Smart AI Player

Try to beat the AI! This is a version of Connect Four with a smart AI player that makes intelligent moves.

The AI evaluates each possible move and picks what it thinks is the best one, resulting in a hard (but not impossible!) to beat adversary.

-Update: Changed characters to be clearer, console is now cleared after each move
-Update: Fixed a bug that prevented the AI from picking a column if it was guaranteed to lose

You are viewing a single comment. View All

How are you supposed to win, the AI plays perfectly with the power of machine comparison


@CSharpIsGud It is definitely possible to win, but the AI is indeed difficult. It will occasionally make mistakes though, so keep trying!