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.
- 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.
- 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.
- Game Board: Dynamically generated for two AIs to place their moves.
- AI Models: Two different AI models—“Learning AI” and “Hard AI” are built, with “Learning AI” using an advanced architecture.
- Training and Predictions: AIs learn from previous game states and adjust strategies based on results.
- Dynamic Visualization: Displays game statistics, wins, losses, and win probabilities in real-time.
- Loop Mode: Allows continuous AI vs. AI gameplay for extensive training.
-
Clone this repository.
-
Install the required dependencies:
pip install -r requirements.txt
-
Start the Flask server:
python app.py
-
Open the index.html file in your browser to start the game.
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.