+ Reply to Thread
Results 1 to 4 of 4

Thread: Dice Roll Game Probabilities

  1. #1
    Points: 7, Level: 1
    Level completed: 13%, Points required for next Level: 43

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dice Roll Game Probabilities




    Hello everyone, I have a bit of a probability question for you as it has been quite awhile since I have been in school, and I can’t remember the equations for figuring out probabilities.
    I am developing a dice rolling game where-in players roll 1 to 3 6-sided dice of a particular color vs. another player. On one end, you have an attacker and on the other a defender. There are 5 different types of dice; Red, Orange, Yellow, Green, and Blue. When rolling, an attacking player will have so many ‘hits’ negated by the opposing player’s ‘blocks’. Each dice has a set amount of ‘hit’ sides and ‘block’ sides as listed below:
    Red Dice= 5 Hit Sides, 1 Block Side (or think of it like 2-6 are hits, 1 is a block)
    Orange Dice= 4 Hit Sides, 2 Block Sides (or think of it like 3-6 are hits, 1-2 is a block)
    Yellow= 3 Hit Sides, 3 Block Sides (or think of it like 4-6 are hits, 1-3 is a block)
    Green= 2 Hit Sides, 4 Block Sides (or think of it like 5-6 are hits, 1-4 is a block)
    Blue= 1 Hit Side, 5 Block Sides (or think of it like 6 is a hit, 1-5 is a block)
    As should be apparent, certain dice are better on offense and certain dice are better on defense. As an example, An attacking player rolls 3 Red dice, a defender counters with 3 Blue dice. The attacker rolls 3 hits, the defender rolls 2 blocks. The 2 blocks rolled by the defender negate 2 of the attackers hits; so when the final it tallied, the defender takes 1 hit.
    A second example, The attacker then throws 2 Orange dice, and rolls 1 hit. The defender rolls 3 green and gets 2 blocks, negating the attackers hit. The defender gets 0 hits on him/her.
    The problem I am having is figuring out the probability of certain rolls vs other rolls. Is there a formula that I could use to determine the probability of getting 1 hit, 2 hits, and 3 hits respectively for each type of dice vs the other dice? IE: 1 Red Dice vs 1 Blue dice would 'hit' _ _% of the time.
    I hope I am being descriptive enough. Below is a link to an Excel spreadsheet that is showing what I am trying to accomplish. I think this may clear it up better.
    https://dl.dropboxusercontent.com/u/...blilities.xlsx
    If anyone can help, it would be very, very much appreciated! Thank you for your time and have a great day!

  2. #2
    TS Contributor
    Points: 22,410, Level: 93
    Level completed: 6%, Points required for next Level: 940

    Posts
    3,020
    Thanks
    12
    Thanked 565 Times in 537 Posts

    Re: Dice Roll Game Probabilities

    Simply use the Binomial pmf. The no. of hits taken seemingly is

    \max\{H - B, 0\}

    You just need to use independence property to list the joint pmf table of (H, B), and can calculate the required pmf accordingly.

  3. #3
    Points: 7, Level: 1
    Level completed: 13%, Points required for next Level: 43

    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dice Roll Game Probabilities

    Forgive me for sounding like a complete idiot, but its been over a decade since my last stat and prob class. Is there any way you could elaborate on that or post a sample of one equation?

  4. #4
    TS Contributor
    Points: 22,410, Level: 93
    Level completed: 6%, Points required for next Level: 940

    Posts
    3,020
    Thanks
    12
    Thanked 565 Times in 537 Posts

    Re: Dice Roll Game Probabilities


    OK I try to do the first example for you - Attackers w/ 3 Reds vs Defenders w/ 3 Blues.

    For each red dice, the probability of obtaining a hit in a roll is \frac {5} {6} and therefore the total number of hits in 3 independent red dice follow \text{Binomial}\left(3, \frac {5} {6}\right), i.e. having the pmf

    \Pr\{H = h\} = \binom {3} {h} \left(\frac {5} {6}\right)^h\left(\frac {1} {6}\right)^{3-h}, ~~ h = 0, 1, 2, 3

    Similarly the distribution of the number of blocks is also \text{Binomial}\left(3, \frac {5} {6}\right)

    By independence the joint pmf is just the product,

    \Pr\{H = h, B = b\} = \binom {3} {h} \left(\frac {5} {6}\right)^h\left(\frac {1} {6}\right)^{3-h}\binom {3} {b} \left(\frac {5} {6}\right)^b\left(\frac {1} {6}\right)^{3-b}~~ h, b \in \{0, 1, 2, 3\}

    Finally let X = \max\{H - B, 0\} to be the number of hits. You may form the following table for the transformation:

    \begin{tabular}{|c|c|c|c|c|} \hline$X = \max\{H - B, 0\}$ & $H = 0$ & $H = 1$ & $H = 2$ & $H = 3$ \\ \hline $B = 0$ & 0 & 1 & 2 & 3 \\ \hline$B = 1$ & 0 & 0 & 1 & 2 \\ \hline$B = 2$ & 0 & 0 & 0 & 1 \\ \hline$B = 3$ & 0 & 0 & 0 & 0 \\ \hline\end{tabular}

    So this summarize how to map the 16 support points of (H, B) to X. To calculate the pmf of x one just need to sum the corresponding entries.

    E.g. \Pr\{X = 2\} = \Pr\{H = 2, B = 1\} + \Pr\{H = 3, B = 2\}

    and just use the joint pmf listed above to calculate it.

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats