Intelligent Systems Week 5 PDF
Document Details
Uploaded by CureAllFreesia3880
Faculty of Computer Science and Artificial Intelligence, Pharos University
Tags
Summary
These notes cover adversarial search, exploring situations where multiple agents compete, like in games. The focus is on zero-sum games, where one player's gain equals the other's loss. Topics like minimax algorithm and game tree exploration are presented.
Full Transcript
FACULTY OF AI & DS DEPARTMENT COMPUTER SCIENCE & ARTIFICIAL INTELLIGENCE Semester 3 /Level 2 AI 201: INTELLIGENT SYSTEMS 2024 - 2025 LECTURE 1 ADVERSARIAL SEARCH ADVERS...
FACULTY OF AI & DS DEPARTMENT COMPUTER SCIENCE & ARTIFICIAL INTELLIGENCE Semester 3 /Level 2 AI 201: INTELLIGENT SYSTEMS 2024 - 2025 LECTURE 1 ADVERSARIAL SEARCH ADVERSARIAL SEARCH Adversarial search is a search, where we examine the problem which arises when we try to plan ahead of the world and other agents are planning against us. In previous topics, we have studied the search strategies which are only associated with a single agent that aims to find the solution which often expressed in the form of a sequence of actions. But, there might be some situations where more than one agent is searching for the solution in the same search space, and this situation usually occurs in game playing. The environment with more than one agent is termed as multi-agent environment, in which each agent is an opponent of other agent and playing against each other. Each agent needs to consider the action of other agent and effect of that action on their performance. So, searches in which two or more players with conflicting goals are trying to explore the same search space for the solution, are called adversarial searches, 3 often known as games. ADVERSARIAL SEARCH Zero-Sum Game Zero-sum games are adversarial search which involves pure competition. In zero-sum game each agent's gain or loss of utility is exactly balanced by the losses or gains of utility of another agent. One player of the game try to maximize one single value, while other player tries to minimize it. 4 ADVERSARIAL SEARCH Zero-sum game: embedded thinking The zero-sum game involved embedded thinking in which one agent or player is trying to figure out: What to do. How to decide the move Needs to think about his opponent as well The opponent also thinks what to do Each of the players is trying to find out the response of his opponent to their actions. This requires embedded thinking or backward 5 reasoning to solve the game problems in AI. ADVERSARIAL SEARCH 6 NOTE The search algorithms like DFS, BFS, and A* can be well-suited for single-agent environments where there is no direct competition or conflict between multiple agents. These algorithms are suitable for finding an optimal solution in such scenarios. On the other hand, in zero-sum games where two players compete directly against each other, adversarial search algorithms like minmax and alpha-beta pruning are more appropriate since these algorithms can determine the best course of action for each player in zero-sum games. 7 EX : TIC-TAC-TOE GAME TREE: The following figure is showing part of the game-tree for tic-tac-toe game. Following are some key points of the game: There are two players MAX and MIN. Players have an alternate turn and start with max. Max maximizes the result of the game tree MIN minimizes the result. 8 EX : TIC-TAC-TOE GAME TREE: 9 EX : TIC-TAC-TOE GAME TREE: From the initial state, MAX has 9 possible moves as he starts first. MAX place x and MIN place o, and both player plays alternatively until we reach a leaf node where one player has three in a row or all squares are filled. Both players will compute each node, minimax, the minimax value which is the best achievable utility against an optimal adversary. Suppose both the players are well aware of the tic-tac-toe and playing the best play. Each player is doing his best to prevent another one from winning. MIN is acting against max in the game. So in the game tree, we have a layer of max, a layer of min, and each layer is called as ply. Max place x, then MIN puts o to prevent max from winning, and this game continues until the terminal node. In this either min wins, max wins, or it's a draw. This game-tree is the whole search space of possibilities that MIN and MAX are playing tic-tac-toe and taking turns alternately. 10 11 MIN-MAX ALGORITHM 12 MIN-MAX ALGORITHM 13 14