Skip to content

A program that implements Connect Four with a Python Pygame GUI, supporting player vs. AI and AI vs. AI modes. It uses the MiniMax algorithm with optional alpha-beta pruning for enhanced performance.

License

Notifications You must be signed in to change notification settings

bl33h/connectFour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

connectFour

This project is an implementation of Connect Four with a graphical user interface using Python and Pygame. It supports both player versus AI and AI versus AI gameplay modes, providing an engaging experience for users to challenge the computer or observe AI battles. The AI logic is powered by the MiniMax algorithm, which can optionally use alpha-beta pruning to enhance performance by reducing the number of nodes evaluated in the decision-making process.


pic

FilesFeaturesHow To Use

Files

  • board.py: Manages the game board representation and operations.
  • connect4.py: Core game logic implementation, utilizing the MiniMax algorithm.
  • game.py: Integrates all components (board, game logic, GUI) and manages the game flow.
  • gui.py: Provides the graphical interface using Pygame, handling user interactions and rendering.
  • main.py: Main entry point for starting the game application.
  • main_menu.py: Handles the main menu logic and transitions.
  • minimax.py: Implements the MiniMax algorithm with optional alpha-beta pruning for AI.

Features

  • Player vs. AI and AI vs. AI Modes: Play against an intelligent AI or watch an AI vs. AI showdown.

  • Graphical User Interface: Fully interactive GUI with dynamic updates during gameplay.

  • Intelligent AI: AI uses MiniMax algorithm, optionally enhanced with alpha-beta pruning for efficiency.

  • Version I: This is the initial version of the simulation, designed to explore and measure the efficiency of the integer division operation.

How To Use

To clone and run this application, you'll need Git and Python installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/bl33h/connectFour

# Open the project
$ cd src

# Run the app
$ python main.py

About

A program that implements Connect Four with a Python Pygame GUI, supporting player vs. AI and AI vs. AI modes. It uses the MiniMax algorithm with optional alpha-beta pruning for enhanced performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages