Question
Another game. There are two players, A and B. At the beginning of the game, each starts with 4 coins, and there are 2 coins
Another game. There are two players, A and B. At the beginning of the game, each starts with 4 coins, and there are 2 coins in the pot. A goes first, then B, then A,. . . . During a particular player's turn, the player tosses a 6-sided die. If the player rolls a: 1, then the player does nothing. 2: then the player takes all coins in the pot. 3: then the player takes half of the coins in the pot (rounded down). 4,5,6: then the player puts a coin in the pot. A player loses (and the game is over) if they are unable to perform the task (i.e., if they have 0 coins and need to place one in the pot). We define a cycle as A and then B completing their turns. The exception is if a player goes out; that is the final cycle (but it still counts as the last cycle). We are trying to determine the expected number (and maybe even the distribution) of cycles the game will last for. I'm guessing that you can use "first-step" analysis to get the expected value. Simulation seems the easiest thing to do to get the entire distribution.
Please help to solve it and write the python code, possibly using Markov Chain Monte Carlo method. thanks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started