Adversarial Search.

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.
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)
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.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
CS 484 – Artificial Intelligence
Adversarial Search Chapter 6.
10/19/2004TCSS435A Isabelle Bichindaritz1 Game and Tree Searching.
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)
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
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
PSU CS 370 – Introduction to Artificial Intelligence Game MinMax Alpha-Beta.
Minimax.
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.
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.
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.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Adversarial Search. Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
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
Game Playing Why do AI researchers study game playing?
Instructor: Vincent Conitzer
Last time: search strategies
PENGANTAR INTELIJENSIA BUATAN (64A614)
CS Fall 2016 (Shavlik©), Lecture 11, Week 6
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Pengantar Kecerdasan Buatan
Game Playing.
David Kauchak CS52 – Spring 2016
Game Playing in AI by: Gaurav Phapale 05 IT 6010
Games & Adversarial Search
Games & Adversarial Search
Artificial Intelligence
Alpha-Beta Search.
Games & Adversarial Search
Games & Adversarial Search
Game Playing: Adversarial Search
NIM - a two person game n objects are in one pile
Artificial Intelligence
Alpha-Beta Search.
Alpha-Beta Search.
Game Playing Fifth Lecture 2019/4/11.
Alpha-Beta Search.
Game Playing: Adversarial Search
Game Playing Chapter 5.
Adversarial Search CS 171/271 (Chapter 6)
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Adversarial Search Game Theory.
CS51A David Kauchak Spring 2019
CS51A David Kauchak Spring 2019
Games & Adversarial Search
Unit II Game Playing.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Adversarial Search

Questions about HW#2 Due next Monday Take in a length 24 “bit” string And several parameters “Search” for the provided bit string Admittedly artificial, but needs to be approachable.

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

Tic Tac TJ Modified rules When it is your turn you can place 1, 2, or 3 pieces as long as they all exist in a single row or column. The winner is the person who places the LAST piece.

Tic Tac TJ Play a few games of the variation that I mention in class 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 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) B chooses B1 B chooses B2 B chooses B3 A chooses A1     +3     −2     +2 A chooses A2     −1      0     +4 A chooses A3     −4     −3     +1 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

MiniMax function MiniMax(State s, Event e, boolean isMax) { State s1 = updateState(s, e); if (isLeaf(s1)) return eval(s1); if (isMax) { int highest = SIGNIFICANTLY_LOW_NUMBER; foreach (Event e1 in maxmoves(s1)) { int tmp = MiniMax(s1, e1, !isMax); if (tmp > highest) highest = tmp; } return highest; } else { int lowest = SIGNIFICANTLY_HIGH_NUMBER; foreach (Event e1 in minmoves(s1)) { 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.

MiniMax Example of MiniMax – 1st version of NIM The rules of NIM are as follows We start with a number of sticks in a group On each move, a player must divide a group into two smaller groups Groups of one or two sticks can’t be divided The last player to make a legal move wins