Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect Four AI Game with Advanced Learning

This project is a web-based Connect Four AI game featuring two AI models playing against each other. The aim is to explore and compare different AI models' learning capabilities in a simulated game environment using deep learning techniques.

Fun Fact: This game is mostly created with an AI!

Features

  • AI vs. AI Gameplay: Two AI models compete in an endless loop, allowing continuous training and strategic adjustments.
  • Advanced Learning Model: Includes an AI with a sophisticated neural network architecture featuring convolutional layers, batch normalization, and dropout for enhanced strategic gameplay.
  • Performance Comparison: Displays win probabilities and improvements over time with dynamic graphs.
  • Win Probability Graph: Visualizes each AI’s winning probability over recent games using a moving average.
  • Trainable AI: AIs continuously learn and refine strategies based on game outcomes.

Technology Stack

  • Frontend: HTML, CSS, JavaScript (Chart.js for visualization).
  • Backend: Python with Flask for handling AI predictions and training.
  • Deep Learning Framework: TensorFlow with Keras for model creation and training.

How It Works

  1. Game Board: Dynamically generated for two AIs to place their moves.
  2. AI Models: Two different AI models—“Learning AI” and “Hard AI” are built, with “Learning AI” using an advanced architecture.
  3. Training and Predictions: AIs learn from previous game states and adjust strategies based on results.
  4. Dynamic Visualization: Displays game statistics, wins, losses, and win probabilities in real-time.
  5. Loop Mode: Allows continuous AI vs. AI gameplay for extensive training.

How to Run

  1. Clone this repository.

  2. Install the required dependencies:

    pip install -r requirements.txt
    
    
  3. Start the Flask server:

    python app.py
    
  4. Open the index.html file in your browser to start the game.

Future Improvements

Reinforcement Learning: Further enhance AI decision-making. Customizable Parameters: Allow flexibility in neural network training. In-Depth Analytics: Track AI progress with more advanced performance metrics.

About

This project is a web-based Connect Four AI game where two AIs compete using deep learning models. One AI uses an advanced neural network for strategic learning. Features include continuous AI vs. AI gameplay, win probability graphs, and real-time model training and performance tracking. Built with Flask, TensorFlow, and Chart.js.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages