0
$\begingroup$

I am trying to create a simple Game Theory game in which :

  • Two players are competing against each other (Player 1 and Player 2)
  • Each player can either perform "Action A" or "Action B"
  • There is some element of probability

The whole point of this, is to show that in this game - there are some instances in which it is clearly more favorable to perform "Action A" and some instances in which it is clearly more favorable to perform "Action B"

I tried to imagine the following situation:

  • Player 1 always starts the game
  • Players take turns rolling a 6 sided die (singular of "dice"). Player 1 rolls, Player 2 rolls, Player 1 rolls, Player 2 rolls, etc.
  • For example, Player 1 first turn = 4, Player 1 second turn = 6, Player 1 third turn = 5 : Player 1 Current Score = 4 + 6 + 5 = 15
  • The first roll for Player 1 is kept hidden from Player 2 and the first roll of Player 2 is kept hidden from Player 1
  • A player wins the game when the sum of all rolls that he has made is exactly "25"
  • A player looses if his sum is more than "25".
  • If both players have exactly "25", they "tie", and if both players go over "25" they both tie.
  • At any time, a player can decide to "hold" - for instance, the sum of all previous rolls for Player 1 might be "22". Player 1 might decide it's too risky to continue playing for a perfect score of "25" and decides to "hold" and can not roll anymore - in this case Player 2 gets to keep rolling until Player 2 decides to "hold"
  • When both players are done, they reveal their first roll to each other : the player with the closest sum to 25 wins and any player with a sum over 25 automatically loses.
  • Players have the ability to "bluff" - for instance, a player might have rolled over 25, but he can keep rolling and give the other player the impression that his first roll was a low number (e.g. "1"), and is still not eliminated and trying to get close to 25. This might "trick" the other player to incurring extra risk by continuing to roll and end up losing.

In the above game, "Action A" could be to "keep rolling" and "Action B" could be to "hold".

I would like to analyze this game using Game Theory - for instance:

  • Suppose I write a computer simulation in which this game is randomly played 1000 times
  • For the sake of the simulation, let's assume that a player can choose to "continue" with probability 0.5 and "hold" with probability 0.5 .

My Question: When we analyze the results and outcomes of these 1000 random simulations, would it be possible to make a "chart" that shows for Player 1 at any given time:

  • Based on the number of rolls made by Player 2 (e.g. Player 2 has rolled the dice 3 times)
  • Based on the current sum of Player 2 excluding his first hidden roll (e.g. Player 2 has a sum of 14)
  • Based on the number of rolls made by Player 1
  • Based on the current of Player including his first hidden roll

Whether Player 1 should keep playing or whether he should stop playing?

This would mean that any point in the game, before Player 1 makes a decision, he can know:

  • What is the probability of "winning", "losing", "tie" if he decides to continue playing?
  • What is the probability of "winning", "losing", "tie" if he decides to stop playing?

As I type this out, I realize this is a far more complicated than I had originally anticipated - can someone think of a much "simpler" game in which a chart can be made at different points in time (e.g. each turn), showing the probability of winning/losing for choosing some "Action A" or "Action B"?

Thanks!

$\endgroup$
6
  • 2
    $\begingroup$ Very complex indeed. If you find an answer, it might be worth writing a research paper about it. The problem reminds me of Kuhn poker: en.wikipedia.org/wiki/Kuhn_poker. That's a simple stage game with some incentives to bluff. Still, it's a one-shot game, while you envision the game being repeated multiple times. How do you think the players will handle history? And, are the payoffs discounted in any way? $\endgroup$ Mar 3 at 6:42
  • $\begingroup$ @ Thomas: Thank you for your reply! I am an amateur and could not even dream of writing a paper LOL ! I will check out this link on Kuhn Poker .... I thought of an example to solve my problem, I posted an answer below - check it out! $\endgroup$
    – stats_noob
    Mar 3 at 7:34
  • $\begingroup$ Is this the same thing as Kuhn Poker? youtube.com/watch?v=N68s_UgOFBc $\endgroup$
    – stats_noob
    Mar 3 at 7:35
  • $\begingroup$ That is not exactly the same game. But the one in the video is much simpler. Anyway, I need to figure out why you want to run these simulations in the first place. Which statement corresponds the most to what you have in mind: 1) Players are friends who played the same game 1000 times. 2) There are 1000 couples who play that game only once? $\endgroup$ Mar 4 at 10:10
  • $\begingroup$ Thank you for your reply! Suppose there is Player A and Player B - they are competing against each other and play this game 1000 times (without knowing the probabilities of each coin landing on heads or tails). Now, Player C and Player D get access to the results of these 1000 games (and they also do not know the probabilities of each coin landing on heads or tails) - based on the results from Player A and Player B, they try to figure out which coin should they flip to increase their chances of winning - given information about what result was obtained by the first player. $\endgroup$
    – stats_noob
    Mar 4 at 16:09

