Download presentation

Presentation is loading. Please wait.

Published byGage Anslow Modified over 2 years ago

1
Study Group Randomized Algorithms 21 st June 03

2
Topics Covered Game Tree Evaluation –its expected run time is better than the worst- case complexity of any deterministic algorithm –demonstrates a technique to derive a lower bound on running time of any randomized algorithm for a problem Introduction to Game Theory –leads to the Minimax Principle

3
Definition of Game Tree a Game Tree T d,k is uniform tree in which the root and the internal nodes has d children and every leaf is at distance 2k from the root internal nodes at even distance from the root are labeled MIN and at odd distance are labeled MAX each leaf is associated with a value

4
Example of a Game Tree T 2,2 MIN MAX MIN MAX 0100010101000101

5
Observations Every root-to-leaf path goes through the same number of MIN and MAX nodes (including the root) If the depth of the tree is 2k, there are 2 2k = 4 k leaves

6
Game Tree Evaluation MIN (AND) Node –returns the lesser of the two children MIN 00 0 01 0 10 0 11 1

7
Game Tree Evaluation MAX (OR) Node –returns the greater of the two children MAX 00 0 01 1 10 1 11 1

8
What is the value returned by the root? AND OR AND OR 0100010101000101

9
A Deterministic Algorithm Depth-first manner –always visit the left child before the right child AND OR 0101 AND OR 1010 worst case – need to visit ALL 4 k leaves a better case – visit 2 leaves is enough

10
A Randomized Algorithm Coin toss –0.5 probability choosing the left child and 0.5 probability choosing the right child AND OR 0101 Expected cost (number of leaves visited) 3

11
Design Rationale Suppose AND node were to return 0 –at least one of the leaves is 0 –if deterministic algorithm is used, your opponent can always “hide” this 0 and make your algorithm visit both leaves –if randomized algorithm is used, you foils your opponent’s strategy. The expected number of steps (leaf visits) is 3/2 Similar for OR node were to return 1

12
Design Rationale Expected cost –E AND_0 = E OR_1 = 3/2 What if AND(OR) node were to return 1(0)? –both children are 1(0), it seems that the randomized algorithm doesn’t improve much since we need to visit both children anyway –however, it benefits the parent level

13
Analysis of the Randomized Algo. Claim: The expected cost of the randomized algorithm for evaluating any T 2,k game tree is at most 3 k Proof by induction: –consider k = 1 –expected cost 3

14
Analysis of the Randomized Algo. Case I – root evaluated to 0 –at least one of the subtrees (OR nodes) gives 0 –you have 0.5 probability that this particular node is checked first –E(T) = ½ 2 + ½ (3/2 + 2) = 2.75 AND OR 0001 return 0

15
Analysis of the Randomized Algo. Case II – root evaluated to 1 –both subtrees give 1 –E(T) = 2 3/2 = 3 Both cases give 3 expected cost, so the claim is true for k=1 AND OR 0101 return 1

16
Analysis of the Randomized Algo. Assume that for all T 2,k-1, the expected cost 3 k-1 First, consider the OR-root tree OR T 2,k-1 either gives 1 or 0

17
Analysis of the Randomized Algo. Case I: OR-root gives 1 –at least one subtree gives 1 –0.5 probability we use it first –E(T) ½ 3 k-1 + ½ 2 3 k-1 = 3/2 3 k-1 Case II: OR-root gives 0 –both subtrees give 0 –E(T) 2 3 k-1 OR T 2,k-1 either 1 or 0

18
Analysis of the Randomized Algo. Now, consider the AND-root game tree, T 2,k OR T 2,k-1 AND OR T 2,k-1 OR T 2,k-1 T 2,k

19
Analysis of the Randomized Algo. Case I: AND-root gives 0 –at least one subtree gives 0 –0.5 probability we use it first –E(T 2,k ) ½ 2 3 k-1 + ½ (3/2 3 k-1 + 2 3 k-1 ) = 2.75 3 k-1 3 k Case II: AND-root gives 1 –both subtrees give 1 –E(T 2,k ) 2 3/2 3 k-1 = 3 k either 1 or 0 AND OR T 2,k-1 OR T 2,k-1

