ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Artificial Intelligence
    COMP2121
    Progress0 / 19 topics
    Topics
    1. An Introduction to Artificial Intelligence and its applications towards Knowledge Based Systems2. Introduction to Reasoning and Knowledge Representation3. Problem Solving by Searching: Informed searching4. Problem Solving by Searching: Uninformed searching5. Heuristics in Problem Solving6. Local searching algorithms7. Minimax algorithm8. Alpha-beta pruning9. Game-playing in AI10. Case Study: General Problem Solver11. Case Study: ELIZA12. Case Study: Student13. Case Study: Macsyma14. Learning from examples15. Artificial Neural Networks (ANN)16. Natural Language Processing17. Recent trends and applications of AI algorithms18. Python programming for AI19. Implementation of AI techniques in Python
    COMP2121›Alpha-beta pruning
    Artificial IntelligenceTopic 8 of 19Regular Notes

    Alpha-beta pruning

    2 minread
    338words
    Beginnerlevel

    📘 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 load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time2 min
      Word count338
      Code examples0
      DifficultyBeginner