Game Algorithms Prepared for COSC 6111 By Stephanie Wilson November 15th, 2006.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Study Group Randomized Algorithms 21 st June 03. Topics Covered Game Tree Evaluation –its expected run time is better than the worst- case complexity.
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.
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
1 CSC 550: Introduction to Artificial Intelligence Fall 2008 search in game playing  zero-sum games  game trees, minimax principle  alpha-beta pruning.
CS 484 – Artificial Intelligence
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
This time: Outline Game playing The minimax algorithm
Games of Chance Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 68 Chapter 9 The Theory 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,
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
Group 1 : Ashutosh Pushkar Ameya Sudhir From. Motivation  Game playing was one of the first tasks undertaken in AI  Study of games brings us closer.
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.
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
CISC 235: Topic 6 Game Trees.
Lecture 5 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
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.
History  1475: modern game evolved  : supposed automatons  : rise of chess computers  : on par with humans  2000-current.
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.
October 3, 2012Introduction to Artificial Intelligence Lecture 9: Two-Player Games 1 Iterative Deepening A* Algorithm A* has memory demands that increase.
Chapter 6 Adversarial Search. Adversarial Search Problem Initial State Initial State Successor Function Successor Function Terminal Test Terminal Test.
Adversarial Search CS311 David Kauchak Spring 2013 Some material borrowed from : Sara Owsley Sood and others.
Minimax with Alpha Beta Pruning The minimax algorithm is a way of finding an optimal move in a two player game. Alpha-beta pruning is a way of finding.
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.
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.
Quiz 4 : Minimax Minimax is a paranoid algorithm. True
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Part 3 Linear Programming
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
CMSC 421: Intro to Artificial Intelligence October 6, 2003 Lecture 7: Games Professor: Bonnie J. Dorr TA: Nate Waisbrot.
GAME THEORY Day 5. Minimax and Maximin Step 1. Write down the minimum entry in each row. Which one is the largest? Maximin Step 2. Write down the maximum.
February 25, 2016Introduction to Artificial Intelligence Lecture 10: Two-Player Games II 1 The Alpha-Beta Procedure Can we estimate the efficiency benefit.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Adversarial Search CMPT 463. When: Tuesday, April 5 3:30PM Where: RLC 105 Team based: one, two or three people per team Languages: Python, C++ and Java.
Search: Games & Adversarial Search Artificial Intelligence CMSC January 28, 2003.
Tools for Decision Analysis: Analysis of Risky Decisions
Iterative Deepening A*
Input – Output Models P = # of items produced
Atacan KULLABCI Kubilay BEKTAŞ
Adversarial Search.
Game Playing.
Game Playing in AI by: Gaurav Phapale 05 IT 6010
Games with Chance Other Search Algorithms
Artificial Intelligence
Game Theory.
Alpha-Beta Search.
NIM - a two person game n objects are in one pile
Artificial Intelligence
Alpha-Beta Search.
The Alpha-Beta Procedure
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Alpha-Beta Search.
Alpha-Beta Search.
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Alpha-Beta Search.
Games & Adversarial Search
CS51A David Kauchak Spring 2019
Unit II Game Playing.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Game Algorithms Prepared for COSC 6111 By Stephanie Wilson November 15th, 2006

Agenda ● Minimax on individual games ● Alpha-beta pruning ● Minimax on game strategies ● Extending minimax to mixed strategies

MINI-MAX ALGORITHM How can we find out the best move to make in a specific kind of game? A two-player, turn taking, game where you can see all the information, and where there can be only one winner. Assume that both players will always take the best move, so... ● Look at all game tree ● Assume opponent makes best moves for themselves ● Assume you make best moves for yourself ● Make the next move ● Re-evaluate each move

MINI-MAX Game Tree MIN MAX

Problems? Running time is exponential to the number of moves!!! We can't eliminate it, but we can cut it in half using Alpha-beta pruning. Will always return the same as MINI-MAX, but doesn't waste time with branches that have no effect.

Alpha-Beta Game Tree MIN MAX [-∞,+∞] [-∞,3] [-∞,+∞] [3,3] [-∞,+∞] [-∞,2] [-∞,+∞] [-∞,14] [-∞,5] [2,2] [3,+∞] [3,14] [3,3] [3,5]

Running Time? Depends on which nodes we look at first. If we always look at the best nodes first (which we can't or we wouldn't need an algorithm, but we can get close), running time is O(b m/2 ) for alpha-beta instead of O(b m ) for minimax, where m is the max depth of the tree and there are b legal moves at each point. So for the same amount of time, alpha-beta can look twice as far ahead in the game tree!

Mini-Max on Strategies Assuming a game with several different strategies of play, we can evaluate those strategies and know that strategy X played against strategy Y results in utility Z. We place those results in a matrix. Note that player Y's strategies may be completely different than player X's.

Selecting Strategies Player X knows that once it names it's strategy, player Y will choose the minimum Z in that column. So if player X has to pick first, it takes the strategy with the largest smallest Z. If Player Y picks first, it takes the strategy with the smallest largest Z. If those two Z values are the same, then the game is strictly determined and that is the value of the game.

Example Given the matrix: If X choose X 1 then Y would choose between -1,0,and 2. Since Y wants to minimize, it chooses -1. For X 2, Y chooses -2. Since X wants to maximize, X picks X 1. Similarly, Y picks Y 3 to get value 2. Since -1 ≠ 2, the game is not strictly determined. Notices that if X picks first, Y has an advantage, and visa versa.

Strategy Probabilities We don't want to be predictable! So we pick a mix. Each player picks their strategy distribution. So their new mixed strategy is to play each pure strategy a certain percentage of the time. Player X chooses strategy p = (p 1,..., p m ) as its probabilities, and player Y chooses strategy q = (q 1,..., q n ) as its probabilities. The expected utility for strategies p and q is now:

Selecting Mixed Strategy Player X now wants to choose the best mixed strategy, so it picks the largest, smallest E(p,q). Player Y would pick the smallest, largest E(p,q) if Y picked first. The interesting thing is.... those values are always equal for all matrix games! This value is the value of the game. This is because all linear programs have a dual, where if the program minimizes something, its dual maximizes it. Duals are always equal, and these values are duals of one another. We can therefore solve any matrix game using linear programming. Romil will elaborate on this in his talk.

References Russel, Stuart and Norvig, Peter. Artificial Intelligence: A Modern Approach 2 nd Ed. New Jersey: Prentice Hall, Craw, Ian (2002). The Theory of Games. Retrieved November 15, 2006, from University of Aberdeen, Mathematical Sciences Web site: ode71.html

Thank You