20
Analysis of the Randomized Algo. Proved the claim: The expected cost of the randomized algorithm for evaluating any T 2,k game tree is at most 3 k A tree has n = 4 k leaves, then k = log 4 n. Substitute log 4 n for k in the expected cost, then the cost 3 log 4 n. By x log a b = b log a x, the cost n log 4 3 =n 0.793

21
Question Our randomized algorithm for the game tree evaluation of any uniform binary tree with n leaves is n 0.793. Can we establish that no randomized algorithm can have a lower expected running time? YES! Using Yao’s technique the Minimax Theorem Game Theory Basics

22
Introduction to Game Theory Consider the stone-paper-scissors game between 2 players –loser pays $1 to the winner –payoff matrix M : M ij denotes the payoff by the Column player to the Row player ScissorsPaperStone Scissors01 Paper01 Stone10

23
Two-person Zero-sum Game Zero-sum game –the net amount won by C and R is exactly zero, i.e., the amount of money is not increased or decreased among them Every two-person zero-sum game can be represented by a n m payoff matrix

24
Pure Strategy v.s. Mixed Strategy Pure (Deterministic) strategy –always uses the same strategy or a deterministic pattern, e.g., R always chooses ‘stone’ while C always chooses ‘paper’ Mixed (Randomized) strategy –the strategy chosen by a player is randomized, i.e., a probability distribution among all possible strategies

25
Pure Optimal Strategy Zero-information game –the strategy chosen by the opponent is unknown Naturally, the goal of the row (column) player is to maximize (minimize) the payoff –If R chooses strategy i, then she is guaranteed a payoff of min j M ij, regardless of what C’s strategy is –Optimal strategy for R is an strategy i that maximize min j M ij.

26
Pure Optimal Strategy Similarly, the optimal strategy of C is –If C chooses strategy j, then he is guaranteed a loss of no more than max i M ij, regardless of what R’s strategy is –Optimal strategy for C is an strategy j that minimize max i M ij. Let V r = max i min j M ij and V c = min j max i M ij be the lower bound of payoff R can get and the upper bound of loss C can ensure respectively

27
Inequality for All Payoff Matrix Minimax Inequality max i min j M ij min j max i M ij Proof: i j Vr Vc z Clearly, V r z V c

28
Saddle-point If V r = V c, we say the game has a solution and the value of the game is V = V r = V c the solution is also known as the saddle- point of the game If no saddle-point exists, it means there is no clear-cut pure optimal strategy for any player

29
Mixed Strategy Game The Row player picks a vector p = (p 1, …, p n ), which is a probability distribution on the rows of M. (i.e., pi is the probability that R will choose strategy i) Similarly, the Column player picks a vector q = (q 1, …, q m ), i.e., q j is the probability that R will choose strategy j)

30
Mixed Optimal Strategy Expected Payoff –E[payoff] = p T M q –R aims to maximize it while C aims to minimizes it As before, let V r = max p min q p T M q be the lower bound of the expected payoff R can get using a strategy p Let V C = min q max p p T M q be the upper bound of the expected payoff C need to pay using a strategy q

31
von Neumann’s Mininmax Theorem For any two person, zero-sum game specified by a matrix M max p min q p t Mq = min q max p p T Mq the optimal strategy for R will yield the same payoff as the optimal strategy for C! if either player uses his optimal strategy, the opponent cannot improve the payoff

Similar presentations

OK

Games of Chance Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.

Games of Chance Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on automobile related topics of psychology Ppt on live line maintenance usa Ppt on law against child marriage in pakistan File type ppt on cybercrime jobs Ppt on holographic technology video Std ppt only Ppt on content addressable memory xilinx Ppt on automobile industry in india 2012 Ppt on backwater curve Maths ppt on binomial theorem