课程: AI Algorithms for Game Design with Python
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge: A perfect cat in a small world - Python教程
课程: AI Algorithms for Game Design with Python
Challenge: A perfect cat in a small world
(upbeat bright music) - [Instructor] It is time for your first challenge. I like to call this "A Perfect Cat in a Small World". Your task is to finish the minimax algorithm, but don't worry, you won't have to write it from scratch. You'll just have to fill in the blanks indicated in the code. Now, let's talk about expectations. The title of this challenge is a playful hint, but it also serves as a reminder. Minimax can take an extremely long time to finish. To test your code efficiently within the default deadline of five seconds, you'll need to work with a very small world like this one. And when I say small, I mean two things. First, it's a five by five hex grid, and second, it has very few free tiles. After you block one tile, there will only be seven free tiles, which leads to 14 possible turns or a maximum depth of 14. This can definitely be achieved in less than five seconds. All challenges are in the CatTrapAlgorithms.pi source file in their respective folder. At the beginning…
内容
-
-
-
-
Minimax overview4 分钟 1 秒
-
(已锁定)
Minimax example5 分钟
-
(已锁定)
The minimax algorithm3 分钟 41 秒
-
(已锁定)
A word on complexity2 分钟 45 秒
-
(已锁定)
Challenge: A perfect cat in a small world4 分钟 49 秒
-
(已锁定)
Solution: A perfect cat in a small world8 分钟 24 秒
-
Alpha-beta pruning5 分钟 32 秒
-
(已锁定)
The alpha-beta search algorithm5 分钟 9 秒
-
(已锁定)
Challenge: A pruning cat49 秒
-
(已锁定)
Solution: A pruning cat2 分钟 19 秒
-
-
-
-
-