Skip to content

Chess ai using minimax, optimized with alpha-beta pruning in PHP

Notifications You must be signed in to change notification settings

NirajXtha/chess

Repository files navigation

Chess Application with Alpha-Beta Pruning: Intelligent Move Generation

Welcome to our Chess Application, a beginner-friendly chess platform designed to help users understand chess strategies and learn the game through intelligent AI-powered move suggestions. Built with the Minimax Algorithm enhanced by Alpha-Beta Pruning, this application ensures optimal gameplay by evaluating all possible moves and counter-moves efficiently.


🏆 Objectives

  1. Develop a Competitive AI Opponent: The AI evaluates and simulates all potential scenarios to challenge users at every level.
  2. Optimize Decision-Making: By leveraging Alpha-Beta Pruning, the AI minimizes potential losses and maximizes potential gains for smarter gameplay.

🚀 Features

1. User Account System

  • Login/Register: Secure accounts with OTP-based authentication.
  • Profile Management: Edit and customize user profiles easily.

2. Interactive Chess Gameplay

  • Player vs AI: Users can challenge the AI opponent to learn and improve.
  • AI vs AI Simulation: Watch and analyze AI decisions to understand the mechanics behind optimal moves.
  • Move Validation & Visualization: Ensure every move adheres to chess rules with clear visual feedback.

3. Social Interaction

  • Friend Requests: Connect with other players by sending and receiving friend requests.
  • Match History: Review past games to track progress and learn from mistakes.

4. AI-Powered Insights

  • Best Move Suggestion: Learn optimal strategies as the AI evaluates every possible move and its consequences.

📖 Development Model

This project follows the Prototype Model, iteratively refining features to ensure a user-friendly and efficient experience.


🎥 Demo & Interface

Below are examples of our application interface and a gameplay demo.

Gameplay Demo


📩 Request Documentation

If you'd like the detailed documentation of this project, feel free to reach out at:
📧 Email: [email protected]


💻 Tech Stack

  • Frontend: HTML, CSS, JavaScript
  • Backend: PHP
  • Database: MySQL
  • Server Environment: Laragon

🌟 How It Works

  1. Alpha-Beta Pruning:
    The AI evaluates each move using the Minimax Algorithm, with Alpha-Beta Pruning reducing unnecessary calculations, making decision-making faster and more efficient.

  2. User Journey:

    • Register or log in with OTP authentication.
    • Set up a match or analyze an AI-vs-AI game.
    • Learn through intuitive move visualization and feedback.
    • Interact socially through friend requests and match history tracking.

📜 License

This project is open-source and available for learning and non-commercial purposes.


Let’s master chess together! ♟️