Skip to content

mr-r0ot/Chess_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

# 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
  1. Download the Stockfish engine from here.
  2. Extract the ZIP file and place the folder in the same directory as this script.

Usage

Run the script and choose an option from the menu:

  1. Play with Keras AI (Easy)
  2. Play with EvilCHESS AI (Various Difficulty Levels)
  3. See Play 2 AI

Follow the prompts to enter your moves and enjoy the game!

How to Play

  1. Choose your opponent: Select whether you want to play against the Keras-based AI or the Stockfish engine.
  2. Make your move: Enter your move in UCI format (e.g., e2e4).
  3. Watch the AI play: If you're playing against Stockfish, the AI will respond based on the chosen difficulty level.

Acknowledgments

  • 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.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Happy playing!

Coded by Mohammad Taha Gorji