image thumbnail

Connect 4

version 1.0.0 (6.28 KB) by Kelvin Hamilton
Connect 4 Versus Greedy Algorithm

2 Downloads

Updated 29 Jul 2021

View License

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 (2021). 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 Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!