Module 3. Problem Solving using Search- (Two agent) Version 2 CSE IIT, Kharagpur

Similar documents
Computer Science and Software Engineering University of Wisconsin - Platteville. 4. Game Play. CS 3030 Lecture Notes Yan Shi UW-Platteville

ARTIFICIAL INTELLIGENCE (CS 370D)

mywbut.com Two agent games : alpha beta pruning

Adversary Search. Ref: Chapter 5

CS 2710 Foundations of AI. Lecture 9. Adversarial search. CS 2710 Foundations of AI. Game search

CS 1571 Introduction to AI Lecture 12. Adversarial search. CS 1571 Intro to AI. Announcements

CS885 Reinforcement Learning Lecture 13c: June 13, Adversarial Search [RusNor] Sec

Adversarial Search 1

2 person perfect information

Artificial Intelligence. Minimax and alpha-beta pruning

Adversarial Search. Rob Platt Northeastern University. Some images and slides are used from: AIMA CS188 UC Berkeley

game tree complete all possible moves

Announcements. Homework 1 solutions posted. Test in 2 weeks (27 th ) -Covers up to and including HW2 (informed search)

Adversarial Search and Game- Playing C H A P T E R 6 C M P T : S P R I N G H A S S A N K H O S R A V I

Adversarial Search. Human-aware Robotics. 2018/01/25 Chapter 5 in R&N 3rd Ø Announcement: Slides for this lecture are here:

Playing Games. Henry Z. Lo. June 23, We consider writing AI to play games with the following properties:

Programming Project 1: Pacman (Due )

Set 4: Game-Playing. ICS 271 Fall 2017 Kalev Kask

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter , 5.7,5.8

Adversarial Search and Game Playing. Russell and Norvig: Chapter 5

CSE 473: Artificial Intelligence Fall Outline. Types of Games. Deterministic Games. Previously: Single-Agent Trees. Previously: Value of a State

Game-playing AIs: Games and Adversarial Search I AIMA

Game Playing State-of-the-Art

CS 771 Artificial Intelligence. Adversarial Search

Adversarial Search. Robert Platt Northeastern University. Some images and slides are used from: 1. CS188 UC Berkeley 2. RN, AIMA

CS 5522: Artificial Intelligence II

CMPUT 396 Tic-Tac-Toe Game

CPS331 Lecture: Search in Games last revised 2/16/10

Artificial Intelligence

Game-Playing & Adversarial Search

Game Playing State-of-the-Art. CS 188: Artificial Intelligence. Behavior from Computation. Video of Demo Mystery Pacman. Adversarial Search

Games (adversarial search problems)

4. Games and search. Lecture Artificial Intelligence (4ov / 8op)

Adversarial Search Aka Games

CS 188: Artificial Intelligence

CS188 Spring 2014 Section 3: Games

ADVERSARIAL SEARCH. Today. Reading. Goals. AIMA Chapter Read , Skim 5.7

Adversarial Search (Game Playing)

Algorithms for Data Structures: Search for Games. Phillip Smith 27/11/13

CS510 \ Lecture Ariel Stolerman

Game Playing State-of-the-Art CSE 473: Artificial Intelligence Fall Deterministic Games. Zero-Sum Games 10/13/17. Adversarial Search

Artificial Intelligence 1: game playing

Adversarial Search. Read AIMA Chapter CIS 421/521 - Intro to AI 1

Foundations of AI. 6. Adversarial Search. Search Strategies for Games, Games with Chance, State of the Art. Wolfram Burgard & Bernhard Nebel

Game-playing AIs: Games and Adversarial Search FINAL SET (w/ pruning study examples) AIMA

CS 188: Artificial Intelligence

Adversarial Search. Soleymani. Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 5

CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #5

Adversarial Search Lecture 7

COMP9414: Artificial Intelligence Adversarial Search

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence

CS 331: Artificial Intelligence Adversarial Search II. Outline

CS 188: Artificial Intelligence Spring Announcements

CPS 570: Artificial Intelligence Two-player, zero-sum, perfect-information Games

Game Engineering CS F-24 Board / Strategy Games

Data Structures and Algorithms

Adversarial Search: Game Playing. Reading: Chapter

Computer Game Programming Board Games

Game Tree Search. CSC384: Introduction to Artificial Intelligence. Generalizing Search Problem. General Games. What makes something a game?

Game Playing AI Class 8 Ch , 5.4.1, 5.5

Game Playing Beyond Minimax. Game Playing Summary So Far. Game Playing Improving Efficiency. Game Playing Minimax using DFS.

Adversarial Search. CS 486/686: Introduction to Artificial Intelligence

CSE 473: Artificial Intelligence. Outline

Introduction to Artificial Intelligence CS 151 Programming Assignment 2 Mancala!! Due (in dropbox) Tuesday, September 23, 9:34am

Artificial Intelligence. 4. Game Playing. Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder

Ar#ficial)Intelligence!!

V. Adamchik Data Structures. Game Trees. Lecture 1. Apr. 05, Plan: 1. Introduction. 2. Game of NIM. 3. Minimax

More on games (Ch )

INF September 25, The deadline is postponed to Tuesday, October 3

Announcements. Homework 1. Project 1. Due tonight at 11:59pm. Due Friday 2/8 at 4:00pm. Electronic HW1 Written HW1

Outline. Game Playing. Game Problems. Game Problems. Types of games Playing a perfect game. Playing an imperfect game

CSC384: Introduction to Artificial Intelligence. Game Tree Search

CSE 332: Data Structures and Parallelism Games, Minimax, and Alpha-Beta Pruning. Playing Games. X s Turn. O s Turn. X s Turn.

