Terminal Chess
A feature-rich chess game playable directly in your terminal. Includes ASCII art board representation, piece movement validation, check/checkmate detection, and an AI opponent using minimax with alpha-beta pruning.
Terminal Chess
Terminal Chess is a command-line chess game implemented in Python. It features a clean ASCII art representation of the chess board and pieces, along with an AI opponent that uses the minimax algorithm with alpha-beta pruning.
Features
- Complete chess rule implementation
- ASCII art chess board display
- Two-player mode
- AI opponent with configurable difficulty levels
- Move validation and legal move highlighting
- Check and checkmate detection
- Castling, en passant, and pawn promotion
- Move history and notation
- Save and load games
Installation
git clone https://github.com/Vedant-Asati03/TerminalChess.git
cd TerminalChess
pip install -r requirements.txt
Usage
python terminalchess.py
AI Implementation
The AI uses the minimax algorithm with alpha-beta pruning to search through possible moves. The evaluation function considers:
- Material value
- Piece positions
- Mobility
- King safety
- Pawn structure
The search depth is adjustable based on the difficulty level selected.
Screenshots
Terminal Chess gameplay showing a mid-game position
Future Improvements
- Opening book implementation
- Endgame tablebases
- Time controls
- Online multiplayer
- ELO rating system
License
This project is licensed under the MIT License - see the LICENSE file for details.