课程: AI Algorithms for Game Design with Python

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Challenge: Write your own evaluation function

Challenge: Write your own evaluation function - Python教程

课程: AI Algorithms for Game Design with Python

Challenge: Write your own evaluation function

(upbeat music) - [Narrator] Ready for your next challenge? Here's an opportunity for you to code some of your intelligence into the cat. Your task is to write an evaluation function. Remember, it must assess how the game looks for the cat because we are running minimax from the cat's perspective. It must return higher, more positive values for better estimated outcomes. So it must return lower, more negative values for worse outcomes. Now, be aware that whose stern it is when we run the evaluation function actually matters. Simply put, if it's the opponent's tern, the cat still faces one certain move against it. Just follow the instructions in the code as usual. This exercise should take you about 30 minutes to complete. When you are done, make sure to look at my solution in the next video.

内容