CS440/ECE448 Lecture 9: Minimax Search. Slides by Svetlana Lazebnik 9/2016 Modified by Mark Hasegawa-Johnson 9/2017

Solving Problems by Searching: Adversarial Search

Foundations of Artificial Intelligence

2/5/17 ADVERSARIAL SEARCH. Today. Introduce adversarial games Minimax as an optimal strategy Alpha-beta pruning Real-time decision making

Artificial Intelligence Lecture 3

CSC 380 Final Presentation. Connect 4 David Alligood, Scott Swiger, Jo Van Voorhis

CITS3001. Algorithms, Agents and Artificial Intelligence. Semester 2, 2016 Tim French

CS 188: Artificial Intelligence. Overview

For slightly more detailed instructions on how to play, visit:

Multiple Agents. Why can t we all just get along? (Rodney King)

Game Playing AI. Dr. Baldassano Yu s Elite Education

Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning

Artificial Intelligence. Topic 5. Game playing

COMP219: COMP219: Artificial Intelligence Artificial Intelligence Dr. Annabel Latham Lecture 12: Game Playing Overview Games and Search

Artificial Intelligence Adversarial Search

Announcements. CS 188: Artificial Intelligence Spring Game Playing State-of-the-Art. Overview. Game Playing. GamesCrafters

More on games (Ch )

CS188 Spring 2010 Section 3: Game Trees

Game Tree Search. Generalizing Search Problems. Two-person Zero-Sum Games. Generalizing Search Problems. CSC384: Intro to Artificial Intelligence

16.410/413 Principles of Autonomy and Decision Making

More Adversarial Search

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 2 February, 2018

Game Playing State of the Art

CSE 573: Artificial Intelligence

Adversarial Search and Game Playing

CS 188: Artificial Intelligence Spring 2007

Transcription:

Module 3 Problem Solving using Search- (Two agent)

3.1 Instructional Objective The students should understand the formulation of multi-agent search and in detail two-agent search. Students should b familiar with game trees. Given a problem description, the student should be able to formulate it in terms of a two-agent search problem. The student should be familiar with the minimax algorithms, and should be able to code the algorithm. Students should understand heuristic scoring functions and standard strategies for generating heuristic scores. Students should understand alpha-beta pruning algorithm, specifically its o Computational advantage o Optimal node ordering Several advanced heuristics used in modern game playing systems like detection of quiescent states, lengthening should be understood. A chess playing program will be analyzed in detail. At the end of this lesson the student should be able to do the following: Analyze a given problem and formulate it as a two-agent search problem Given a problem, apply possible strategies for two-agent search to design a problem solving agent.

Lesson 7 Adversarial Search

3.2 Adversarial Search We will set up a framework for formulating a multi-person game as a search problem. We will consider games in which the players alternate making moves and try respectively to maximize and minimize a scoring function (also called utility function). To simplify things a bit, we will only consider games with the following two properties: Two player - we do not deal with coalitions, etc. Zero sum - one player's win is the other's loss; there are no cooperative victories We also consider only perfect information games. 3.3 Game Trees The above category of games can be represented as a tree where the nodes represent the current state of the game and the arcs represent the moves. The game tree consists of all possible moves for the current players starting at the root and all possible moves for the next player as the children of these nodes, and so forth, as far into the future of the game as desired. Each individual move by one player is called a "ply". The leaves of the game tree represent terminal positions as one where the outcome of the game is clear (a win, a loss, a draw, a payoff). Each terminal position has a score. High scores are good for one of the player, called the MAX player. The other player, called MIN player, tries to minimize the score. For example, we may associate 1 with a win, 0 with a draw and -1 with a loss for MAX. Example : Game of Tic-Tac-Toe

Above is a section of a game tree for tic tac toe. Each node represents a board position, and the children of each node are the legal moves from that position. To score each position, we will give each position which is favorable for player 1 a positive number (the more positive, the more favorable). Similarly, we will give each position which is favorable for player 2 a negative number (the more negative, the more favorable). In our tic tac toe example, player 1 is 'X', player 2 is 'O', and the only three scores we will have are +1 for a win by 'X', -1 for a win by 'O', and 0 for a draw. Note here that the blue scores are the only ones that can be computed by looking at the current position. 3.4 Minimax Algorithm Now that we have a way of representing the game in our program, how do we compute our optimal move? We will assume that the opponent is rational; that is, the opponent can compute moves just as well as we can, and the opponent will always choose the optimal move with the assumption that we, too, will play perfectly. One algorithm for computing the best move is the minimax algorithm:

minimax(player,board) if(game over in current board position) return winner children = all legal moves for player from this board if(max's turn) return maximal score of calling minimax on all the children else (min's turn) return minimal score of calling minimax on all the children If the game is over in the given position, then there is nothing to compute; minimax will simply return the score of the board. Otherwise, minimax will go through each possible child, and (by recursively calling itself) evaluate each possible move. Then, the best possible move will be chosen, where best is the move leading to the board with the most positive score for player 1, and the board with the most negative score for player 2. How long does this algorithm take? For a simple game like tic tac toe, not too long - it is certainly possible to search all possible positions. For a game like Chess or Go however, the running time is prohibitively expensive. In fact, to completely search either of these games, we would first need to develop interstellar travel, as by the time we finish analyzing a move the sun will have gone nova and the earth will no longer exist. Therefore, all real computer games will search, not to the end of the game, but only a few moves ahead. Of course, now the program must determine whether a certain board position is 'good' or 'bad' for a certainly player. This is often done using an evaluation function. This function is the key to a strong computer game. The depth bound search may stop just as things get interesting (e.g. in the middle of a piece exchange in chess. For this reason, the depth bound is usually extended to the end of an exchange to an quiescent state. The search may also tend to postpone bad news until after the depth bound leading to the horizon effect.