From the course: AI Algorithms for Game Design with Python
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Monte Carlo evaluation functions - Python Tutorial
From the course: AI Algorithms for Game Design with Python
Monte Carlo evaluation functions
- [Instructor] Let's go back to the limited depth problem. By now, you should know that evaluation functions are tricky to get right. That's because we don't really have a clue of the actual quality of our functions. These functions are usually based on our own speculation. So here's a clever idea, which is sometimes called a Monte Carlo evaluation function. Suppose we are at the maximum limited depth and we need an evaluation value. Instead of calling an arbitrary function, we could keep on playing the game by making a random move, then another and another, another, and so on until we reach a terminal node. In this example, it's a winning scenario of value plus 100, but we don't have to stop there. We could play another sequence of random moves for both players until we get a terminal node again. This example shows a tie, that's a value of zero. And so on, we could do this several times. This time, we got a losing outcome of minus 100. In this other sequence, we got minus 100 again…