6. Search: Games, Minimax, and Alpha-Beta

MIT OpenCourseWare
10 Jan 201448:16

TLDRThis lecture delves into the history and strategies of computer chess, highlighting the philosophical debates of the 1960s and the 1997 Deep Blue vs. Kasparov match. It explores various approaches to programming computers for chess, including the minimax algorithm with alpha-beta pruning for efficient game tree search. The discussion also touches on the concept of progressive deepening and the difference between raw computational power and human-like intelligence in game strategy.

Takeaways

  • 😀 The discussion revisits a 1963 paper by Hubert Dreyfus, who claimed computers couldn't play chess, a view later challenged by AI developments.
  • 🏆 In 1997, IBM's Deep Blue defeated the world chess champion, demonstrating the potential of AI in games beyond human capabilities.
  • 🤔 The lecture explores various methods for programming computers to play chess, emphasizing the limitations and advancements in AI strategy.
  • 🧠 The minimax algorithm with alpha-beta pruning is introduced as a way to efficiently evaluate game trees, reducing the computational load.
  • 🌳 The branching factor and depth of a game tree are key concepts in determining the complexity and search space for AI in games.
  • 🚀 Claude Shannon and Alan Turing are credited with early contributions to game-playing AI, including the minimax algorithm.
  • 🔍 The concept of progressive deepening is highlighted as a strategy to ensure AI has a valid move at any time, even if the search is incomplete.
  • 💡 The importance of static evaluation in AI game playing is discussed, as it provides a means to estimate board positions without exploring all possibilities.
  • 🌐 The talk touches on the exponential growth of game tree complexity and how it challenges the feasibility of exhaustive search methods.
  • 🤖 Deep Blue's approach to chess is dissected, showing how a combination of minimax, alpha-beta, progressive deepening, and parallel computing contributed to its success.

Q & A

  • In what year did Hubert Dreyfus write a paper claiming that computers can't play chess?

    -Hubert Dreyfus wrote a paper in about 1963 with the heading titled, 'Computers Can't Play Chess.'

  • Who wrote a rebuttal to Dreyfus' paper, and what was the subject heading of the rebuttal?

    -Seymour Papert wrote a rebuttal to Dreyfus' paper, which had the subject heading, 'Dreyfus Can't Play Chess Either.'

  • What was the bet between David Levy and John McCarthy regarding computers and chess?

    -David Levy bet John McCarthy that no computer would beat the world champion within 10 years. McCarthy gave up after five years because it had become clear that no computer would win in a way he wanted.

  • How did the chess game between chess master David Levy and the computer change the perspective on AI in chess?

    -David Levy's loss to the computer showed that computers could indeed play chess, challenging the initial belief that they couldn't, and it marked a significant milestone in AI development.

  • What is the significance of the year 1997 in the context of the script?

    -In 1997, Deep Blue, a chess-playing computer, beat the world chess champion, which made chess playing by computers no longer a novelty and marked a significant achievement in AI.

  • What is the minimax algorithm and how does it relate to game theory discussed in the script?

    -The minimax algorithm is a decision-making strategy used in game theory, where two players, a maximizing player and a minimizing player, make decisions to optimize their respective outcomes. It's used to determine the best move in a game by exploring all possible moves and their consequences.

  • What is the alpha-beta algorithm and how does it improve upon the minimax algorithm?

    -The alpha-beta algorithm is an optimization of the minimax algorithm that uses two parameters, alpha and beta, to eliminate branches of the search tree that cannot possibly influence the final decision. This reduces the number of nodes that need to be evaluated, thus improving efficiency.

  • What is the concept of 'branching factor' in the context of game trees?

    -The 'branching factor' in game trees refers to the average number of legal moves available to a player at any position. It varies depending on the stage of the game and can significantly impact the complexity of the game tree.

  • How does the concept of 'static evaluation' function in game-playing algorithms?

    -Static evaluation in game-playing algorithms refers to the process of assigning a value to a particular board position without considering future moves. It is used to estimate the desirability of a position from the perspective of a particular player.

  • What is the role of 'progressive deepening' in game-playing programs?

    -Progressive deepening is a technique used in game-playing programs where the search depth is gradually increased until the思考 time is exhausted. This ensures that the program always has a move ready and can provide better moves as more time becomes available.

  • How does the script differentiate between the intelligence demonstrated by Deep Blue and human intelligence?

    -The script suggests that while Deep Blue demonstrated a form of intelligence through its ability to play chess at a high level, it was more of a 'bulldozer intelligence,' relying on raw computational power rather than the pattern recognition and strategic understanding that human chess masters employ.

