This repository hosts the source code and research for a dynamic web-based chess game developed using modern web technologies, integrated with Artificial Intelligence (AI) and Machine Learning (ML) techniques for an intelligent, scalable gameplay experience.
🔍 Built as a B.Tech Project at Manipal University Jaipur under the guidance of Ms. Deepti Sharma
- About the Project
- Key Features
- Tech Stack
- AI & ML Integration
- Project Objectives
- Architecture & Design
- Modules & Files
- Planned Enhancements
- How to Run
- Credits
- License
This project explores the integration of Minimax and Alpha-Beta Pruning algorithms for AI-based move prediction in a chess game, combined with a machine learning layer that adjusts AI difficulty dynamically based on the player's in-game behavior.
It aims to break the traditional complexity barrier of online chess platforms by offering:
- A clean, responsive web-based interface
- Smart difficulty adjustments based on gameplay analysis
- Minimal setup (no downloads or registrations)
- ♟️ Fully playable chess game in the browser
- 🧠 Intelligent AI opponent using Minimax + Alpha-Beta Pruning
- 📈 Adaptive difficulty using ML (rated 1–10 based on player performance)
- 🎯 Legal move validation, check/checkmate detection
- 🌐 (Planned) WebSocket-based multiplayer support
- ⚙️ Drag-and-drop interface with real-time feedback
- 🔐 Secure, tamper-proof game logic
| Layer | Tools Used |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| AI Logic | Custom Minimax + Alpha-Beta |
| ML Rating | Regression/Classification (JS) |
| Backend (future) | Node.js, Python (optional) |
| Database (future) | MongoDB |
| Deployment | GitHub Pages / AWS / Heroku |
- Enables efficient, optimized AI decision-making.
- Dynamically configurable depth for performance.
- Tracks user moves and assigns a difficulty rating (1–10).
- AI adapts its decision strategy in real-time to match player skill.
- Improves player engagement and learning curve.
- ✅ Create a web-based chess platform accessible via browser.
- ✅ Build an AI opponent that adjusts based on the player’s moves.
- ✅ Enhance accessibility for all user types (keyboard support, readable UI).
- ✅ Explore multiplayer functionality via WebSockets.
- ✅ Follow ethical AI development practices (fair, unbiased gameplay).
- ✅ Uphold strict academic integrity and originality.
- Responsive chessboard using CSS Grid.
- Drag-and-drop or keyboard input for moves.
- Visual cues for legal, check, capture, and checkmate states.
- Node.js server for multiplayer game state management.
- Python-based ML model integration (optional for difficulty scaling).
- Move data labeled with difficulty metrics.
- Trained model adjusts AI evaluation heuristics in real-time.
| File | Description |
|---|---|
index.html |
Main game interface layout |
style.css |
Styling and animations |
index.js |
JS logic for the interface and game state |
global.js |
Handles global events and move highlights |
main.js |
Core game loop and state transitions |
commonhelper.js |
Utility functions (move generation, highlights, etc) |
pieces.js |
Piece definitions and movement logic |
pieces/ |
Folder with all chess piece assets |
- 🌍 Multiplayer support via WebSockets
- 🗃️ Save/load games with MongoDB
- 📉 Graph-based skill progression for users
- 🔎 Enhanced ML training from historical games
- 🧪 Puzzle mode with scenario-based challenges
- A modern web browser (Chrome, Firefox, Edge)
- Optional: Node.js for backend/ML extension (future)
- Clone the repository:
git clone https://github.com/your-username/web-chess-ai cd web-chess-ai