# Chess AI with Keras and Stockfish
Welcome to the Chess AI project! This project combines the power of Keras for machine learning with the Stockfish chess engine to create a challenging and interactive chess experience. Play against a simple AI, or let two AIs battle it out!
## Features
- **Play against a Keras-based AI**: Experience a simple AI opponent that uses random moves.
- **Play against Stockfish**: Choose from various difficulty levels to challenge the powerful Stockfish engine.
- **Observe AI vs AI matches**: Watch two AIs compete against each other!
## Requirements
- Python 3.x
- Libraries: `chess`, `numpy`, `keras`
- [Download Stockfish](https://stockfishchess.org/download/): You need to download the Stockfish ZIP file and extract it. Place the extracted folder alongside this script.
## Installation
1. Make sure you have Python installed on your machine. You can download it from [python.org](https://www.python.org/downloads/).
2. Install the required libraries using pip:
```bash
pip install chess numpy keras
- Download the Stockfish engine from here.
- Extract the ZIP file and place the folder in the same directory as this script.
Run the script and choose an option from the menu:
- Play with Keras AI (Easy)
- Play with EvilCHESS AI (Various Difficulty Levels)
- See Play 2 AI
Follow the prompts to enter your moves and enjoy the game!
- Choose your opponent: Select whether you want to play against the Keras-based AI or the Stockfish engine.
- Make your move: Enter your move in UCI format (e.g.,
e2e4
). - Watch the AI play: If you're playing against Stockfish, the AI will respond based on the chosen difficulty level.
- Mohammad Taha Gorji - Developer of this project.
- Stockfish Team - For creating the powerful Stockfish chess engine.
- Keras Team - For providing a user-friendly interface for building neural networks.
This project is licensed under the MIT License. See the LICENSE file for more details.
Happy playing!
Coded by Mohammad Taha Gorji