From the course: AI Algorithms for Game Design with Python
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Time complexity of chess - Python Tutorial
From the course: AI Algorithms for Game Design with Python
Time complexity of chess
- [Instructor] Now, how about chess? Well, chess is a very much more complicated game than Tic-Tac-Toe and certainly not a solved game. Let me give you an idea of the complexity of chess. Consider a game that ends after 40 pairs of moves, 40 for white and 40 for black. A pretty accurate estimate is 10 to the 40 possible games. So how long would this take to compute? This is where the fun begins. Imagine a computer that is capable of processing a whole game of chess in one nanosecond. By game, I mean a state in the search tree, a chessboard. This is very optimistic because today a computer may be expected to perform a single operation in one nanosecond, an operation like an addition or a multiplication, not checking all 64 squares in a chess game. But let's dream. So in this computer, producing one move would take 10 to the 40 nanoseconds. That's about 300 times 10 to the 21 years. Okay, let's dream some more. Your computer probably has somewhere between two and eight CPU cores, which…
Contents
-
-
-
(Locked)
Some history as motivation3m 46s
-
(Locked)
Different types of games2m 17s
-
(Locked)
Tree-based decision-making2m 28s
-
(Locked)
Time complexity of brute-force approaches2m 56s
-
(Locked)
Time complexity of chess2m 31s
-
The cat trap game3m 36s
-
(Locked)
The Python setting for the cat trap6m 38s
-
(Locked)
Code example: A random cat6m 8s
-
(Locked)
-
-
-
-
-