Game Theory An Overview of Game Theory by Kian Mirjalali.

Slides:



Advertisements
Similar presentations
15 THEORY OF GAMES CHAPTER.
Advertisements

Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
AE1APS Algorithmic Problem Solving John Drake.  Invariants – Chapter 2  River Crossing – Chapter 3  Logic Puzzles – Chapter 5  Matchstick Games -
MIT and James Orlin © Game Theory 2-person 0-sum (or constant sum) game theory 2-person game theory (e.g., prisoner’s dilemma)
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
Game Theory Game theory is an attempt to model the way decisions are made in competitive situations. It has obvious applications in economics. But it.
4 Games and Fuses U:\APPS\Ghostgum\gsview Shared folder U:\2nd Year Share\Computer Science Courses\Semester One\Algortithmic Problem Solving Book: Algorithmic.
Game Playing Games require different search procedures. Basically they are based on generate and test philosophy. At one end, generator generates entire.
CS 484 – Artificial Intelligence
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
AE1APS Algorithmic Problem Solving John Drake..  Previously we introduced matchstick games, using one pile of matches  It is possible to have more than.
Progressively Finite Games
Games of probability What are my chances?. Roll a single die (6 faces). –What is the probability of each number showing on top? Activity 1: Simple probability:
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
State Space 4 Chapter 4 Adversarial Games. Two Flavors Games of Perfect Information ◦Each player knows everything that can be known ◦Chess, Othello Games.
Fast FAST By Noga Alon, Daniel Lokshtanov And Saket Saurabh Presentation by Gil Einziger.
CompSci Recursion & Minimax Playing Against the Computer Recursion & the Minimax Algorithm Key to Acing Computer Science If you understand everything,
1 Game Playing Chapter 6 Additional references for the slides: Luger’s AI book (2005). Robert Wilensky’s CS188 slides:
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
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)
How computers play games with you CS161, Spring ‘03 Nathan Sturtevant.
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Othello.
Lecture 20: April 12 Introduction to Randomized Algorithms and the Probabilistic Method.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
Check it out! : Simple Random Sampling. Players of a dice game roll five dice and earn points according to the combinations of numbers they roll.
Game Playing State-of-the-Art  Checkers: Chinook ended 40-year-reign of human world champion Marion Tinsley in Used an endgame database defining.
Called as the Interval Scheduling Problem. A simpler version of a class of scheduling problems. – Can add weights. – Can add multiple resources – Can ask.
Brian Duddy.  Two players, X and Y, are playing a card game- goal is to find optimal strategy for X  X has red ace (A), black ace (A), and red two (2)
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.
6 Sums of Games.. Lecture6 Admin Plagiarism forms Answer football cup final problem. //Daisy Problem hints e.g. try a smaller size. General problem solving.
Instructor: Vincent Conitzer
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.
Topic 3 Games in Extensive Form 1. A. Perfect Information Games in Extensive Form. 1 RaiseFold Raise (0,0) (-1,1) Raise (1,-1) (-1,1)(2,-2) 2.
Monte-Carlo methods for Computation and Optimization Spring 2015 Based on “N-Grams and the Last-Good-Reply Policy Applied in General Game Playing” (Mandy.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Adversarial Games. Two Flavors  Perfect Information –everything that can be known is known –Chess, Othello  Imperfect Information –Player’s have each.
Part 3 Linear Programming
Main Menu Main Menu (Click on the topics below) Combinatorics Introduction Equally likely Probability Formula Counting elements of a list Counting elements.
Game tree search Chapter 6 (6.1 to 6.3 and 6.6) cover games. 6.6 covers state of the art game players in particular. 6.5 covers games that involve uncertainty.
Games, page 1 CSI 4106, Winter 2005 Games Points Games and strategies A logic-based approach to games AND-OR trees/graphs Static evaluation functions Tic-Tac-Toe.
Advanced Dynamic Programming II HKOI Training Team 2004.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Bushy Binary Search Tree from Ordered List. Behavior of the Algorithm Binary Search Tree Recall that tree_search is based closely on binary search. If.
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
CS-424 Gregory Dudek Lecture 10 Annealing (final comments) Adversary Search Genetic Algorithms (genetic search)
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Chance We will base on the frequency theory to study chances (or probability).
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 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
Adversarial Search and Game-Playing
Algorithms and Networks
What is the next line of the proof?
Alpha-Beta Search.
NIM - a two person game n objects are in one pile
Alpha-Beta Search.
Instructor: Vincent Conitzer
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Lecture 3: Environs and Algorithms
Team Dont Block Me, National Taiwan University
Alpha-Beta Search.
Alpha-Beta Search.
Minimax strategies, alpha beta pruning
Presentation transcript:

Game Theory An Overview of Game Theory by Kian Mirjalali

What kind of game is mentioned in our discussion? ABThere are two players A and B. AAssume that A always starts the game (for convenience only). In each turn, one of them plays and the turns are alternative. ABA and B are opponents (They play against each other).

Usual properties of our games: The game is finite. There is no factor of randomization (such as dice or coin). The loser is the one who cannot move anymore. We assume these properties to be true unless otherwise specified.

What we are usually supposed to do: Predict who is the winner (according to the initial state of the game). Give a winning strategy for the winner. Helpful assumption : –The players are very clever and do their best moves to win the game.

Some simple games GRAFGAME.EXE A famous Game of stones: n –There are n stones. k kr r –Each player has to take off k stones in his turn, which 1≤ k ≤ r (for some predefined value of r ).

Who is the winner in the second game? r=1Let’s solve it for r=1. –Obvious result: n BIf n is even then B wins. n AIf n is odd then A wins. No strategy is needed for winning!

Solution for the second game (continue): r=2How about r=2 ? Let’s make a winner table: Result: –Bn –B wins if and only if n is a multiple of 3. n winnerBAABAABAAB

Solution for the second game (continue): What about the strategy? n B A –If n is a multiple of 3, then the winning strategy for B, is to make the number of stones, dividable by 3, after A’s moves. n A B3 ∣ n –If n is not a multiple of 3, then the winning strategy for A, is to make the number of stones, dividable by 3, in the first move, and then acting just like B in a 3 ∣ n game.

General Solution for the second game: rA similar rule holds for larger values of r: –Bnr+1 –B wins if and only if n is a multiple of r+1.

General Solution for the second game: And a similar strategy can be used for winning: nr+1, B r+1A –If n is a multiple of r+1, then the winning strategy for B, is to make the number of stones dividable by r+1 again after A’s moves. nr+1, A r+1 B(r+1) ∣ n –If n is not a multiple of r+1, then the winning strategy for A, is to make the number of stones dividable by r+1 in the first move, and then acting just like B in a (r+1) ∣ n game.

State Graph Place a vertex for each state. uv u vConnect vertex u to vertex v with a directed edge, if and only if the game can go from the state equivalent to u, to the state equivalent to v, in a single move.

An Example of State Graph n=9 r=3An example of state graph for the latter game is below (for n=9 and r=3 ):

Using state graphs to find the winners: n=9 r=3We apply the method for the example above ( n=9 and r=3 ). Starting with the vertices of final states and going up backward while finding the winners. AAAAA B AA BB

General method to find the winners: vConsider the available moves in the state of vertex v : BIf there was an edge leading to a B-marked vertex: v A –mark v with A. Otherwise: v B –mark v with B. AA??? A B v v AAAAAA B

Special notes The state graph is a DAG, in finite games. (why?) ABWe can mark the vertices of this DAG (with A or B) in the reverse order of its topological sorting. There is a single source equivalent to the initial state of the game. Its label shows the winner of the main game.

Special notes (continue) The method of marking the vertices is just like a dynamic algorithm. We can use the memoized method to mark the vertices (just like any other dynamic algorithm). We can use the state graph also in order to obtain a winning strategy.

Special notes (continue) ABThe winner always moves from an A-marked vertex state to a B-marked one. B AThe loser always has no way but moving from a B-marked vertex state to an A-marked one.

Special notes (continue) B AIn the final states (which are sinks in the DAG) B-marked vertices are losing states and A-marked vertices are winning states. The memoized algorithm works just like a post-order traversal.

An important problem What should we do if the number of the states is too many to be stored in memory? Examples : –Chess –Reversi –Checkers

An important problem (continue) The answer is just the answer to the same problem in dynamic algorithms: We have to use Back-Tracking. We have to sacrifice time for memory.

More problems What if Back-Tracking was a too slow algorithm due to the number of the states?

More problems (answer) It’s in this moment when all hope for a fast deterministic algorithm has faded. We can no longer go as deep as the vertices of final states. We have to use a new method. Not always leading to win but doing nearly the best moves in each turn.

A new method ABWe don’t put A and B labels on vertices any more. Instead, we assign a real value to each vertex. It’s something like probability to win the game. The more this value is, the more it’s probable for us to win the game. A winning state vertex is assigned the value of + ∞ (and vise versa).

A new method (continue) We start the Back-Tracking just like a simple one, but as we reach an appropriate depth (not too shallow resulting in bad moves and not too deep resulting in long runtimes), we stop going down and use a heuristic function to evaluate the assigned value to the current vertex.

A new method (continue) The better the heuristic function works, the better the algorithm selects its moves. The value assigned to upper vertices is specified according to these two principles: –Our player tries to maximize the assigned value. –The opponent tries to minimize it.

A new method (continue) An optimization method: α- β-pruning. It’s mentioned in DA courses.

Bye Bye sentences It was just an overview of the game theory. You can see many interesting puzzles about games. You can deal with them much better now. Writing programs playing games is an enjoyable job. Start it right now (of course after the DA seminars): select a famous game and write its program. You won’t regret that!

An open problem: Find a good heuristic function for the game of life.