-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
@markerosenbaum Thanks for the comment. To be honest though, Connect Four is a solved game, so I could make the AI win every time if I really wanted to...this is supposed to be a tough but bearable opponent.
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.
https://repl.it/@WyattGeorge/ConnectFour
-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
I beat this AI over and over. I have not lost once to it.
try to make it harder.