Introduction Game playing has been a classic problem in AI since the 1950s. Provides a controlled environment to test AI techniques. Games involve: Players (human or machine) Rules (define valid moves) Strategies (plans to win) Outcomes (win/lose/draw, or points)
Why AI in Games? Testbed for search algorithms and decision-making . Simulates real-world problem-solving in a simplified form. Helps in developing techniques like: Search (DFS, BFS, A*) Heuristics Minimax & Alpha-Beta pruning Reinforcement Learning
Examples of Games in AI Chess β Deep Blue (IBM) defeating Garry Kasparov. Go β AlphaGo (DeepMind) beating world champions. Tic-Tac-Toe, Checkers, Pac-Man β teaching search & strategy. Game playing in AI = searching through possible moves to choose the best strategy under given rules.
Minimax Algorithm π What is Minimax? : It is a backtracking technique which is used in Game theory and decision making. A decision-making algorithm used in two-player games (e.g., Chess, Tic-Tac-Toe). Players: MAX β tries to maximize score (AI). MIN β tries to minimize score (opponent). Assumes both players play optimally .
How it Works Represent the game as a tree of moves . At each node: MAX picks the highest value move . MIN picks the lowest value move . Continue until reaching leaf nodes (game-over states). Backtrack values up the tree β root node gives best move for MAX .
Key Features Adversarial Search β AI vs Opponent. Works with zero-sum games (oneβs gain = otherβs loss). Guarantees optimal decision if search goes to the end.
Limitations Slow for complex games such as chess 35 moves Depth: 100 35 100 very big