Adversarial Search. Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?

Slides:



Advertisements
Similar presentations
Chapter 6, Sec Adversarial Search.
Advertisements

Seminar on Game Playing in AI. 1/21/2014University College of Engineering2 Definition…. Game Game playing is a search problem defined by: 1. Initial state.
Adversarial Search Chapter 6 Section 1 – 4. Types of Games.
Alpha-Beta Search. 2 Two-player games The object of a search is to find a path from the starting position to a goal position In a puzzle-type problem,
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
CS 484 – Artificial Intelligence
Adversarial Search Chapter 5.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search CSE 473 University of Washington.
Adversarial Search Chapter 6.
10/19/2004TCSS435A Isabelle Bichindaritz1 Game and Tree Searching.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
State Space 4 Chapter 4 Adversarial Games. Two Flavors Games of Perfect Information ◦Each player knows everything that can be known ◦Chess, Othello Games.
This time: Outline Game playing The minimax algorithm
1 Game Playing Chapter 6 Additional references for the slides: Luger’s AI book (2005). Robert Wilensky’s CS188 slides:
Game Playing CSC361 AI CSC361: Game Playing.
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Alpha-Beta Search. 2 Two-player games The object of a search is to find a path from the starting position to a goal position In a puzzle-type problem,
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
Game Playing State-of-the-Art  Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in Used an endgame database defining.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
CSC 412: AI Adversarial Search
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Minimax.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Game Playing. Introduction Why is game playing so interesting from an AI point of view? –Game Playing is harder then common searching The search space.
Adversarial Search CS30 David Kauchak Spring 2015 Some material borrowed from : Sara Owsley Sood and others.
Game Playing.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Game-playing AIs Part 1 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part I (this set of slides)  Motivation  Game Trees  Evaluation.
Adversarial Search Chapter 6 Section 1 – 4. Outline Optimal decisions α-β pruning Imperfect, real-time decisions.
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 6 –Adversarial Search Thursday –AIMA, Ch. 6 –More Adversarial Search The “Luke.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
1 Adversarial Search CS 171/271 (Chapter 6) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Adversarial Search Chapter 6 Section 1 – 4. Search in an Adversarial Environment Iterative deepening and A* useful for single-agent search problems What.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Introduction to Game Theory Kamal Aboul-Hosn Cornell University Computers Playing Games.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search Chapter 6 Section 1 – 4. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
ADVERSARIAL SEARCH Chapter 6 Section 1 – 4. OUTLINE Optimal decisions α-β pruning Imperfect, real-time decisions.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
Chapter 5 Adversarial Search. 5.1 Games Why Study Game Playing? Games allow us to experiment with easier versions of real-world situations Hostile agents.
1 Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game.
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
Last time: search strategies
PENGANTAR INTELIJENSIA BUATAN (64A614)
Pengantar Kecerdasan Buatan
Adversarial Search.
Game Playing.
David Kauchak CS52 – Spring 2016
Game Playing in AI by: Gaurav Phapale 05 IT 6010
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Games & Adversarial Search
Adversarial Search CS 171/271 (Chapter 6)
CS51A David Kauchak Spring 2019
Games & Adversarial Search
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Adversarial Search

Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?

Another Version of Tic Tac Toe Play a few games of the variation that I mentioned –What is the expected outcome –What kinds of moves seem to help that?

Introduction Why is game playing so interesting from an AI point of view? –Game Playing is harder then common searching The search space is too large for complete searches –We are facing an unpredictable opponent Games are adversarial search problems Solution is strategy, contingency plan. There are time limits –Game playing is considered to be an intelligent activity.

Introduction Two-Person games –How do we think when we play e.g. Chess? If I move my queen there, then my opponent has to move his knight there and then can I move my pawn there and check mate. –We are making some assumptions We want our best move The opponent wants his best move The opponent has the same information as we Our opponent wants to win

A simple introductory game B chooses B1B chooses B2B chooses B3 A chooses A1 +3 −2 +2 A chooses A2 − A chooses A3 −4 −3 +1 Consider a game where A and B both pick their choice simultaneously A either receives money from B (positive numbers) or gives money to B (negative numbers) If you are A, which choice should you make? If you are B, which choice should you make?

MiniMax Games with two players MIN and MAX are a search problem with: –Initial state –Successor function –Terminal test / state –Utility function (objective / payoff)

MiniMax Utility function –Is assumed to be in relation with Max What is good for max is always bad for min. E.g. if max wins then min lose –In chess the utility function might be. -1 if min wins 0 for a draw 1 if max wins –In other games, e.g. Othello the utility function might be more advanced. utility = number of my pieces – number of his pieces

MiniMax Simple Games –If we play e.g. TicTacToe or NIM, we can generate a complete search tree –Some leafs in the tree will end up with max winning and some with min winning –For more complex games a complete search tree is impossible. But that’s a question for the near future.

MiniMax

function MiniMax(State s, Event e, boolean isMax) { State s1 = updateState(s, e); if (isLeaf(s1)) return eval(s1); if (isMax) { int highest = 0; foreach (Event e1 in maxmoves(s1)) { int tmp = MiniMax(s1, e1, !isMax); if (tmp > highest) highest = tmp; } return highest; } else { int lowest = 100; foreach (Event e1 in minmoves(s1)) { int tmp = MiniMax(s1, e1, !isMax); if (tmp < lowest) lowest = tmp; } return lowest; }

MiniMax Searching with minimax –We use depth first search to reach down to the leafs first –When we reach a leaf, we evaluate the current state by a utility function and then returns the result to the parent node. –If we are not in a leaf and have evaluated all children. If it, from this state, is max move, then return the highest utility If it is a min move return the lowest utility.