MinichessAI is an intelligent chess engine designed for the exciting 6x5 Minichess variant—a fast-paced, compact version of the classic game. This project challenges the boundaries of artificial intelligence and game theory by building an AI that can compete with both human and computer opponents. The core objective is to apply advanced algorithms to strategic gameplay while providing a seamless and interactive user experience.
- Smart Game Tree Search: Efficient navigation and exploration of possible game states using optimized search techniques.
- Minimax with Alpha-Beta Pruning: Powerful move selection powered by the minimax algorithm, enhanced with alpha-beta pruning to drastically reduce unnecessary computations.
- Dynamic Evaluation Function: A carefully crafted evaluation function assesses board positions to guide the AI’s strategy at every step.
- Early Termination Mechanism: The AI can intelligently halt its search when certain criteria are met, ensuring timely and responsive gameplay.
- Intuitive User Interface: Play Minichess against the AI through an easy-to-use interface, with graphical enhancements encouraged for a richer experience.
- Robust Version Control: All work is tracked via Git, enabling collaboration, reproducibility, and transparency.
- Explore the game tree with depth-limited search, balancing speed and foresight.
- Employ the minimax algorithm to anticipate opponent moves and select the most promising strategy.
- Improve efficiency by pruning branches that cannot influence the outcome, allowing deeper search within the same time frame.
- Quantify the strength of a given board state using piece values, positional factors, and dynamic heuristics.
- Return the best move so far if a time constraint, forced mate, or other early stop condition is detected.
- Engage with the AI through a simple command-line or graphical UI. Enhanced graphics/UI features are welcome for extra credit and user enjoyment.
- All code, documentation, and assets are managed in a Git repository for easy tracking and collaboration.
- Build a competitive Minichess AI that challenges human and AI opponents.
- Demonstrate mastery of game tree search, minimax, and alpha-beta pruning.
- Design a robust, insightful evaluation function for board analysis.
- Provide a user-friendly platform for playing and testing Minichess.
- Maintain clear, well-documented code and project history via Git.
- Clone the Repository
git clone https://github.com/Tashrif-007/MiniChessAI.git
- Install backend Requirements
pip install -r requirements.txt
- Install Frontend Dependencies
npm i
- Add .env.local
NEXT_PUBLIC_API_URL="http://localhost:8000"
- Run the Frontend and Backend
npm run dev uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
- Play and Enjoy!
- Interact with the AI via the provided UI.
- Experiment with different strategies and difficulty levels.