This is my final project for Introduction to Artificial Intelligence at FAMU-FSU College of Engineering (Summer 2021 - Dr. Jerris Hooker). Click the columns where you would like to place your disc. Human is red and the AI is yellow. The AI uses the greedy algorithm, so it is not perfect. It will sometimes inadvertently give the human a winning move, so there is a small chance that the AI will give out a free win. The optimal way to code a Connect 4 AI is with the minimax algorithm, which you can see in action here.
Cite As
Kelvin Hamilton (2024). Connect 4 (https://www.mathworks.com/matlabcentral/fileexchange/96758-connect-4), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |