Giter Site home page Giter Site logo

bl33h / connectfour Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 46 KB

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: MIT License

Python 100.00%
ai alpha-beta-pruning artificial-intelligence connectfour connectfour-game minimax minimax-algorithm pygame python

connectfour's Introduction

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

connectfour's People

Contributors

franzcastillo avatar bl33h avatar mendezg1 avatar

Stargazers

 avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.