Games and Strategies
Vedran Kasalica
Games and Strategies Vedran Kasalica Last time Proofs by induction - - PowerPoint PPT Presentation
Games and Strategies Vedran Kasalica Last time Proofs by induction This lecture Games and Strategies Modelling Computing Systems The book is called Modelling Computing Systems - but so far we have studied: sets functions
Vedran Kasalica
Proofs by induction
Games and Strategies
The book is called Modelling Computing Systems - but so far we have studied:
... but these are all very static concepts. There's hardly any computation or interaction.
Today we will study how to apply these ideas to model a series of interactions. Interactions can be:
We focus on a more restricted form of interactions, namely games.
Not computer games. Instead focus on well-specified interactions between players. The players can:
We can distinguish between different kinds of games:
for winning.
These are two extremes: the most fun games have some element of luck (e.g. monopoly).
We'll study the games without any chance element. Furthermore, we focus on games of perfect information (e.g. chess). Finite games - if the game could continue indefinitely call it e.g. “a draw” Rules according to which the player makes a move on each turn make a strategy.
Winning strategy - guarantees a victory regardless the moves of the
Drawing strategy - guarantees that the opponent will not win regardless the moves of the opponent A position in a game can be:
Drawing position
Losing position
Theorem In a two-player game-of-no-chance of perfect information, either one the two players has a winning strategy, or they both have drawing strategies.
Case 1: Player X has a winning strategy Claim: The other one cannot have a winning strategy If we fix the two strategies only one player will win and only the strategy of that player was the winning one
Case 2: Neither player has a winning strategy Claim: Both players have a drawing strategy First player (X) doesn’t have a winning strategy, so player O can always respond in
doesn’t win. Similarly, player X can ensure that the player O doesn’t win. Thus, they both have a drawing strategies.
Case 2: Neither player has a winning strategy Claim: Both players have a drawing strategy First player (X) doesn’t have a winning strategy, so player O can always respond in
doesn’t win. Similarly, player X can ensure that the player O doesn’t win. Thus, they both have a drawing strategies.
Theorem In a two-player game-of-no-chance of perfect information, either of the players has a winning strategy or they both have drawing strategies. Corollary If a game cannot end in a draw, one of the two players has a winning strategy.
Game: Starting with a pile of 10 coins, 2 players take turns removing either 2 or 3 coins from the pile. The winner is the one that takes the last pile; if one coin remains, then the game is a draw.
Game: Starting with a pile of 10 coins, 2 players take turns removing either 2 or 3 coins from the pile. The winner is the one that takes the last pile; if one coin remains, then the game is a draw.
W/D/L labels are omitted
Game:
arbitrary number of coins
exactly one pile
Game:
arbitrary number of coins
exactly one pile
Game:
arbitrary number of coins
exactly one pile
Game:
arbitrary number of coins
exactly one pile
Game:
arbitrary number of coins
exactly one pile
Game:
arbitrary number of coins
exactly one pile
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Winning strategies
Universal winning strategy: 1) Write out number of coins in piles in binary representation
Universal winning strategy: 2) Add up the columns module 2
Universal winning strategy: If all of the columns have even parity, the position is balanced,
Observation:
1.
If the position is balanced, then every move will lead to an unbalanced position
2.
If the position is unbalanced, then there exists a move that will lead to a balanced position
3.
Empty board is a balanced position
Universal winning strategy: 3) If the position is unbalanced (W), player should make a move to make it balanced each time and he is insured to win
Universal winning strategy: 4) If the position is balanced (L), the opponent has a chance to use the same strategy to win
Game:
choose a remaining square and eat all the squares below it and to the right from it
Game:
choose a remaining square and eat all the squares below it and to the right from it
Strategies:
Strategies:
Strategies:
Strategies:
Strategies:
Strategies:
Strategies:
Strategies:
response in the following moves
Strategies:
response in the following moves
Strategies:
Theorem: Except for the 1 x 1 case, the first player always has a winning strategy.
Theorem: Except for the 1 x 1 case, the first player always has a winning strategy. Proof: Suppose that the second player has a winning strategy. Draw a contradiction.
Game:
symbol
territories first with an unbroken chain of their symbols
Game:
symbol
territories first with an unbroken chain of their symbols
Theorem: The game of Hex can never end in a draw.
Theorem: The first player always has a winning strategy in Hex.
Game:
color, horizontally or vertically
the two opposite borders
Theorem: The game of Bridg-it can never end in a draw.
Theorem: The game of Bridg-it can never end in a draw.
Theorem: The first player always has a winning strategy in Bridg-it.
Winning strategy:
We have learned:
These concepts are quite useful in Game theory - application of agent interactions in economics, social sciences, computer science, etc. (e.g. auction, bargaining) Agents might have different goals and potentially cooperate
Modelling Computing Systems Chapter 10