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
vishnunathcr

nice work.
I think 0 and O are little confusing, X and O would have been better
And a clear console before each print would also be nice.

ChrisHill

I agree with @vishnunathcr it might be because I played this on an android screen but it's next to impossible to see the difference in shape. O and o would even be better.

WyattGeorge

@vishnunathcr yeah I agree about the clear console. I guess I didn’t think about the 0s and Os because they look different in the browser, but that’s an easy fix. Thanks for the feedback!

vishnunathcr