Click the green flag to watch a game between the random AI (yellow) and my AI (red)
Thanks to @PullJosh ( and @PullJosh_test ) for creating the challenge. Changelog: v5 Reverted some changes made in v4 that broke some things. v4 Made it check for winning moves before blocking other player, made it block other player sooner. v3 Added some randomness to the move selection logic so that it doesn't always pick the leftmost column among all the good choices, made sure that it always takes a winning move v2: Improved the AI to block winning moves made by the other player, making the win rate approx. 97% against the random move AI v1: First version.