A simple Connect4 made with C++ and SFML for the window. Currently, only the Minimax with Alpha Beta Pruning is implemented. Maybe, in the future, I'll implement other algorithms if I want to (such as MCTS?).
Connect4_AI_6cDWwN6NnG.mp4
If you've a C/C++ IDE, you should already have cmake
and gcc
/g++
. If not, then install CMake here and gcc/g++ here.
- Clone the repository
git clone https://github.com/marcpinet/connect4-ai
- Initialize the SFML submodule
git submodule update --init --recursive
- Build with CMake
cmake -S . -B output -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles"
- Build the project using make inside the newly created output folder
cd output && make
- Run the
.exe
- Run the holy command
sudo apt-get update
- Install the following packages
sudo apt install libsfml-dev gdb cmake build-essential libvorbis-dev libopenal-dev freetype2-demos libudev-dev libx11-dev libxrandr-dev
- Clone the repository
git clone https://github.com/marcpinet/connect4-ai
- Initialize the SFML submodule
git submodule update --init --recursive
- Build with CMake
cmake -S . -B output -DCMAKE_BUILD_TYPE=Release
- Build the project using make inside the newly created output folder
cd output && cp -r ../assets assets && make
- Run the file!
chmod u+x Connect4_AI && ./Connect4_AI
On Windows, it will probably be easier to run the project using an IDE such as CLion.
No cache issue.