1 Answer 1

0
$\begingroup$

Helllo Everyone! OP here - thought of an answer to my own question!

Recently, I thought of the following "game" to illustrate "mixed strategies and comparative advantages":

  • There are two Players: Player 1 and Player 2
  • There are two Coins: Coin 1 and Coin 2
  • Coin 1 lands on "Heads" with a probability of 0.5 and "Tails" with a probability of 0.5
  • Coin 2 lands on "Heads" with a probability of 0.7 and "Tails" with a probability of 0.3
  • If Coin 1 is "Heads", a score of -1 is obtained; if Coin 1 is "Tails", a score of +1 is obtained
  • If Coin 2 is "Heads", a score of -3 is obtained; if Coin 1 is "Tails", a score of +4 is obtained

In this game, Player 1 always starts first - Player 1 chooses either Coin 1 or Coin 2, flips the coin that they select and gets a "score". Then, Player 2 chooses either Coin 1 or Coin 2, flips the coin that they select and get a "score". The Player with the higher score wins, the Player with the lower score loses (a "tie" is also possible).

I wrote the R code to simulate this game being played 100 times:

score_coin_1 = c(-1,1)

score_coin_2 = c(-3, 4)


results <- list()

for (i in 1:100)

{

iteration = i


player_1_coin_choice_i = sample(2, 1, replace = TRUE)
player_2_coin_choice_i = sample(2, 1, replace = TRUE)

player_1_result_i = ifelse(player_1_coin_choice_i == 1, sample(score_coin_1, size=1, prob=c(.5,.5)),  sample(score_coin_2, size=1, prob=c(.7,.3)) )
player_2_result_i = ifelse(player_2_coin_choice_i == 1, sample(score_coin_1, size=1, prob=c(.5,.5)), sample(score_coin_2, size=1, prob=c(.7,.3)))

winner_i = ifelse(player_1_result_i > player_2_result_i, "PLAYER_1", ifelse(player_1_result_i == player_2_result_i, "TIE", "PLAYER_2"))

my_data_i = data.frame(iteration, player_1_coin_choice_i, player_2_coin_choice_i, player_1_result_i, player_2_result_i , winner_i )

 results[[i]] <- my_data_i

}



results_df <- data.frame(do.call(rbind.data.frame, results))

head(results_df)
  iteration player_1_coin_choice_i player_2_coin_choice_i player_1_result_i player_2_result_i winner_i
1         1                      1                      1                -1                 1 PLAYER_2
2         2                      1                      2                -1                -3 PLAYER_1
3         3                      2                      2                 4                -3 PLAYER_1
4         4                      1                      2                 1                -3 PLAYER_1
5         5                      2                      1                 4                 1 PLAYER_1
6         6                      2                      2                 4                -3 PLAYER_1

Then, I analyzed the results (e.g. "one_two_sum" = player 1 chose coin 1 and player 2 chose coin 2):

 library(dplyr)
    
    one_one_sum = data.frame(one_one %>% 
      group_by(winner_i) %>% 
      summarise(n = n()))
    
    one_two_sum = data.frame(one_two %>% 
      group_by(winner_i) %>% 
      summarise(n = n()))
    
    two_one_sum = data.frame(two_one %>% 
      group_by(winner_i) %>% 
      summarise(n = n()))
    
    two_two_sum = data.frame(two_two %>% 
      group_by(winner_i) %>% 
      summarise(n = n()))

For instance, suppose Player 1 chose "Coin 1":

one_one_sum
  winner_i  n
1 PLAYER_1  9
2 PLAYER_2 10
3      TIE  9

 one_two_sum
  winner_i  n
1 PLAYER_1 23
2 PLAYER_2  6

Based on these results, it appears that if Player 1 picks "Coin 1", Player 2 should also pick "Coin 1", seeing that he has a 10/29 chance of winning and a 9/29 chance of "tie" (overall, a 19/29 chance of not losing).

Similarly, we can look at the optimal strategy if Player 1 picks "Coin 2":

two_one_sum
  winner_i  n
1 PLAYER_1  5
2 PLAYER_2 14

 two_two_sum
  winner_i  n
1 PLAYER_1  5
2 PLAYER_2  1
3      TIE 18

Based on these results, it appears that Player 2 should almost always pick Coin 1 if Player 2 picks Coin 2 - as Player 2 has a 14/19 chance of winning if this happens.

The overall results can be summarized in a table like this:

enter image description here

I would be curious to see how complicated this game gets when more coins are involved and players have more turns!

Thanks everyone!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.