From the course: AI Algorithms for Gaming
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
The iterative deepening technique - Python Tutorial
From the course: AI Algorithms for Gaming
The iterative deepening technique
- [Instructor] In most games, you have a time limit to analyze the game and think about your next move. Since we have to produce a move before the deadline, we could use depth-limited search, but two unwanted scenarios could come up. We could respond too late, in which case there may be a penalty. We might miss a turn, or lose altogether. We could also respond too early, so early that maybe a deeper tree would have been possible, and thus a wiser move could have been made. The problem is that we have no guarantees as to how long the tree will take to compute, not even with a known limited depth. This is due to a variety of reasons. Some states might have more possible moves than others. We might prune off some branches. Some terminal states might show up earlier than others. And the list goes on. So the question at hand is how can we make the best use of our time? Here's a crazy idea called iterative deepening. Let's…
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.