From the course: AI Algorithms for Game Design with Python

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Depth-limited search

Depth-limited search

- [Instructor] So let's stop for a moment and ask ourselves, what's stopping us from doing better? Well, complexity. Minimax inherently runs on the depth-first search tree traversal algorithm. So it's really impossible to do the whole thing significantly faster. But wait, the fact that we cannot find a perfect solution to this problem in a short time doesn't mean that we cannot find a reasonable solution in a short time. This has been the key enabler to useful AI we are using today, like traffic apps or self-driving cars. A solution produced in a short amount of time doesn't have to be bad. So with this in mind, we could make some compromises. For example, we could prune further by identifying and skipping states that we've already seen. We could even push this to identifying rotations and reflections of already-seen states. We could also reduce b, the branching factor, by selecting the, say, three most promising moves while leaving unproductive or self-harming moves unchecked. And we…

Contents