Optimal Strategies for a Generalized "Scissors, Paper, and

Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Optimal Strategies for
a Generalized "Scissors, Paper, and Stone" Game
E. Goldkin
Technische Universität München
16. Juni 2015
0 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Game Description
Tournament
Example: Scissors, Paper, Stone
Visualization
Explanation of the Scissors, Paper, Stone game
Scissors cuts paper
Paper smothers stone
Stone smashes scissors
1 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Game Description
Tournament
Game with five nodes
Structure
Explanation
Both of the players each chose a node
If both chosen nodes are equal: game is tied
Else: node at the end of the edge wins
2 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Game Description
Tournament
Tournament
Modelling as directed graph
Nodes equal options
Directed edges equal a ’is beaten by’-relation
Graph is complete
Definition: Tournament
A directed graph G (V , E ) with exactly one directed edge eij = (vi , vj ) ∈ E between
each pair of nodes vi , vj ∈ V is called a tournament (-game).
3 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Main idea
Idea
Specifying strategy as vector p = (p1 , · · · , pn )
The node is always randomly chosen
Each node has its own probability
Definition of strategy
Vector p = (p1 , p2 , · · · , pn )
n
P
pi = 1
i=1
1 ≥ pi ≥ 0 ∀i
4 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Example
Graphs with 6, 7 and 8 Nodes
Strategy vectors
p = 0, 13 , 19 , 19 , 91 , 31
9 1 1 1 1 1 1
p = 35
, 7 , 5 , 35 , 35 , 5 , 7
p = 0, 0, 0, 13 , 0, 13 , 0, 31
5 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Example
Graph with 8 Nodes
Strategy vector
Blue nodes build a 3-cycle (see red edges)
The green nodes are beaten by the cycle 3 out of 3 times
The orange nodes are beaten by the cycle 2 out of 3 times
⇒ p = 0, 0, 0, 13 , 0, 13 , 0, 13
6 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Payoff Matrix
Definition of the Payoff Matrix


0 if i = j
kij = 1 if (i, j) is an arc

 −1 if (j, i) is an arc


0 1 −1 −1
−1 0 1 1 


K (T ) = 

 1 −1 0 −1
1 −1 1 0
7 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Payoff Matrix
Definition of the Payoff Matrix


0 if i = j

kij =
1 if (i, j) is an arc

−1 if (j, i) is an arc


0 1 −1 −1
−1 0 1 1 


K (T ) = 

 1 −1 0 −1
1 −1 1 0
Annotation
K (T ) is a skew-symmetric matrix.
Derivation
Player B plays node i and player A uses strategy p
⇒ average win: (K (T )p)i
Player B wants to minimize the win of player A
⇒ average win: mini (K (T )p)i
8 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Maximinproblem
Derivation
Player B plays node i and player A uses strategy p
⇒ average win: (K (T )p)i
Player B wants to minimize the win of player A
⇒ average win: mini (K (T )p)i
Maximinproblem
v≡
max
p≥0;1T p=1
(mini (K (T )p)i )
Annotation
Player B may use the same strategy as player A
⇒v=0
9 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Optimal Strategy
Maximinproblem
v≡
max
p≥0;1T p=1
(mini (K (T )p)i )
Optimal Strategy
The Maximinproblem can be simplified: p is an optimal Strategy, if following conditions are
fulfilled:
K (T )p ≥ 0
p≥0
1T p = 1
10 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Definition
Maximinproblem
Optimal Strategy - Example
Example with 4 nodes

1

0 1 −1 −1
paper
3
−1 0 1 1 
 1 scissors




K (T ) = 
 p =  31

 1 −1 0 −1
 3 well 
1 −1 1 0
0 stone

Annotation
The well dominates the stone ⇒ The 3-cycle paper/scissors/well beats all other nodes at least
2 out of 3 times.
11 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Lemma 1
Lemma (1)
Let p and q be optimal strategies for a tournament game on a tournament, T. Then qi > 0
implies (K (T )p)i = 0.
Conclusion
Player A plays optimal strategy ⇒ Winnings ≥ 0 (B minimizes the winings)
Select nodes which make winnings zero ⇒ Subtournaments
12 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Positive Tournaments
Definition
A tournament, T, is positive if there is a positive vector, p with (K (T )p) = 0.
Example
Example


0 1 −1


