PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

AI · Theory

Alpha-Beta Pruning

← All stacks

Theory

27/215

Alpha-Beta Pruning

Alpha-beta pruning skips branches that cannot change the minimax decision. Alpha is the best max can already force. Beta is the best min can already force. If a node becomes worse than that window, stop expanding it. Same answer as minimax, fewer nodes.

Order matters: good move ordering prunes more. Viva: “same result as minimax, less work”. Don’t say it makes a different (smarter) strategy.

Alpha-Beta Pruning — output — three lines. Not a different strategy — less work.

Exam tip

Same result as minimax + why order helps.

Example

# Alpha-beta idea
print("minimax value stays the same")
print("alpha/beta skip branches that cannot change the decision")
print("better move order → more prune")

Alpha-Beta Pruning — output: three lines. Not a different strategy — less work.

Short notes

  • DefPrune useless minimax branches.
  • RuleSame value, fewer nodes.
  • Rememberalpha / beta window.

Questions

1

Explain Alpha-Beta Pruning as if you are teaching a junior — definition, then one example.

2

What does the example print, and what does that prove?

3

What mistake do freshers make with Alpha-Beta Pruning?

Previous← Minimax AlgorithmNextKnowledge-Based Agent →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.