From the course: AI Algorithms for Gaming
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Alpha-beta pruning - Python Tutorial
From the course: AI Algorithms for Gaming
Alpha-beta pruning
- [Instructor] We still have that billions of years problem. So a first attempt to solve it is called alpha-beta pruning. It's based on the observation that when analyzing a min node or max node, some options can't possibly be the min or max value we are looking for. So these options can be safely left unchecked. Now, remember that an option in the minimax tree is a sub-tree that can be pruned off. So our hope with this pruning is to get rid of a lot of unnecessary work. However, the task still seems uphill. Do you think we'll be able to shrink 300 times 10 to the 15 years down to something reasonable like 10 years? We'll see how well alpha-beta pruning actually does a little later. For now, let me show you how it works. Consider the same example we used for minimax. I will guide you through the whole process again, but this time we'll follow the alpha-beta search algorithm. Now, for the left sub-tree action a, we'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Minimax overview4m 1s
-
(Locked)
Minimax example5m
-
(Locked)
The minimax algorithm3m 41s
-
(Locked)
A word on complexity2m 45s
-
(Locked)
Code example: A perfect cat in a small world6m
-
(Locked)
Alpha-beta pruning5m 32s
-
(Locked)
The alpha-beta search algorithm5m 9s
-
(Locked)
Code example: A pruning cat3m 25s
-
-
-
-
-