Board Game Designers Forum - Comments for "The math on different sets of dice. Help a brother out!"
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out
Comments for "The math on different sets of dice. Help a brother out!"enNo, I did not make Lea. It
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99490
<p>No, I did not make Lea. It was/is made by one Pierre Denis. I did contact him a few years ago about adding some extra functions to make doing calculations on dice a bit easier and he did so (open source at its best!).</p>
<p>That library does a lot more than just calculating probabilities on dice, which also means that (as you can see above...) sometimes the syntax is much heavier than anydice and you can need a few extra lines of code to do simple things that anydice does automatically. It looks like the new version is a bit more user-friendly though, so I have to look into how that works.</p>
Thu, 06 Sep 2018 08:45:24 +0000pellecomment 99490 at https://www.bgdf.compelle wrote:X3M wrote:
If I
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99484
<p><div class="quote-msg"><div class="quote-author"><em>pelle</em> wrote:</div><div class="quote-msg"><div class="quote-author"><em>X3M</em> wrote:</div><br />
If I get home. And you need help with that website. Or need someone to double check things. Let me know.</p>
<p>At least 1 hit or exactly one hit are 2 entirely different things. You need the at least function. It will include multiple hits.<br />
</div></p>
<p>1 hit is 1 hit, so my answers assumed OP was interested in the probability of exactly 1 hit. The values for exact number of hits (as I gave above) are more useful most of the time since you can just add them to quickly calculate various ranges, like if you want to know 1 or more hits or 2-3 hits or whatever.</div></p>
<p>Agreed.<br />
Having the "at least" option, makes chances for at least 1 hit very high with 3 dice. Regardless of the set.</p>
<p>And uhm...the one you didn't do manually. Is still correct. :)</p>
<p>Interesting precise results. Did you program that yourself? I miss anydice having that option.</p>
Wed, 05 Sep 2018 20:25:22 +0000X3Mcomment 99484 at https://www.bgdf.comX3M
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99476
<p><div class="quote-msg"><div class="quote-author"><em>X3M</em> wrote:</div>Www.anydice.com</p>
<p>Explore it a bit.</p>
<p>If I get home. And you need help with that website. Or need someone to double check things. Let me know.</p>
<p>At least 1 hit or exactly one hit are 2 entirely different things. You need the at least function. It will include multiple hits.</p>
<p>Also. Anydice allows for simple custom dice like the ones you described.</div><br />
That's pretty powerful.</p>
<p>Still, I think it's better to understand the WHY.. at least a little bit. :)</p>
Wed, 05 Sep 2018 15:40:25 +0000Jay103comment 99476 at https://www.bgdf.comX3M wrote:
If I get home. And
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99475
<p><div class="quote-msg"><div class="quote-author"><em>X3M</em> wrote:</div><br />
If I get home. And you need help with that website. Or need someone to double check things. Let me know.</p>
<p>At least 1 hit or exactly one hit are 2 entirely different things. You need the at least function. It will include multiple hits.<br />
</div></p>
<p>1 hit is 1 hit, so my answers assumed OP was interested in the probability of exactly 1 hit. The values for exact number of hits (as I gave above) are more useful most of the time since you can just add them to quickly calculate various ranges, like if you want to know 1 or more hits or 2-3 hits or whatever.</p>
Wed, 05 Sep 2018 14:55:28 +0000pellecomment 99475 at https://www.bgdf.comI tried Lea on this (not the
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99474
<p>I tried Lea on this (not the latest version though, and using python 2, so not 100 % the same code as would probably be used with the latest versions).</p>
<p><code><br />
from lea import *</code></p>
<p>d1 = Lea.fromValFreqsDict({1 : 4, 0 : 2})<br />
d2 = Lea.fromValFreqsDict({1 : 3, 0 : 3})<br />
d3 = Lea.fromValFreqsDict({1 : 2, 0 : 4})</p>
<p>print d1.times(3)<br />
print<br />
print d2.times(3)<br />
print<br />
print d3.times(3)<br />
print<br />
print d1+d2+d3<br />
</p>
<p>Results:<br />
<code><br />
0 : 1/27<br />
1 : 6/27<br />
2 : 12/27<br />
3 : 8/27 </code></p>
<p>0 : 1/8<br />
1 : 3/8<br />
2 : 3/8<br />
3 : 1/8 </p>
<p>0 : 8/27<br />
1 : 12/27<br />
2 : 6/27<br />
3 : 1/27 </p>
<p>0 : 2/18<br />
1 : 7/18<br />
2 : 7/18<br />
3 : 2/18<br />
</p>
<p>This is the same results as my formulas above. Yay! (Except I did not manually calculate the last one that combines one of each type of dice, so that one I just hope is correct.)</p>
Wed, 05 Sep 2018 14:51:36 +0000pellecomment 99474 at https://www.bgdf.comWww.anydice.com
Explore it a
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99473
<p><a href="http://Www.anydice.com" title="Www.anydice.com">Www.anydice.com</a></p>
<p>Explore it a bit.</p>
<p>If I get home. And you need help with that website. Or need someone to double check things. Let me know.</p>
<p>At least 1 hit or exactly one hit are 2 entirely different things. You need the at least function. It will include multiple hits.</p>
<p>Also. Anydice allows for simple custom dice like the ones you described.</p>
Wed, 05 Sep 2018 14:30:24 +0000X3Mcomment 99473 at https://www.bgdf.comFruittreeee wrote:So
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99469
<p><div class="quote-msg"><div class="quote-author"><em>Fruittreeee</em> wrote:</div>So basically, 33%, 50% and 66% chance of a hit. Right? Right?? I dunno maths man!</div><br />
So far so good.<br />
<div class="quote-msg"><div class="quote-author">Quote:</div>My question is this:<br />
What are the odds of getting a hit with one, two or three of the dice in each different set? (Not mixing sets! That would be crazy math! Unless you feel like it ofcourse)</div><br />
You're asking about the probability of getting at least 1 hit with two "33" dice? Or 3 "33" dice?</p>
<p>The way to pose that question is to ask the odds of getting NO hits, and then your answer is the opposite.</p>
<p>So the odds of getting no hits with two "33" dice are 2/3 * 2/3 = 4/9 = 0.4444. The odds with three dice are 2/3 * 2/3 * 2/3 = 8/27 = 0.296.</p>
<p>Therefore the odds of NOT getting no hits (i.e. getting at least 1 hit) are 0.5555 and 0.704.</p>
<p>You can do the math for the other two cases :) The "66" die is the reverse of this die, though, so that answer is 0.4444 and 0.296.</p>
<p>If you want to mix dice, you just do this with numbers that are different. If you wanted to roll one of each type, that's just 1/3 * 1/2 * 2/3.</p>
<p>If you wanted something more complicated, like the probability of getting exactly 2 hits out of 3 dice, there's more math involved.</p>
Wed, 05 Sep 2018 14:08:06 +0000Jay103comment 99469 at https://www.bgdf.comWelcome to bgdf!
The maths
https://www.bgdf.com/forum/game-creation/mechanics/math-different-sets-dice-help-brother-out#comment-99467
<p>Welcome to bgdf!</p>
<p>The maths for three identical dice is actually pretty simple in this case, since there are only two possible outcomes (hit or no hit), which means what you have are essentially three coins to flip. You just have to imagine coins that are heavier on one side so not unbiased like coins should be.</p>
<p>If the probability is p (where p for your dice are 0.33, 0.50, and 0.66) of a hit then the probability of 3 hits is p * p * p. 2 hits is 3 * p * p * (1 - p), 1 hit is 3 * p * (1 - p) * (1 - p). (I... think?)</p>
<p>It does get a bit crazy with mixed dice. Several cases to enumerate. Would suggest using something like Lea to calculate it, since computers are better at that stuff than we humans are anyway. (<a href="https://bitbucket.org/piedenis/lea" title="https://bitbucket.org/piedenis/lea">https://bitbucket.org/piedenis/lea</a>)</p>
Wed, 05 Sep 2018 13:23:11 +0000pellecomment 99467 at https://www.bgdf.com