From the course: AI Algorithms for Gaming

Unlock the full course today

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

Is iterative deepening really that good?

Is iterative deepening really that good? - Python Tutorial

From the course: AI Algorithms for Gaming

Is iterative deepening really that good?

- [Instructor] Now I want you to see how well we are doing at our objective of making the best use of our time with iterative deepening. That's why I have written two more lines to this function. I just couldn't resist. These two lines are 401 and 402. And what I'm doing here is reporting in the console how long it has taken to go through each tree in the for loop. This way we'll have real data in the running example. Let's take a look. Let me use a five by five hex grid and I will not use alpha beta pruning, but I will use iterative deepening. So let me make one move. In this example we were willing to wait five seconds for the cat to move. And so notice that the time it took to have our final answer which was a depth five, this time was about 3.5 seconds. The rest of the time was spent in depth six, which was interrupted. But looking at the effective time, these 3.5 seconds notice how much of that time was spent…

Contents