Outlines

00:00

😀 Early Doubts on Computer Chess

The paragraph discusses the early skepticism about computers playing chess expressed by philosopher Hubert Dreyfus in 1963. Despite losing to the Greenblatt chess machine, Dreyfus' point was that computers couldn't play chess like humans. This was further highlighted by a bet between David Levy and John McCarthy, where McCarthy conceded that computers wouldn't beat the world champion within 10 years by playing like humans. However, IBM's Deep Blue defeated the world champion in 1997, sparking a discussion on different types of intelligence and the ways computers might play chess.

05:02

🤔 Approaches to Programming Computers for Chess

This section explores various methods for programming computers to play chess. It starts with the idea of machines describing the board like humans, considering strategy and tactics. However, this approach is acknowledged as unknown and thus not utilized. The paragraph then discusses the use of if-then rules, which, despite their simplicity, fail to produce strong chess programs. The narrative suggests looking at other methods, hinting at more complex strategies.

10:05

🔍 Looking Ahead and Evaluating in Chess

The paragraph delves into the strategy of looking ahead and evaluating potential moves in chess. It introduces the concept of static value, which assesses the board's current state without considering future moves. The discussion then shifts to the use of linear scoring polynomials to form a static value, which is a simplified method of evaluating board positions. The section concludes with the idea that a more comprehensive approach might be necessary for stronger play.

15:07

🌳 The Game Tree and Branching Factor

This part of the script introduces the concept of a game tree in chess, focusing on the branching factor and the depth of the tree. It explains how the number of possible board positions grows exponentially with each move, leading to an enormous tree of possibilities. The discussion uses mathematical calculations to illustrate the impracticality of evaluating every possible move in a game of chess, setting the stage for more efficient algorithms.

20:08

☁️ The Infeasibility of the British Museum Algorithm

The speaker humorously dismisses the idea of using the British Museum algorithm, which would involve evaluating every possible move in a game of chess, as impractical. The paragraph uses cosmic-scale comparisons to emphasize the sheer number of calculations required, suggesting that even with cloud computing, such an approach is unfeasible due to the astronomical number of operations needed.

25:12

🔄 The Minimax Algorithm with Alpha-Beta Pruning

The paragraph introduces the minimax algorithm with alpha-beta pruning, a technique used to efficiently find the optimal move in games like chess. It explains how the algorithm works by alternating between a maximizing player and a minimizing player, and how alpha-beta pruning can significantly reduce the number of necessary calculations by eliminating branches of the game tree that don't need to be explored.

30:14

🌐 Deepening the Search with Progressive Techniques

This section discusses the concept of progressive deepening, where the search algorithm starts with a shallow search and progressively goes deeper as time allows. It also touches upon the idea of uneven tree development, where certain parts of the tree are explored more deeply based on their potential impact on the game. The paragraph highlights the importance of having an answer ready at any given time, aligning with the anytime algorithm concept.

35:17

🏆 Deep Blue's Strategy and Beyond

The final paragraph contrasts the brute force approach of Deep Blue, which used massive computational power and advanced algorithms, with the more sophisticated and pattern-recognition-based strategies used by human chess players. It questions whether Deep Blue's approach is a model of human intelligence or a different form of intelligence altogether, suggesting that while it demonstrates a capability to play chess at a high level, it does so through raw computational power rather than the nuanced understanding humans possess.

Mindmap

Keywords

💡Minimax

The minimax algorithm is a decision-making strategy used in artificial intelligence, particularly in the context of two-player, zero-sum games like chess. It aims to minimize the maximum possible loss, assuming the opponent will play optimally. In the video, the minimax algorithm is described as a fundamental approach to game playing programs where a 'maximizing player' tries to select the move that leads to the best possible outcome, while the 'minimizing player' tries to select the move that leads to the least favorable outcome for the opponent. The concept is illustrated through a simple game tree where the algorithm is used to determine the optimal move by backing up values from the bottom of the tree to the top.

💡Alpha-Beta Pruning

Alpha-beta pruning is an optimization technique for the minimax algorithm that reduces the number of nodes evaluated in the search tree. It works by eliminating branches of the search tree that cannot possibly influence the final decision. In the script, alpha-beta pruning is introduced as a 'flourish' on top of minimax, allowing the algorithm to skip over parts of the tree that are irrelevant to the final decision, thus saving computational resources. The concept is demonstrated through examples where certain branches of the game tree are effectively ignored once it becomes clear that they will not affect the outcome.

💡Branching Factor

