lobbingcase23
lobbingcase23
  • Threads: 1
  • Posts: 1
Joined: Jan 22, 2024
January 24th, 2024 at 10:15:18 PM permalink
Hi all, I am working on building a dice roll game, and I was wondering how to do calculations. We have the usual 6 sided die and start with 4 free rolls. Every time you roll the number 4 (so P(four) = 1/6), you get another 4 rolls. I know how to find the average number of free spins through a geometric series and simulating the situation with code, but how would I model this process using Markov Chains? (I'm guessing the results of calculations using Markov Chains would be an approximate?)
Wizard
Administrator
Wizard
  • Threads: 1494
  • Posts: 26520
Joined: Oct 14, 2009
January 25th, 2024 at 5:37:55 AM permalink
Let x = total rolls

x = 1 + (1/6)*4x
x/3 = 1
x = 3

So, total of three rolls, on average.

If we deduct one for the initial roll and call everything everything else a free roll, including free rolls from free rolls, then total free rolls is 3-1=2.

You don't need to use Markov chains.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
aceside
aceside
  • Threads: 2
  • Posts: 479
Joined: May 14, 2021
January 25th, 2024 at 8:41:52 AM permalink
If we change the question a little bit. Every time you roll the number 4 (so P(four) = 1/6), you get another one bonus roll.

Then x=6/5.
Nice. This situation is closer to casino slot machines. Let me understand this question, but a bonus may produce more bonuses. It seems like the question is asking the average number of bonus rolls per round of 4-starting-free rolls?
Last edited by: aceside on Jan 25, 2024
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6293
Joined: Jun 22, 2011
January 25th, 2024 at 4:19:44 PM permalink
Markov Chains are meant to calculate an exact value, not an approximate one.

I don't think you can use a Markov chain in this instance, as the chain would keep extending deeper and deeper because it is always possible to end up with three more rolls than what you currently have.
  • Jump to: