课程: AI Algorithms for Game Design with Python
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
A word on complexity
- [Instructor] Since we've already seen a scary scenario for these algorithms, it's important to get a sense of how well our algorithms will work. So let's talk about the complexity of minimax. Suppose we have a search tree with a constant branching factor B and a maximum depth M. In other words, each state has B possible moves and the game goes on for M turns. Well, the time complexity of minimax is O of B to the M and its space complexity is O of M. Now, this is a synthetic notation, so these are not exact expressions for the running time or the memory needed by the algorithm. Instead, these expressions refer to an upper bound of how the running time or the memory requirement grows as B or M grow. As you can see, the time complexity is exponential just as you might have expected. Minimax takes billions of years to produce one move. This is because at each level we have B more possible states to analyze, and this will go on for M turns. Increasing M by one makes the three B times…
内容
-
-
-
-
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 秒
-
-
-
-
-