Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Community
General Tabletop Discussion
*TTRPGs General
Probability Distribution of Dice
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Drawmack" data-source="post: 764159" data-attributes="member: 4981"><p>Let me start by saying there is a recursive algorithm at the end for those who wish to skip the logic that brought me to that algorithm. Now on with the insanly long post.</p><p></p><p></p><p></p><p>As has been previously noted this is in fact a heavily factorial problem. </p><p></p><p><strong>Question:</strong> Where do the 11 and the 4 come from?</p><p><strong>Answer:</strong> 11 = (7+5-1) = (result + set length – 1) and 4 = (5 – 1) = (set length -1)</p><p></p><p><strong>Question:</strong> Will this formula need to be modified to work with dice?</p><p><strong>Short Answer:</strong> I don’t know.</p><p><strong>Long Answer:</strong> This formula is known to with when your possible value for each element in the set is 0 – 9 (i.e. d10 where 0 = 0). So it will work on calculating the probability of a d10 if we take into account that 10 = 0 when we query for the probability of a desired number. However with dice you have can have a value for each element in the set of n, where n is the number of sides on the die being represented. Eliminating zeros eliminates a lot of possibilities and therefore means that this formula will need to be modified but this can get us working in the appropriate direction.</p><p></p><p>Also this has lead me to more thinking on the idea of a recursive algorithm to solve this problem of the number of sets possible.</p><p></p><p>[code][color=white]</p><p>getPossibleCombinations (desiredMin,desiredMax,arySides)</p><p> thisDie = pop(arySides)</p><p> desiredMax = desiredMax – 1</p><p> possibleMax = total(arySides)</p><p> possibleMin = count(arySides)</p><p> i = 0</p><p> while((thisDie – i + possibleMin) > desiredMax)</p><p> i++</p><p> return (thisDie-1) * getPossibleCombinations((desiredMax – thisDie), desiredMax – 1,arySides)</p><p>[/color][/code]</p><p></p><p>This function should yield us the number of possible combinations that will yield any result. I would still like a mathematical formula to accomplish this, but this function is easy enough to implement. That is if it’s correct.</p><p></p><p>I'm going to implement this formula on a php page now, shouldn't take long, and when I'm done I'll post the link so we can all go beat up on it and see if it really works.</p></blockquote><p></p>
[QUOTE="Drawmack, post: 764159, member: 4981"] Let me start by saying there is a recursive algorithm at the end for those who wish to skip the logic that brought me to that algorithm. Now on with the insanly long post. As has been previously noted this is in fact a heavily factorial problem. [b]Question:[/b] Where do the 11 and the 4 come from? [b]Answer:[/b] 11 = (7+5-1) = (result + set length – 1) and 4 = (5 – 1) = (set length -1) [b]Question:[/b] Will this formula need to be modified to work with dice? [b]Short Answer:[/b] I don’t know. [b]Long Answer:[/b] This formula is known to with when your possible value for each element in the set is 0 – 9 (i.e. d10 where 0 = 0). So it will work on calculating the probability of a d10 if we take into account that 10 = 0 when we query for the probability of a desired number. However with dice you have can have a value for each element in the set of n, where n is the number of sides on the die being represented. Eliminating zeros eliminates a lot of possibilities and therefore means that this formula will need to be modified but this can get us working in the appropriate direction. Also this has lead me to more thinking on the idea of a recursive algorithm to solve this problem of the number of sets possible. [code][color=white] getPossibleCombinations (desiredMin,desiredMax,arySides) thisDie = pop(arySides) desiredMax = desiredMax – 1 possibleMax = total(arySides) possibleMin = count(arySides) i = 0 while((thisDie – i + possibleMin) > desiredMax) i++ return (thisDie-1) * getPossibleCombinations((desiredMax – thisDie), desiredMax – 1,arySides) [/color][/code] This function should yield us the number of possible combinations that will yield any result. I would still like a mathematical formula to accomplish this, but this function is easy enough to implement. That is if it’s correct. I'm going to implement this formula on a php page now, shouldn't take long, and when I'm done I'll post the link so we can all go beat up on it and see if it really works. [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*TTRPGs General
Probability Distribution of Dice
Top