https://github.com/scar17off/chess-bot
An interactive chess game with an AI opponent, implemented in JavaScript
https://github.com/scar17off/chess-bot
bot bot-development bots canvas canvas-game chess chess-ai chess-bot chess-bot-2024 chess-com chess-engine chess-game game game-development html-css-javascript html-game html-games javascript js
Last synced: 3 months ago
JSON representation
An interactive chess game with an AI opponent, implemented in JavaScript
- Host: GitHub
- URL: https://github.com/scar17off/chess-bot
- Owner: scar17off
- License: mit
- Created: 2024-09-14T14:08:43.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T14:12:54.000Z (10 months ago)
- Last Synced: 2025-01-29T06:49:32.464Z (5 months ago)
- Topics: bot, bot-development, bots, canvas, canvas-game, chess, chess-ai, chess-bot, chess-bot-2024, chess-com, chess-engine, chess-game, game, game-development, html-css-javascript, html-game, html-games, javascript, js
- Language: JavaScript
- Homepage: https://scar17off.github.io/chess-bot/
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Chess Bot ♟️











This project is an interactive chess game with an AI opponent, implemented in JavaScript. ♔♕♖♗♘♙
## Features 🚀
- 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 🔍## Files 📁
- `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 📜## How to Use 🎮
1. Open `index.html` in a web browser to start the game. 🌐
2. Click on a piece to select it, then click on a valid square to move. 🖱️
3. 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 ↪️## AI Implementation 🧠
The AI uses the minimax algorithm with alpha-beta pruning to determine the best move. The evaluation function considers piece values and positional advantages. 🤖♟️
## License 📜
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
Feel free to contribute to this project by submitting pull requests or reporting issues! 🙌