| Post/Author/DateTime | Post |
|---|
| #1Dictum_MortuumOct 28, 2007 18:38:18 | Dungeons and Dragons and mathematics, especially statistics and probability theory are strongly connected. Average players do not find complex theories and formulas interesting and don't even need them to play, but to the optimization side of D&D these are essential additions to find the best abilities to move characters to the next level.
Given that these boards have seen some mathematical analysis from time to time, i think that a thread like this would come in handy for everyone to clear some topics out. |
| #2Dictum_MortuumOct 28, 2007 18:41:20 | reserved #1 |
| #3Dictum_MortuumOct 28, 2007 18:41:57 | reserved #2 |
| #4Dictum_MortuumOct 28, 2007 18:42:58 | reserved #3 |
| #5Dictum_MortuumOct 28, 2007 18:44:45 | reserved #4 |
| #6ikerenOct 28, 2007 21:22:56 | Indeed. I look forward to finding out what will go in these posts. |
| #7pariah_ex_mortisOct 28, 2007 21:35:58 | Can we please find the terminal velocity for DnD. |
| #8davidwlOct 28, 2007 22:05:38 | Most Impressive: http://forums.gleemax.com/showthread.php?t=573196
Best,
David |
| #9tleilaxu_gholaOct 28, 2007 23:42:45 | From my [thread=861084]Optimization by the Numbers[/thread] thread:
- Opposed Rolls:
Explaination/DerviationOpposed rolls all work the same way. Each side rolls a d20 and adds a modifier to it. Whoever has the highest modifier wins the tie. Here's how I think about it (may not be the best way of solving it, but it works):
Treat the monster's roll as a probability and yours as a fixed variable. Examine it case by case. Each of your rolls has a probability of 1/20, calculate the probability that the monster could beat your roll with the modifiers in place. Multiply that probability by 1/20 and sum over all twenty events. The total result cannot be greater than 100%. To put it in generalized terms:
N -1∑Pr(X+n
Basically the only chore is to figure out how many possible rolls there are such that the monster succeeds, ie where X+n < Z + Y is satisfied. We restrict outselves to the case where X-Z = N+1, then we always lose. Take a concrete example, Z = +15, X = +10, and you roll a 6. The monster needs to roll a 2 or better, leaving 19 possible rolls in which he could succeed. For any roll of 5 or lower on your part, the monster always succeeds, contributing a total of 25% to his total probability of success. In variables, that's (N+[Z-(X+n)]). Plug in N = 20, Z = 15, X = 10, and n = 6, and you'll see it gives 19, that is 19 possible rolls to succeed. Going into this we knew that we needed to roll better than (Z-X), since Z > X. Now we have a general formula for Z > X.
N -2∑(N+[Z-(X+n)]) + N -1(Z-X), where n ranges from (Z-X+1) to N.
Now lets evaluate the sum... this will require a few tricks. If you don't follow... I'm sorry. I'll write out each step.
N -2∑(N+[Z-(X+n)]) = N -2∑(N+Z-X)-N -2∑(n), both sums over the original range.
N -2(N+Z-X)(N-(Z-X))-N -2N(N+1)/2 + N -2(Z-X)(Z-X+1)/2
Bringing the total to:
N -2(N+Z-X)(N-(Z-X))-N -2N(N+1)/2 + N -2(Z-X)(Z-X+1)/2+N -1(Z-X)
Just to check, lets try the original case, plugging in N = 20, X = 10, Z = 15.
(1/400)(25)(15)-210/400+15/400+100/400= 280/400 = 70%. Meaning you would only have a 30% chance of beating a monster in this opposed check.
Now lets look at the case where Z= N, we'd always win. Again, let’s use a concrete example. Z = 10, X = 15, and you roll a 6. The monster has to roll a 12 to beat you, giving him 9 possible rolls to succeed. So N-([X+n]-Z) gives the number of possible rolls. The monster always fails for rolls less than 7, so the best he can get is a 70% success rate (he automatically fails 6/20 times). In variables, that's (X+1)-Z automatic failures. We, as the player, needn't roll any higher than N-(X-Z) to ensure success on our part. I translate this to mean that the monster automatically fails for n > N-(X-Z). We're now in position to calculate the general formula for X > Z.
N -2∑(N-[(X+n)-Z]), where n ranges from 1 to N-(X-Z)-1.
Evaluation time... again standard manipulations to evaluate the sum
N -2∑(N-[(X+n)-Z]) = N -2∑(N-X+Z]) - N -2∑(n), both sums over the original range.
N -2(N-(X-Z)-1)(N-X+Z) - N -2(N-(X-Z))(N-(X-Z)-1)/2
Bringing the total to:
(1/2)N -2(N-(X-Z)-1)(N-X+Z)
Again, lets check with the variables from the original scenario to make sure I didn't screw up badly:
1-(1/2)(1/400)(14)(15) = 1-105/400 = .7375.
Note the above derivation assumes that the offender wins the tie, this is actually wrong in retrospect, so rather than redoing all the sums, I'm just going to calculate the tie probability. Then we'll subtract it from the "offender".
Same deal as before, we need to find all the possible rolls such that the condition X + n = Z + Y. In other words X-Z = Y-n. Obviously if Z-X > N, then the two cannot ever be equal. Likewise, if X-Z > N, then the two cannot ever be equal. These form the bounds for our problem. The interesting thing is that for all the possible values of X + n (ranging from X + 1 to X + N), there is only one combination Z + Y that will satisfy the tie condition. The only difficulty then becomes discovering the range for n. Basically we're going to have two scenarios: your mod is bigger or the monster's mod is bigger. If your mod is bigger then the range of n in the sum is from 1 to N - (X-Z). If your mod is smaller, the sum ranges from Z-X+1 to N. So basically we come up with these to formulas:
If your mod is bigger: Tie probability = N -2*(N-X+Z)
If your mod is smaller: Tie probability = N -2*(N-Z+X)
Wanna check? Take my mod to be 15 and the monster's to be 10. Check that link (below) and you'll see that the tie probability is 3.8%. My formula gives: (20-15+10)/400 = 15/400 = 3.75 %. The other one is the exact same thing, just with the modifiers reversed in role. So now our final formulas come to:
If your mod is bigger:
Probability of Success = 1 - (1/2)N -2(N-(X-Z)-1)(N-X+Z), where X = your modifier, Z = monster modifier
If your mod is smaller:
1 - (1/2)N -2[((N-(Z-X))(N-(Z-X)+1) - 2(N-Z+X)], where X = your modifier, Z = monster modifier
In a moment of insecurity, I decided to check these numbers against what other people have said. I googled a bit and came to this site: >>LINK<<
His numbers agree with mine (rounded to one decimal place). Just add the tie probability to the win probability to see. To check the case Z > X, add the tie probability to the lose and you get the 70/30 split I calculated.
|
| #10GharlaneOct 29, 2007 2:19:42 | Here is a derivation of the optimal penalty to take when power attacking using basic probability and calculus.
First I'll show how it's done for 1 attack and then I'll give the full formula for n attacks.
The probability of an attack hitting is a function of the number you need to roll in order to hit (T):
p(hit) = (21-T)/20
T = AC - AB = opponent's AC - your attack bonus
The expected value of the damage is simply the average damage (d) multiplied by p(hit)
E(damage) = d*p(hit) = d(21-T)/20
Since the bonus damage done is a function of the weapon's handedness, we must include an additional variable:
h: handedness of a weapon; h= 1 or 2
Our variable of ultimate interest is the penaluty to take when power attaching.
x: power attack penalty taken
Thus, the expected damage formula, modified for power attack, becomes:
E(d) = (d+hx)(21-T-x)/20
Since this is a quadratic function, to find max[E(d)], we want to find x where the tangent of E(d)=0, i.e., solve for x when d/dx E(D) = 0
Thus, the optimal power attack penalty is:
x = 1/2(21-T-d/h)
Next we extend this to the general case of n attacks:
Multiple Attacks:
n: # attacks
P(hit) obviously becomes more complicated, with the 1st attack taken at T, the 2nd at T-5, the 3rd at T-10,etc...
Expressed for n attacks, p(hit) becomes:
p(hit) = [n(21-T)-5/2n(n-1)]/20
= n/40(47/2-T-5/2n)
Following the same procedure as the single attack case (find the point at which the tanget of E(d)=0 and express it in terms of x), the optimal power attack penalty is:
x = 1/4(47-5n-2T-2d/h)
QED
The formual makes obvious some properties of power attack to which everyone here should be familiar:
n, number of attacks: as you gain addtional attacks, power attack becomes a poorer choice.
T, target number needed to hit: as your chance of hitting decreases, power attack becomes a poorer choice (if you can only on a natural 20 anyway, then you should power attack at the maximum).
d, average damage: The more damage you expect to do, the poorer a choice power attacking becomes. This is obvious when we consider the marginal utility of power attck; the more damage you do, the less impact an additional +1 or +2 has. Meanwile, the attack penalty for power attacking is fixed at 5%. Once, the %increase in averge damage does not exceed the %decrease in p(hit) there is no point in power attacking.
h, handedness: Power attack is obviusly less effective 1-handed. |
| #11Chaos_RedefinedOct 29, 2007 3:37:41 | Comparisons of buffs, save-or-dies, and direct damage, based on varying spell levels and typical monsters of appropriate CRs. |
| #12argaudOct 29, 2007 3:41:38 | You might find this webpage useful:
http://klubkev.org/~ksulliva/ralph/dnd-stats.html |
| #13hovnarrOct 29, 2007 3:53:14 | One thing I'd found useful is a comparison for low level casters - when to attempt to cast defensively and when to just take the AoO and hope for the best.
In a nutshell - if your opponents odds of hitting your AC is worse than your odds of passing the skill check, take the AoO. Sometimes though, it's very important to get that spell through and then getting hit is less significant than if you get hit hard enough to make the DC higher than it would have been if you just cast defensively. Dunno how to compile all this mathematically though. |
| #14Chaos_RedefinedOct 29, 2007 3:59:43 | You might find this webpage useful:
http://klubkev.org/~ksulliva/ralph/dnd-stats.html
According to the link, it is impossible (not just improbable) for a character to roll 6 attributes each being 13 or lower, even though the average attribute is ~12.25... Something seems wrong with that. |
| #15argaudOct 29, 2007 5:34:12 | According to the link, it is impossible (not just improbable) for a character to roll 6 attributes each being 13 or lower, even though the average attribute is ~12.25... Something seems wrong with that.
That is because the method of rolling 4d6 mentioned in the Core books advises to reroll any character with all attributes under 13. I think the program used automatically discards them. |
| #16ziliuseOct 29, 2007 9:21:01 | Just a Little Note
The correct way to evaluate the average value of a NdF (i.e. 5d4, 4d6 etc ...) is: Average = (MAX + MIN)/2 = (NxF + N)/2 = Nx(F+1)/2
Average(5d4)=5x5/2=12.5
Average(4d6)=4x7/2=14
Some people seem to use the formula (F/2)xN and that would give:
Average(5d4)=(4/2)x5=10 wrong
Average(4d6)=(6/2)x4=12 wrong |
| #17xeno_eleusisOct 29, 2007 10:33:16 | Can we please find the terminal velocity for DnD. Official D&D Game Rule FAQ
How far does a character fall in a single round? If my
griffon-riding character falls off his mount 300 feet up, how
long do other characters have to catch him?
This ends up being both a rules and a physics question. The
short answer is, “In a single round, you fall far enough to hit
the ground in the vast majority circumstances that come up in
the game.”
Here’s the long answer: A falling character accelerates at a
rate of 32 feet per second per second. What that means is that
every second, a character’s “falling speed” increases by 32 feet.
The distance he falls in that second is equal to the average of
his falling speeds at the beginning of that second and at the end
of that second. Thus, during the first second he falls 16 feet (the
average of 0 feet and 32 feet, which are his speeds at the start
and end of that second). During the next second he falls 48 feet
(the average of 32 feet and 64 feet). He falls 80 feet during the
third second, 112 feet the fourth second, 144 feet the fifth
second, and 176 feet the sixth second. That’s a grand total of
576 feet fallen in the first round alone, hence the short answer
given above—the number of falls occurring in any campaign
longer than this is probably pretty small. For ease of play, you
could simply use 500 feet as a nice round number—it’s easier
to remember.
Of course, the character falls even farther the next round,
although acceleration soon ends due to the resistance of air on
the falling body (this is what’s called terminal velocity). If the
Sage remembers his high-school physics, terminal velocity for
a human body is roughly 120 mph (equivalent to a speed of
1,200 feet per round, or 200 feet per second); thus, the
character’s falling speed hits its maximum in the first second of
the second round. It’s safe to say that after 2 rounds the
character will have fallen nearly 2,000 feet, and will fall
another 1,200 feet per round thereafter.
In the example you give, other characters would clearly
have no more than a round to react, and it’s possible they’d
have even less time. Remember that despite the sequential
nature of D&D combat actions, things are happening very
quickly—virtually simultaneously, in many cases. As a DM,
I’d probably allow every character a chance to react to a long
fall (such as the one you describe), as long as their action
occurs before 1 full round has passed from the start of the fall.
(As a side note, that’s why feather fall allows its caster to cast
it even when it isn’t her turn—otherwise, adjudicating its
timing would be a nightmare.) The difference between “you
watch the character fall all the way to the ground before you
can react” and “the character starts to fall, what do you do?” is
really just up to the DM’s sense of fun and fair play. Off the top
of my head, I’d say that anything up to 50 or 60 feet is clearly
too fast to react to (barring a readied action, of course), and
anything that approaches 250 feet or more should probably
allow characters some chance to react, but that’s purely a
personal opinion.
Whatever decision you make, try to make the same
decision every time, so that players know what to expect. If this
situation comes up a lot in your game, it’s probably worth
creating a house rule so you don’t have to try to remember
what you did last time. (If your campaign routinely features
300-foot falls, your characters might want to invest in some
rings of feather falling!)
Now, if you start altering certain assumptions—such as the
force of gravity, or the density of air that’s resisting the falling
character, or even the mass of the falling character—these
calculations become less useful. Yet, unless your numbers are
much different than the standard values, you can still use these
as benchmarks.
|
| #18Maat_MonsOct 29, 2007 20:49:43 | If your mod is bigger:
Probability of Success = 1 - (1/2)N-2(N-(X-Z)-1)(N-X+Z), where X = your modifier, Z = monster modifier
If your mod is smaller:
1 - (1/2)N-2[((N-(Z-X))(N-(Z-X)+1) - 2(N-Z+X)], where X = your modifier, Z = monster modifier
The second formula is the probability that you will have a result less than the defender, right? You never label the formula as far as I can tell, but when Z is 20 and X is 0 it produces a probability of 1, so that must be what it represents.
I notice that the two formulas are the same except that X and Z are reversed.* Moreover, both equations are represented by 1 – ½N-2(N – abs(X–Z) – 1)(N – abs(X–Z)) for the ranges you specified.
There may be ways to make the information easier to read and understand, is what I’m getting at.
* This is easier to see if you make the observation that (N-Z+X)(N-Z+X+1) - 2(N-Z+X) = (N-Z+X)(N-Z+X) + (N-Z+X) - 2(N-Z+X) = (N-Z+X)(N-Z+X) - (N-Z+X) = (N-Z+X)(N-Z+X-1). |
| #19awaken_D_M_golemOct 30, 2007 15:44:43 | Most Impressive: http://forums.gleemax.com/showthread.php?t=573196
Best,
David
And the specific post where the largest non-infinite # invented by humanity is: http://forums.gleemax.com/showpost.php?p=8378468&postcount=58 |
| #20noldorforceMay 03, 2008 0:26:39 | Really, the thread kinda needs it. |
| #21Dictum_MortuumMay 03, 2008 3:41:49 | wow, i completely forgot about this thread :P |
| #22tazendrasghostMay 03, 2008 7:47:47 | You have so many handbooks, its not surprising you'd forget a thread. :-) |
| #23Dictum_MortuumMay 03, 2008 7:50:58 | Well at the time i was studying statistics for a lesson in my university. I have to study again now to complete this thread :P |
| #24SuppokoMay 03, 2008 8:32:52 | please don't I will feel compelled to look at all the pretty letters and numbers and in doing so turn my brain to mushy goo. Please spare my brain that horrible fate. |
| #25skydragonknightMay 03, 2008 9:03:43 | Things I remember seeing on the board that this thread needs to link to:
Power Attack calculations--I thought I saw a formula/method for evaluating loss/gain on this.
Manyshot calculations--this was actually a table somewhere. It provides a very nice format for those who are weak on formula-fu but can do the basic addition/subtraction needed to find the values for the table. I believe similar tables/charts would be useful for this thread for the purpose of calculating probability in the same way that T-tables are useful in stats. |
| #26surrealMay 03, 2008 11:31:20 | I have several power attack threads in my collection. I'm not sure about the manyshot one, but I remember which thread you're talking about. I think the general conclusion was that shooting three arrows provided the optimal damage output for an average encounter. |
| #27awaken_D_M_golemMay 03, 2008 14:04:29 | 1.Opposed Rolls: complicated
2.Roll versus DC:
Explaination/Derivation
Whew, this guy is waaaay easier to do.
So you're not the only one. I think we have a back-handed reason why 4th Edition goes direction #2. |