A modern chess application built with React featuring local multiplayer, AI-powered gameplay, and shareable game sessions. The project includes a custom chess engine with complete move validation, special chess rules, and multiple AI difficulty levels powered by minimax search and evaluation algorithms.
- Local Multiplayer (2 players on the same device)
- Play Against AI Bot
- Play with Friends via Shareable Game Links
- Online Match Interface (Coming Soon)
- Complete Piece Movement Logic
- Check Detection
- Checkmate Detection
- Castling Support
- En Passant Support
- Automatic Pawn Promotion
- Move Validation
- Turn Management
- Random legal move generation
- Position evaluation using weighted scoring
- Minimax Algorithm
- Alpha-Beta Pruning
- Quiescence Search
- Strategic Move Selection
- Interactive Chess Board
- Legal Move Highlighting
- Check Warning Indicators
- Turn-Based Timer System
- Game State Management
- Shareable Match Links
- React.js
- JavaScript (ES6+)
- HTML5
- CSS3
- Custom Chess Engine
- Minimax Algorithm
- Alpha-Beta Pruning
.
├── public/
│ ├── index.html
│ └── favicon.ico
│
├── src/
│ ├── App.js
│ ├── ChessGame.js
│ ├── ChessBoard.js
│ ├── GameModeSelector.js
│ ├── App.css
│ ├── index.css
│ └── index.js
│
├── test_chess.js
├── test_edge_cases.js
├── package.json
└── README.md
- User selects a game mode.
- The chess board is initialized with standard piece placement.
- Game state and timers are created.
The custom chess engine:
- Validates piece movement
- Checks legal destinations
- Prevents illegal moves
- Ensures king safety
- Applies special chess rules
Depending on difficulty level:
- Easy: Random move selection
- Medium: Position evaluation and weighted scoring
- Hard: Minimax search with Alpha-Beta pruning
The engine continuously checks:
- Check conditions
- Checkmate conditions
- Turn changes
- Timer expiration
- Special move availability
The bot evaluates:
- Material advantage
- Piece activity
- Board control
- Tactical opportunities
Hard mode uses:
- Minimax Search
- Alpha-Beta Pruning
- Quiescence Search
to determine the strongest available move.
git clone <repository-url>npm installnpm startnpm testnode test_chess.js
node test_edge_cases.js- Multiplayer Server Synchronization
- Real-Time Online Matches
- ELO Rating System
- Move History Analysis
- Game Replay System
- Chess Opening Database
- Stockfish Integration
Anuj Srivastava
Aspiring Full-Stack Developer | React | Python | AI | Data Science