The branching factor in game theory refers to the number of possible moves or choices available at any given point in a game tree. A higher branching factor means more complexity and a larger search space. In the video, the branching factor is used to illustrate the exponential growth of possible game outcomes and to calculate the number of leaf nodes in a game tree. It is also a key factor in determining the computational complexity of searching through a game tree using algorithms like minimax and alpha-beta pruning.

💡Game Tree

A game tree is a graphical representation of the possible future states of a game, where each node represents a game state and each branch represents a possible move. The tree structure helps in visualizing the progression of a game and is used in the video to explain how both minimax and alpha-beta algorithms navigate through the possible moves to find the optimal strategy. The game tree is central to understanding how computers can evaluate and choose the best moves in games like chess.

💡Static Evaluation Function

A static evaluation function in the context of game-playing algorithms is a heuristic that assigns a numerical value to a game state, typically in board games like chess. This value represents the desirability or advantage of a particular board position from the perspective of a player. In the video, the static evaluation function is used at the leaf nodes of the game tree to provide the raw scores that the minimax and alpha-beta algorithms work with to determine the best move. It is a simplified model of the board state that does not consider future moves but only the current configuration of pieces.

💡Progressive Deepening

Progressive deepening is a technique used in game-playing algorithms to ensure that a move is available within a given time constraint. It involves incrementally deepening the search depth until the time limit is reached or the desired depth of search is achieved. In the video, progressive deepening is described as a method to provide an 'insurance policy' for game-playing programs, allowing them to have a valid move ready at any time, even if the full depth of analysis is not completed.

💡Dead Horse Principle

The dead horse principle, as mentioned in the video, refers to the idea of not spending computational resources on parts of the search tree that are clearly not going to influence the outcome. This principle is exemplified by the alpha-beta pruning technique, where once a branch of the search tree is determined to be irrelevant to the final decision, no further computation is wasted on it. The video uses this term to emphasize the efficiency gains from avoiding unnecessary computations.

💡Buldozer Intelligence

Buldozer intelligence, as discussed in the video, is a term used to describe a brute-force approach to problem-solving that relies on overwhelming computational power rather than finesse or subtlety. The video contrasts this with human intelligence, particularly in the context of chess, where human players use pattern recognition and strategic insight rather than raw computational power. Deep Blue's victory over Kasparov is attributed to this type of intelligence, where the computer's ability to evaluate a vast number of positions quickly gave it an advantage.

💡Heuristic

In the context of the video, a heuristic is a practical method or rule of thumb used to solve problems or make decisions when optimal or perfect solutions are too complex or impossible to find. Heuristics are often used in artificial intelligence to guide the search for solutions in games. The video mentions that while the minimax algorithm with alpha-beta pruning is a heuristic for finding the best move in a game, it does not necessarily reflect the kind of heuristics used by human players, who rely on patterns and learned strategies.

💡Parallel Computing

Parallel computing refers to the use of multiple processing units to perform calculations simultaneously, which can significantly speed up computations, especially for complex tasks like searching through a game tree. In the video, Deep Blue's use of parallel computing is highlighted as one of the factors that allowed it to perform approximately 200 million static evaluations per second, contributing to its ability to search deeper into the game tree and make better decisions.

Highlights

In 1963, philosopher Hubert Dreyfus claimed computers couldn't play chess, but later lost to a chess machine.

David Levy bet AI founder John McCarthy that no computer would beat the world chess champion within 10 years in 1968.

IBM's Deep Blue defeated world chess champion Garry Kasparov in 1997, marking a significant milestone in AI.

Game-playing elements can model aspects of human intelligence, making them important to understand in AI.

Early approaches to programming computers for chess involved mimicking human thought processes.

If-then rules were an early method for creating game strategies, though not very powerful on their own.

Looking ahead and evaluating possible moves is a more effective approach than if-then rules.

Static value evaluation of a chessboard involves assessing features like King safety and pawn structure.

Linear scoring polynomials are used to assign values to board positions in chess.

The British Museum algorithm, evaluating entire game trees, is impractical due to the vast number of possibilities.

The minimax algorithm is a method for decision-making in games with two opposing players.

Alpha-beta pruning is an enhancement of the minimax algorithm that reduces the number of nodes evaluated in a game tree.

Deep Blue's victory over Kasparov was achieved through a combination of minimax, alpha-beta, and progressive deepening.

Progressive deepening ensures that a game-playing program always has a move ready, regardless of time constraints.

Deep Blue's search algorithm included uneven tree development, focusing on more promising paths.

While Deep Blue demonstrated intelligence, it was a different form from human strategic thinking, more akin to 'bulldozer intelligence'.