课程: AI Algorithms for Game Design with Python
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Tree-based decision-making
- [Instructor] To play a turn-based game like tic-tac-toe or chess, we are going to use a tree-based decision-making approach. This technique consists of predicting the outcome of all possible player moves, starting at the current state of the game. In this algorithm, we must choose the move that yields the best result for us. Be aware that running this algorithm produces only the next move, not the whole sequence of moves in the future. So this is how tree-based decision-making looks like. Take tic-tac-toe, for example. Let's say the game is about to start and it's our turn. We have the X mark and the opponent has the circle mark. In this first step, we have nine possible moves. We can place our X mark in the top left, top center, top right, all the way down to the bottom right square. Now, notice how this is creating a tree structure. The ellipsis mean that I'm not showing further states horizontally or vertically. That's because this tree will get really, really big. So for each of…
内容
-
-
-
(已锁定)
Some history as motivation3 分钟 46 秒
-
(已锁定)
Different types of games2 分钟 17 秒
-
(已锁定)
Tree-based decision-making2 分钟 28 秒
-
(已锁定)
Time complexity of brute-force approaches2 分钟 56 秒
-
(已锁定)
Time complexity of chess2 分钟 31 秒
-
The cat trap game3 分钟 36 秒
-
(已锁定)
The Python setting for the cat trap6 分钟 38 秒
-
(已锁定)
Code example: A random cat6 分钟 8 秒
-
(已锁定)
-
-
-
-
-