Connect Four with Smart AI Player
WyattGeorge

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

You are viewing a single comment. View All
UndertaleRulez

i really liked it there is one little thing that i didn't like tho, at one point in one of the rounds it said over the game board " there is no escape now" i would have taken a screen shoot if i knew how. please reply as soon as you can and explain to me if you meant to do that or not

WyattGeorge

@UndertaleRulez Yeah that was just a little something I added to indicate that the AI is pretty confident (>80%) that it is going to win. I have noticed that it is sometimes wrong though (and there's no real need for it), so I may change that in the future. Thanks for the feedback!