课程: AI Algorithms for Game Design with Python
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge: A depth-limited cat - Python教程
课程: AI Algorithms for Game Design with Python
Challenge: A depth-limited cat
(upbeat music) - [Instructor] It's coding time again. For this challenge, your task is to modify the code for minimax and alpha beta pruning in their respective max value and min value methods to support depth limited search. Once again, you will find the instructions in the source file, and you will be required to fill in the blanks in a few parts of the code. This time, you may test your cat in any world. The size of the world is not a limitation anymore because you'll have control of the maximum depth to reach. Try it with different depths. To implement limited depth search, we need a few additions to the code. First look at line 38 where we have two new class attributes, max depth, which keeps track of the maximum depth we are willing to reach, and reached max depth, which is a flag we will set the first time we reach the maximum depth. This flag may be useful for this algorithm, but it will become crucial a little later. The first use of these is in the select cat move method…
内容
-
-
-
-
-
(已锁定)
Depth-limited search3 分钟 50 秒
-
(已锁定)
Writing good evaluation functions6 分钟 55 秒
-
(已锁定)
Is alpha-beta pruning still relevant?2 分钟 32 秒
-
(已锁定)
Challenge: A depth-limited cat4 分钟 10 秒
-
(已锁定)
Solution: A depth-limited cat3 分钟 35 秒
-
(已锁定)
Challenge: Write your own evaluation function1 分钟 8 秒
-
(已锁定)
Solution: Write your own evaluation function3 分钟 7 秒
-
(已锁定)
-
-
-