Page 1 of 1

Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Wednesday, 13th July 2016, 12:22
by MainiacJoe
I mean, seriously:
  Code:
7 + 1d(1d4 - 1 + (1d(Power) - 1)/6) + (1d(Power) - 1)/7 damage.

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Wednesday, 13th July 2016, 12:29
by crate
Because that's how it's been and there's no reason to change it because the player doesn't see it anyway.

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Wednesday, 13th July 2016, 14:12
by wheals
Because we let a theoretical mathematician write it.

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Wednesday, 13th July 2016, 14:53
by Hands
wheals wrote:Because we let a theoretical mathematician write it.


Way too many numbers for theoretical maths. I see no mention of sheafs or cohomology anywhere. Must be Hungarian.

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Wednesday, 13th July 2016, 16:27
by amalloy
I think |amethyst summed up pretty well how most formulas in crawl are decided upon:

|amethyst[24/24]: <|amethyst> but also the general Crawl principle of "we'll do some weird hard-to-tweak shit for our probability distribution, then figure out the math later"

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Wednesday, 13th July 2016, 18:50
by dpeg
Hands: Polya told us to do it like this!

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Saturday, 16th July 2016, 07:20
by TonberryJam
All formula should be written in a way that the hardware should be able to process in the most efficient manner possible. Or were we devolving into the "don't think, but feel" society?

All formula shall now be done in DnD format. Dice role! 1d100

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Saturday, 16th July 2016, 08:39
by CanOfWorms
MainiacJoe wrote:I mean, seriously:
  Code:
7 + 1d(1d4 - 1 + (1d(Power) - 1)/6) + (1d(Power) - 1)/7 damage.

according to the source code the bracketing is wrong, it's actually supposed to be
  Code:
7 + 1d( 1d4 - 1 + (1d(Power) - 1)/6 + (1d(Power) - 1)/7 )

Source code:
  Code:
1004     int hurted = 8 + random2(random2(4) + (random2(pow) / 6)
1005                    + (random2(pow) / 7));

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Saturday, 16th July 2016, 09:56
by goodcoolguy
The weird thing about this formula is not so much that it's complicated looking as that its distribution is remarkably similar to ones given by much simpler formulas. For example, going by canofworms' formula above, nearly the same distribution is obtained by the much simpler 2d(2*power/13) + 1d6 + 4. See http://anydice.com/program/8dbd for simulations. Notice how much easier it is to understand the impact of power in this other formula.

The distribution from the formula is essentially the distribution for a throw of two dice, plus a small die to smooth it out a little.

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Saturday, 16th July 2016, 14:34
by dynast
TIL.

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Sunday, 17th July 2016, 10:02
by goodcoolguy
Hm, upon further review, it turns out anydice expands nested d's in a way that in this case just passes the inner result through, so the distribution it gives for the airstrike formula as written is actually just the one for 7 + 1d4 - 1 + (1d(power) - 1)/6 + (1d(power) - 1)/7.

The anydice output struck me as odd since the distribution given by, say, 1d(1d10), should skew left. It's a basically a descending triangle. Iterated applications of "d" act like integrators, it turns out. One consequence of this is that you can't actually express distributions like this in terms of simple sums of dice because such distributions will always have zero skew. So, sorry about that!

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Sunday, 17th July 2016, 21:14
by duvessa
goodcoolguy wrote:Hm, upon further review, it turns out anydice expands nested d's in a way that in this case just passes the inner result through, so the distribution it gives for the airstrike formula as written is actually just the one for 7 + 1d4 - 1 + (1d(power) - 1)/6 + (1d(power) - 1)/7.

The anydice output struck me as odd since the distribution given by, say, 1d(1d10), should skew left. It's a basically a descending triangle. Iterated applications of "d" act like integrators, it turns out. One consequence of this is that you can't actually express distributions like this in terms of simple sums of dice because such distributions will always have zero skew. So, sorry about that!
dammit why couldn't you have kept your mouth shut we almost got airstrike buffed

Re: Why is Airstrike's Damage Formula So Bizarre?

PostPosted: Sunday, 17th July 2016, 23:51
by Hirsch I
I like this thread. it is a cool thread.