ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCOMP2121Alpha Beta Pruning
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    COMP2121

    Artificial Intelligence

    Progress0 / 19 done
    Topics19
    1An Introduction to Artificial Intelligence and its applications towards Knowledge Based Systems2Introduction to Reasoning and Knowledge Representation
    3Informed searching4Uninformed searching5Heuristics in Problem Solving6Local searching algorithms7Minimax algorithm8Alpha-beta pruning9Game-playing in AI
    10General Problem Solver11ELIZA12Student13Macsyma14Learning from examples15Artificial Neural Networks (ANN)16Natural Language Processing17Recent trends and applications of AI algorithms18Python programming for AI19Implementation of AI techniques in Python
    2 min read
    Topic 8 of 19
    Topic Study Note Illustration
    08

    Alpha-beta pruning

    Alpha-Beta Pruning is an optimization technique for the Minimax algorithm used in two-player adversarial games (like Chess or Tic-Tac-Toe). It reduces the number of nodes evaluated in...

    📘 Problem Solving by Searching: Alpha-Beta Pruning


    1. What is Alpha-Beta Pruning?

    Alpha-Beta Pruning is an optimization technique for the Minimax algorithm used in two-player adversarial games (like Chess or Tic-Tac-Toe). It reduces the number of nodes evaluated in the search tree without affecting the final result.

    💡 Goal: Skip unnecessary branches that cannot influence the final decision.


    2. Why Use Alpha-Beta Pruning?

    • Minimax explores every node to find the best move.
    • In complex games (like Chess), the search tree is too large.
    • Alpha-Beta Pruning helps cut off parts of the tree that don’t affect the decision, making it much faster.

    3. Key Terms

    Term Meaning
    Alpha (α) Best value that the maximizer (AI) can guarantee so far
    Beta (β) Best value that the minimizer (opponent) can guarantee so far
    Prune Stop exploring a branch because it can't influence the outcome

    4. How It Works (Conceptually)

    • Traverse the tree depth-first, just like in Minimax.

    • At each Max node:

      • Update Alpha if a better value is found.
      • Prune if Alpha ≥ Beta.
    • At each Min node:

      • Update Beta if a lower value is found.
      • Prune if Beta ≤ Alpha.

    🧠 Pruning condition: If a move is worse than what we've already seen, don’t explore it further.


    5. Visual Example

               MAX
             /     \
           MIN     MIN
          /  \     /  \
         3    5   2    9
    
    • Without pruning, all 7 nodes are evaluated.
    • With Alpha-Beta, some branches (like the "9" under the second MIN) can be skipped because they cannot improve the final decision.

    6. Effectiveness

    • Time Complexity (best case): O(b^(d/2))

      • b = branching factor
      • d = depth of tree
    • This means it can double the depth that can be explored compared to basic Minimax.


    ✅ Summary

    Concept Description
    Alpha-Beta Pruning Optimizes Minimax by eliminating branches that won’t affect the final decision
    Alpha (α) Best option so far for the maximizer
    Beta (β) Best option so far for the minimizer
    Effect Same result as Minimax, but faster
    Best Case Doubles depth of search vs. plain Minimax

    ← Previous topic 7
    Minimax algorithm
    Next topic 9 →
    Game-playing in AI

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    2mremaining
    338words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Artificial Intelligence