K (T ) = −1 0 1 , p = 13
1 −1 0
1
3
1
3
13 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 1
Theorem (1)
Let n be an odd number. Then the number of n-node positive tournaments is
P
2f (d1 ,d3 ,··· ,dn )
d1 !·1d1 ·d3 !·2d3 ···dn !·ndn
where
f (d1 , d3 , · · · , dn ) = 1 +
1
2
P
k=1,3,··· ,n
dk (−3 + d1 gcd(k, 1) + d3 gcd(k, 3) + · · · dn gcd(k, n))
and the outer summation is over all nonnegative d1 , d3 , · · · , dn with
d1 + 3d3 + 5d5 + · · · + ndn = n
Conclusion
Calculation of the number of positive Tournaments in a game with an odd number of nodes is
now possible.
14 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 1 - Example
Example for 5 nodes
d1 , d3 , d5
f (d1 , d3 , d5 )
1
0, 0, 1
1 + 2 [1 (−3 + 1 · 5)] = 2
1
2, 1, 0 1 + 2 [2 (−3 + 2 · 1 + 1 · 1) + 1 (−3 + 2 · 1 + 1 · 3)] = 2
5, 0, 0
1 + 21 [5 (−3 + 5 · 1)] = 6
Number of positive Tournaments on 5 nodes:
4
5
+ 23 +
8
15
Summand
4
22
1!·51 = 5
2
22
2!·12 ·1!·31 = 3
26
8
5!·15 = 15
=2
The 2 tournament graphs
15 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 2
Theorem (2)
Let T be a tournament on n nodes. Then
(
rank(K (T )) =
n
n−1
if n is even
if n is odd
16 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 2 - Example
Theorem (2)
Let T be a tournament on n nodes. Then
(
rank(K (T )) =
n
n−1
if n is even
if n is odd
Example


0 1 −1 −1
−1 0 1 1 


K (T ) = 

 1 −1 0 −1
1 −1 1 0






−1 1 1
−1 0 1
−1 0 1






det(K (T )) = 1 ·  1 0 −1 − 1 ·  1 −1 −1 − 1 ·  1 −1 0 6= 0
1 −1 0
1 −1 1
1 1 0
⇒ rank(K (T )) = 4
17 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 2 - Idea of the Proof
Theorem (2)
Let T be a tournament on n nodes. Then
(
rank(K (T )) =
n
n−1
if n is even
if n is odd
Proof - Idea
Case 1: n is even
For better understanding: Laplace’s formula
Number of nonzero terms equals derangements Dn
Dn is odd which means Dn 6= 0
⇒ det(K (T )) is odd
rank(K (T )) = n
18 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 2 - Idea of the Proof
Theorem (2)
Let T be a tournament on n nodes. Then
(
rank(K (T )) =
n
n−1
if n is even
if n is odd
Proof - Idea
Case 2: n is odd
K (T ) is skew-symmetric: K (T )T = −K (T )
det(K (T )) = det(K (T )T ) = det(−K (T )) = (−1)n det(K (T ))
⇒ det(K (T )) = 0
rank(K (T )) = n − 1
19 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Positive Tournaments
Corollary (1)
Positive Tournaments have an odd number of nodes.
Graph
Example: 3 nodes


0 1 −1


K (T ) = −1 0 1 , p = 13
1 −1 0
1
3
1
3
20 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 3
Theorem (3)
The tournament game on an n node tournament T has a unique optimal strategy, p, such that
pi > 0 on a positive subtournament (which must have an odd number of nodes).
21 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 3 - Idea of the Proof
Theorem (3)
The tournament game on an n node tournament T has a unique optimal strategy, p, such that
pi > 0 on a positive subtournament (which must have an odd number of nodes).
Proof: Idea
Use of lemma (1) and theorem (2) combined with the definitions of subtournaments and definition (2) of optimal strategies.
22 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Positive Tournaments
Odd number of nodes
Uniqueness
Theorem 3 - Conclusion
Theorem (3)
The tournament game on an n node tournament T has a unique optimal strategy, p, such that
pi > 0 on a positive subtournament (which must have an odd number of nodes).
Proof: Idea
Use of lemma (1) and theorem (2) combined with the definitions of subtournaments and definition (2) of optimal strategies.
Main conclusion
There is a positive subtournament which allows us to dominate all the other nodes.
23 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Implementation
Example
References
Constraints
Constraints
K (T )p ≥ 0
p≥0
T
1 p=1
24 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Implementation
Example
References
Two Different Strategies
Strategy 1
Compute the unique optimal strategy
Use strategy p (chosing a random node while taking the probabilities into account)
25 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Implementation
Example
References
Two Different Strategies
Strategy 1
Compute the unique optimal strategy p
Use strategy p (chosing a random node while taking the probabilities into account)
Strategy 2
Given the opponents calculate q
Compute q T K (T ) then p (each round)
p changes over time
26 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Implementation
Example
References
Example of practical usage: Financial Investments
Model
Each investment as a single node
Set of quality criteria
Edge as the result of criteria comparison
K (T ) can be computed
Usage
Compute optimal strategy p
Spend money according to p
27 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Implementation
Example
References
Any Question?
Thank you for your Attention!
28 / 29
Introduction
Finding the optimal Strategy
Uniqueness of optimal Strategy
Last words
Implementation
Example
References
References
1
2
3
4
5
6
David C. Fisher, Jennifer Ryan, Optimal Strategies for a Generalized “Scissors, Paper,
and Stone” Game The American Mathematical Monthly, Vol. 99, No. 10 (Dec., 1992),
pp. 935-942
M.Dresher, The Mathematics of Game of Strategy, Prentice Hall, Englewood Cliffs, New
Jersey, 1961 [New York: Dover reprint(1981)]
D.C. Fisher, J. Ryan, Tournament games and positive tournaments, Journal of Graph
Theory
J.W. Moon, Topics of Tournaments, Holt, Rinehart and Winston, New York, 1967
F.S. Roberts, Applied Combinatorics, Rentice-Hall, Englewood Cliffs, New Jersey, 1984
J.D. Williams, The Compleat Strategyst, McGraw-Hill Book Company, New York, 1954
29 / 29