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, OSR, & D&D Variants
*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, OSR, & D&D Variants
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Upgrade your account to a Community Supporter account and remove most of the site ads.
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Ability score statistics: point buy vs. rolling
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="kerbarian" data-source="post: 2966233" data-attributes="member: 40393"><p>Since there was a decent amount of consensus on that number, I went through and reviewed my code again -- found one more issue. I was only allowing a reroll if the max score was <= 13 <em>and</em> the sum of modifiers was <= 0, instead of if either one is true. After fixing that, I get a number consistent with the others in that thread -- 30.4769. Note that this is an analytical/deterministic result, not stochastic.</p><p></p><p>With that final correction, here's a review of the average point buy costs for various dice rolling methods:</p><p></p><p>Average Characters (3d6, reroll if max < 12 or modifiers < -2): 19.5109 (26.3% chance of reroll)</p><p>Standard rolling (4d6, drop lowest, reroll if max < 14 or modifiers < +1): 30.4769 (12.9% chance of reroll)</p><p>Standard + reroll ones (4d6, drop lowest, reroll 1s, reroll if max < 14 or modifiers < +1): 37.7441 (2.4% chance of reroll)</p><p>High-Powered Characters (5d6, drop lowest 2, reroll if max < 15 or modifiers < +2): 39.1323 (6.6% chance of reroll)</p><p></p><p>Also, I cleaned up and consolidated the code, and I added comments. So it's available for double-checking, or if anyone wants to use it as a basis for other calculations. The program is in C++, and it runs in about 1.3 seconds on a 2GHz machine whe compiled using gcc -O2. There's not much code involved, but it's bulked up to about double its raw size due to comments.</p><p></p><p>This is for the straight 4d6-drop-lowest version, but it's easy to change with the #defines at the top (rerolling 1s is done by using 5-sided dice with a die bonus of 1):</p><p></p><p>[CODE]#include <math.h></p><p>#include <memory.h></p><p>#include <stdio.h></p><p>#include <algorithm></p><p></p><p>#define NUM_DICE 4</p><p>#define NUM_SIDES 6</p><p>#define DIE_BONUS 0</p><p>#define REROLL_MAX_SCORE_THRESHOLD 14</p><p>#define REROLL_MODIFIER_SUM_THRESHOLD 1</p><p></p><p>// calculate the probability of each score and fill it into _score_prob</p><p>void calculate_score_probs(double* _score_prob)</p><p>{</p><p> memset(_score_prob, 0, sizeof(double)*19);</p><p></p><p> // iterate through all possible sets of dice rolls</p><p> int num_possibilities = (int)pow(NUM_SIDES, NUM_DICE);</p><p> for(int i=1; i<num_possibilities; i++) {</p><p> int die[NUM_DICE];</p><p> memset(die, 0, sizeof(int)*NUM_DICE);</p><p></p><p> // turn this index into individual die roll numbers</p><p> int i2 = i;</p><p> for(int j=0; j<NUM_DICE; j++) {</p><p> die[j] = i2 % NUM_SIDES + 1 + DIE_BONUS;</p><p> i2 /= NUM_SIDES;</p><p> }</p><p></p><p> // sort the dice so that the highest rolls are first in the array</p><p> std::sort(die, die+NUM_DICE);</p><p> std::reverse(die, die+NUM_DICE);</p><p> // increment the probability for the score that's the sum of the highest 3 dice</p><p> _score_prob[die[0]+die[1]+die[2]] += 1.0/num_possibilities;</p><p> }</p><p>}</p><p></p><p>int main()</p><p>{</p><p> // score_prob is the probability of rolling each score. The score is the index into</p><p> // the array, so the first 3 entries will be empty.</p><p> double score_prob[19];</p><p> calculate_score_probs(score_prob);</p><p> // score_cost is an array of the point costs for each score, indexed the same way</p><p> int score_cost[19] = {0, 0, 0, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16};</p><p></p><p> // prob_of_cost is the probability of a set of scores having a specific total point</p><p> // cost (ignoring score sets that can be rerolled). The point cost + 24 is the index</p><p> // into the array (total possible range of -24 to 96).</p><p> double prob_of_cost[121];</p><p> memset(prob_of_cost, 0, sizeof(double)*121);</p><p> // total prob is the probability of rolling a set of scores that can't be rerolled.</p><p> double total_prob = 0;</p><p></p><p> // iterate through all possible sets of scores. There are 16 possible scores (3-18),</p><p> // so the total number of sets of scores is 16^6 = 16777216.</p><p> for(int i=0; i<16777216; i++)</p><p> {</p><p> bool max_score_over_threshold = false;</p><p> int modifier_sum = 0;</p><p> double prob = 1;</p><p> int cost = 0;</p><p></p><p> // turn the index into a set of individual scores</p><p> int i2 = i;</p><p> for(int j=0; j < 6; j++) {</p><p> int score = i2 % 16 + 3;</p><p> i2 /= 16;</p><p></p><p> // for each score, record if it's over 13 or and its effect on the sum of</p><p> // the modifiers, so we can decide if this score set can be rerolled.</p><p> if(score >= REROLL_MAX_SCORE_THRESHOLD)</p><p> max_score_over_threshold = true;</p><p> modifier_sum += score/2 - 5;</p><p></p><p> // after each roll, multiply the probability of this score set by the</p><p> // probability of rolling the most recent score. By the end of the set,</p><p> // we'll have the overall probability of the entire score set.</p><p> prob *= score_prob[score];</p><p> // likewise, add the point cost of the current score into the total for</p><p> // this set.</p><p> cost += score_cost[score];</p><p> }</p><p></p><p> // only count this score set if it can't be rerolled</p><p> if(max_score_over_threshold && modifier_sum >= REROLL_MODIFIER_SUM_THRESHOLD) {</p><p> prob_of_cost[cost+24] += prob;</p><p> total_prob += prob;</p><p> }</p><p> }</p><p></p><p> // add up the cost of each score set, weighted by the probability of that score</p><p> // set occurring.</p><p> double total_cost = 0;</p><p> for(int i=0; i<=121; i++)</p><p> total_cost += (i-24) * prob_of_cost[i];</p><p></p><p> printf("score sets that can be rerolled: %.4f%\n", (1 - total_prob)*100);</p><p> // the overall EV is the (weighted) average cost of non-rerollable score sets</p><p> // divided by the chance of rolling a non-rerollable score set in the first place.</p><p> printf("average point cost after rerolls: %.4f\n", total_cost/total_prob);</p><p></p><p> return 0;</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="kerbarian, post: 2966233, member: 40393"] Since there was a decent amount of consensus on that number, I went through and reviewed my code again -- found one more issue. I was only allowing a reroll if the max score was <= 13 [i]and[/i] the sum of modifiers was <= 0, instead of if either one is true. After fixing that, I get a number consistent with the others in that thread -- 30.4769. Note that this is an analytical/deterministic result, not stochastic. With that final correction, here's a review of the average point buy costs for various dice rolling methods: Average Characters (3d6, reroll if max < 12 or modifiers < -2): 19.5109 (26.3% chance of reroll) Standard rolling (4d6, drop lowest, reroll if max < 14 or modifiers < +1): 30.4769 (12.9% chance of reroll) Standard + reroll ones (4d6, drop lowest, reroll 1s, reroll if max < 14 or modifiers < +1): 37.7441 (2.4% chance of reroll) High-Powered Characters (5d6, drop lowest 2, reroll if max < 15 or modifiers < +2): 39.1323 (6.6% chance of reroll) Also, I cleaned up and consolidated the code, and I added comments. So it's available for double-checking, or if anyone wants to use it as a basis for other calculations. The program is in C++, and it runs in about 1.3 seconds on a 2GHz machine whe compiled using gcc -O2. There's not much code involved, but it's bulked up to about double its raw size due to comments. This is for the straight 4d6-drop-lowest version, but it's easy to change with the #defines at the top (rerolling 1s is done by using 5-sided dice with a die bonus of 1): [CODE]#include <math.h> #include <memory.h> #include <stdio.h> #include <algorithm> #define NUM_DICE 4 #define NUM_SIDES 6 #define DIE_BONUS 0 #define REROLL_MAX_SCORE_THRESHOLD 14 #define REROLL_MODIFIER_SUM_THRESHOLD 1 // calculate the probability of each score and fill it into _score_prob void calculate_score_probs(double* _score_prob) { memset(_score_prob, 0, sizeof(double)*19); // iterate through all possible sets of dice rolls int num_possibilities = (int)pow(NUM_SIDES, NUM_DICE); for(int i=1; i<num_possibilities; i++) { int die[NUM_DICE]; memset(die, 0, sizeof(int)*NUM_DICE); // turn this index into individual die roll numbers int i2 = i; for(int j=0; j<NUM_DICE; j++) { die[j] = i2 % NUM_SIDES + 1 + DIE_BONUS; i2 /= NUM_SIDES; } // sort the dice so that the highest rolls are first in the array std::sort(die, die+NUM_DICE); std::reverse(die, die+NUM_DICE); // increment the probability for the score that's the sum of the highest 3 dice _score_prob[die[0]+die[1]+die[2]] += 1.0/num_possibilities; } } int main() { // score_prob is the probability of rolling each score. The score is the index into // the array, so the first 3 entries will be empty. double score_prob[19]; calculate_score_probs(score_prob); // score_cost is an array of the point costs for each score, indexed the same way int score_cost[19] = {0, 0, 0, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 16}; // prob_of_cost is the probability of a set of scores having a specific total point // cost (ignoring score sets that can be rerolled). The point cost + 24 is the index // into the array (total possible range of -24 to 96). double prob_of_cost[121]; memset(prob_of_cost, 0, sizeof(double)*121); // total prob is the probability of rolling a set of scores that can't be rerolled. double total_prob = 0; // iterate through all possible sets of scores. There are 16 possible scores (3-18), // so the total number of sets of scores is 16^6 = 16777216. for(int i=0; i<16777216; i++) { bool max_score_over_threshold = false; int modifier_sum = 0; double prob = 1; int cost = 0; // turn the index into a set of individual scores int i2 = i; for(int j=0; j < 6; j++) { int score = i2 % 16 + 3; i2 /= 16; // for each score, record if it's over 13 or and its effect on the sum of // the modifiers, so we can decide if this score set can be rerolled. if(score >= REROLL_MAX_SCORE_THRESHOLD) max_score_over_threshold = true; modifier_sum += score/2 - 5; // after each roll, multiply the probability of this score set by the // probability of rolling the most recent score. By the end of the set, // we'll have the overall probability of the entire score set. prob *= score_prob[score]; // likewise, add the point cost of the current score into the total for // this set. cost += score_cost[score]; } // only count this score set if it can't be rerolled if(max_score_over_threshold && modifier_sum >= REROLL_MODIFIER_SUM_THRESHOLD) { prob_of_cost[cost+24] += prob; total_prob += prob; } } // add up the cost of each score set, weighted by the probability of that score // set occurring. double total_cost = 0; for(int i=0; i<=121; i++) total_cost += (i-24) * prob_of_cost[i]; printf("score sets that can be rerolled: %.4f%\n", (1 - total_prob)*100); // the overall EV is the (weighted) average cost of non-rerollable score sets // divided by the chance of rolling a non-rerollable score set in the first place. printf("average point cost after rerolls: %.4f\n", total_cost/total_prob); return 0; }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Ability score statistics: point buy vs. rolling
Top