This project is an interactive chess game with an AI opponent, implemented in JavaScript. ♔♕♖♗♘♙
- Play chess against an AI opponent 🤖
- Interactive chessboard with piece movement ♟️
- Move validation ✅
- Undo and redo moves ↩️↪️
- Move history display 📜
- Best move suggestion 💡
- Auto-move mode 🔄
- Free mode for piece placement 🆓
- Move analysis 🔍
index.html
: The main HTML file that structures the web page 🌐app.js
: Contains the game logic and user interface interactions 🧠bot.js
: Implements the AI opponent using the minimax algorithm 🤖LICENSE.md
: The license for the project 📜
- Open
index.html
in a web browser to start the game. 🌐 - Click on a piece to select it, then click on a valid square to move. 🖱️
- Use the checkboxes and buttons below the board to access different features:
- Enable Move Analysis: Highlights the best move for the current player 🔍
- Enable Auto Move: Automatically makes moves for the white player ⚪
- Free Mode: Allows free placement of pieces on the board 🆓
- Make Best Move: Makes the best move for the current player 🏆
- Undo: Reverts the last move ↩️
- Redo: Reapplies an undone move ↪️
The AI uses the minimax algorithm with alpha-beta pruning to determine the best move. The evaluation function considers piece values and positional advantages. 🤖♟️
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to contribute to this project by submitting pull requests or reporting issues! 🙌