Skip to content
Sign upLog in
Connect Four with Smart AI Player
Profile icon

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
Profile icon

A few days with a couple hours a day. Maybe 10-15 hrs total. Most of the time was spent debugging stuff but I already had the framework in my head. I've also made games like tic-tac-toe with a similar AI before, which helped a lot.