PDA

View Full Version : Dice statistics/calculus problem



J-H
2023-08-17, 06:10 PM
I'm trying to figure out a typical results distribution for this, and I'm not sure how to formulate the math.

When traveling, roll 1d6 each time the party passes through a hex. On a 1-2 (33%), they trigger an encounter. If an encounter is not triggered, then on the next hex a 1-3 (50%) triggers an encounter, followed by a 1-4 (67%), then 1-5 (84%), and finally 6-6(100%). Once an encounter is triggered, the probability for the next hex resets to 1-2 (33%).

Over 8 hexes of travel, how many encounters is the party most likely to encounter?

OldTrees1
2023-08-17, 07:30 PM
Well you have 5 cases (1/3, 1/2, 2/3, 5/6, 1/1)

With a known small finite number of hexes, one way is to just walk through it.

The first Hex:
(1/3)(1)
(2/3)(0)

The second Hex:
(1/3)(1 + (1/3)(1))
(1/3)(1 + (2/3)(0))
(2/3)(0 + (1/2)(1))
(2/3)(0 + (1/2)(0))

etc. There would be 32 timelines of 8 hexes each.

Another option would be to calculate the chance of ending up at any of the 30 unique states:

A chance to be in that timeline table:



H1(1/6^0)
H2(1/6^1)
H3(1/6^2)
H4(1/6^3)
H5(1/6^4)
H6(1/6^5)
H7(1/6^6)
H8(1/6^7)
H9(1/6^8)

2:4
122x2+3x4=162x16+3x8+4x12=104
2x104+3x64+4x24+5x24=6162x616+3x416+2x192+5x48+1x2 4=31282x3128+3x2464+4x1254+5x384+1x48=206322x20632 +3x12512+4x7392+5x2508+1x384=121292
2x121292+3x82528+4x37536+5x14784+1x2508=716740

3:3
44x2=84x16=64
4x104=4164x616=24644x3128=125124x20632=82528
N/A

4:2
3x4=123x8=24
3x64=1923x416=12543x2464=73923x12512=37536
N/A

5:1
2x12=24
2x24=482x192=3842x1254=25082x7392=14784
N/A

6:0

1x24=241x48=481x384=3841x2508=2508
N/A



Every time you return to the 2:4 row you had an encounter, so we use those 8 values and tada
2(1/6)^1 + 16(1/6)^2 + 104(1/6)^3 + 616(1/6)^4 + 3128(1/6)^5 + 20632(1/6)^6 + 121292(1/6)^7 + 716740(1/6)^8
=1444075/419904 ~= 3.44


Oddly, it is easier to calculate the expected distance between encounters rather than the expected number of encounters over a short run.
1(1/3)+2(2/3)(1/2)+3(2/3)(1/2)(2/3)+4(2/3)(1/2)(1/3)(5/6)+5(2/3)(1/2)(1/3)(1/6)(1)
= 115/54 ~= 1 encounter every 2.13 Hexes

However don't let that mislead you 8/(115/54) = 432/115 ~= 3.75 and does not equal the original question's exact answer of 1444075/419904 ~= 3.44

gbaji
2023-08-17, 08:32 PM
It's a perfectly valid probability question, but I do kinda have to ask? What is this simulating?

I guess what I'm asking is why the odds of encountering somehing actually increase the more hexes you travel through without an encounter. Seems like the age old fallacy of "the longer I flip a coin without getting heads, the more likely heads will come up". The dice don't have memory.

Are there actual bad guys in the area that know you are there and become increasingly aware of you, and send stuff after you, but then for some reason once you encounter something, they forget for some reason?

Usually, a flat odds distribution should work fine, and maintain the same "the more hexes you travel the more encounters you will have", but doesn't present us with oddities like "we just went 3 days without an encounter, so we know for 100% certain that we will have one today.

J-H
2023-08-17, 09:36 PM
big math answer!! :)
Every time you return to the 2:4 row you had an encounter, so we use those 8 values and tada
2(1/6)^1 + 16(1/6)^2 + 104(1/6)^3 + 616(1/6)^4 + 3128(1/6)^5 + 20632(1/6)^6 + 121292(1/6)^7 + 716740(1/6)^8
=1444075/419904 ~= 3.44

Oddly, it is easier to calculate the expected distance between encounters rather than the expected number of encounters over a short run.
1(1/3)+2(2/3)(1/2)+3(2/3)(1/2)(2/3)+4(2/3)(1/2)(1/3)(5/6)+5(2/3)(1/2)(1/3)(1/6)(1)
= 115/54 ~= 1 encounter every 2.13 Hexes

However don't let that mislead you 8/(115/54) = 432/115 ~= 3.75 and does not equal the original question's exact answer of 1444075/419904 ~= 3.44
Thank you!


It's a perfectly valid probability question, but I do kinda have to ask? What is this simulating?

I guess what I'm asking is why the odds of encountering somehing actually increase the more hexes you travel through without an encounter. Seems like the age old fallacy of "the longer I flip a coin without getting heads, the more likely heads will come up". The dice don't have memory.

Are there actual bad guys in the area that know you are there and become increasingly aware of you, and send stuff after you, but then for some reason once you encounter something, they forget for some reason?

Usually, a flat odds distribution should work fine, and maintain the same "the more hexes you travel the more encounters you will have", but doesn't present us with oddities like "we just went 3 days without an encounter, so we know for 100% certain that we will have one today.
For the adventure concept I have, an adventuring day would cover traveling from someplace safe to a goal area (2-4 encounters), then solving whatever is there (3-4 encounters), which creates the 5-8 encounter adventuring day that D&D is balanced (ish) around. I don't want to do "You always have 3 encounters traveling between a town and an objective" as the regularity and predictability would be too obvious. Travel should be dangerous, but manageable.

Knowing how many encounters (3.44) in a path of 8 hexes also tells me that if I create 12 encounters for each path (7 paths) then I probably have enough for the whole game. Encounters 1-3 will be pretty easy, 9-12 will be pretty hard because they will be higher level and more time will have passed with the BBEG setting stuff up.

If they do things that are positive in an area, then the encounter dice can also be cut back to d8s, d10s, etc.
I may need to scale it back to a d8 to avoid overwhelming the party. Too early to tell.

SpyOne
2023-08-18, 06:31 AM
It's a perfectly valid probability question, but I do kinda have to ask? What is this simulating?

I guess what I'm asking is why the odds of encountering somehing actually increase the more hexes you travel through without an encounter. Seems like the age old fallacy of "the longer I flip a coin without getting heads, the more likely heads will come up". The dice don't have memory.
I'd like to point out that the real world doesn't always run on dice.
Imagine you are going on a multi-day journey and there definitely is a wolf between here and there. The wolf is stupid so he's on the path, and you definitely are going to encounter him. Each day that you don't find the wolf increases the chance of encountering him later. Or actually reveals that the chance of encountering him later was always higher, and the chance of encountering him earlier was zero. You are eliminating the possibility of versions where you found him soon.

The scenario described sounds a lot like that. These encounters are out there, they are going to happen, and the only random factor is when.
(Although... the wolf happening early means that another wolf might be at the other end of the road? How many encounters is also random, so it doesn't fit my wolf-and-road model perfectly.)

Vahnavoi
2023-08-18, 03:49 PM
It's a perfectly valid probability question, but I do kinda have to ask? What is this simulating?

Usually the wrong kind of question to ask for mechanics like this. The real purpose is to prevent long strings of no encounters, the in-game reason for why that happens can be invented after-the-fact. Examples below.


I guess what I'm asking is why the odds of encountering somehing actually increase the more hexes you travel through without an encounter. Seems like the age old fallacy of "the longer I flip a coin without getting heads, the more likely heads will come up". The dice don't have memory.

Game mechanics such as this do make a version of gambler's fallacy into reality, yes. Of course, it's not a fallacy at that point. Dice having no memory is irrelevant since obviously a game master does the memorizing. Likewise, if programmed to a computer, obviously it's the computer's memory counting the encounters and weighing whatever pseudorandom function is in use.


Are there actual bad guys in the area that know you are there and become increasingly aware of you, and send stuff after you, but then for some reason once you encounter something, they forget for some reason?

Usually, a flat odds distribution should work fine, and maintain the same "the more hexes you travel the more encounters you will have", but doesn't present us with oddities like "we just went 3 days without an encounter, so we know for 100% certain that we will have one today.

In addition to some enemy becoming increasingly aware of player characters, it can just as well be the other way around. The classic use of random encounters is, after all, wandering monsters. Effectively (for example), a monsters can be in one of six places, and if it isn't found in the first five, it has to be in the last one (so on and so forth). Once encountered, the chance drops because now you're effectively looking for another monster and haven't yet confirmed any locations where it is not. The mechanic giving players (and the game master!) more information to work with isn't in itself a flaw, it can even be the point, as it facilitates planning better than having each encounter be independent random chance.

Of course, for non-independent chance, there are other tools than dice. A deck of cards would naturally have a quality similar to the die roll mechanic presented here.

gbaji
2023-08-18, 06:34 PM
The scenario described sounds a lot like that. These encounters are out there, they are going to happen, and the only random factor is when.
(Although... the wolf happening early means that another wolf might be at the other end of the road? How many encounters is also random, so it doesn't fit my wolf-and-road model perfectly.)


In addition to some enemy becoming increasingly aware of player characters, it can just as well be the other way around. The classic use of random encounters is, after all, wandering monsters. Effectively (for example), a monsters can be in one of six places, and if it isn't found in the first five, it has to be in the last one (so on and so forth). Once encountered, the chance drops because now you're effectively looking for another monster and haven't yet confirmed any locations where it is not. The mechanic giving players (and the game master!) more information to work with isn't in itself a flaw, it can even be the point, as it facilitates planning better than having each encounter be independent random chance.

Sure. I get this mechanic for situations where there is a single known enemy/encounter/thing between where the PCs are and where they are going. Example: The party is traveling to the tomb of whatever, and the tomb is defended by a tribe of lizard folk, and they will have a group who's job is to patrol the path the party is traveling to detect and attack anyone approaching the tomb from that direction. Great. There is a group of lizard folks, and as long as the party stays on this path, they will encounter them. And the odds of encountering them increase the closer they get to the tomb. Makes complete sense in that scenario.

Where I'm thrown off is the "then we reset the random chance to 1/3". Which suggests that this isn't about a single known enemy that is along the path and therefore must be encountered to reach the endpoint, but is being used to create "random encounters" which could be anything that could be in the area. To me, if it's just random encounters, just decide on the random chance per X distance, and go. If we're simulating actual random creatures that roam around the area, then there's no reason why "I encountered a pack of wolves in the last hex, so my odds of encountering a bugbear is lower now". I mean, I guess we could argue that these random creatures all keep their distance from eachother, so that if you just ran into something, it's unlikely that anything else dangerous is nearby? Maybe? I guess that works. Kinda. But also doesn't really explain the "haven't run into a random encounter for X hexes, so I'm guaranteed to encounter one in this hex" bit.

Eh. Let me caveat this with my stock "I really don't like or use recommended encounters/day" bit. But, I guess I'd just... wing it? If I've decided that I want to have some minimum number of encounters on the journey, but also some maximum, I'll just do that. I guess I've just never felt the need to roll random encounters (and maybe my players just trust that I'm not going to overwhelm them just cause I feel like it). When my players are traveling, I do the same as the OP. I will create a set of "random encounters". But then I just kinda toss them in when I feel like there's room for them. I don't roll dice for this. Just more of a "this seems like a good place for a pack of wolves to show up". Or "we've got X time left for the evening, and I don't want to get into detailing the destination at the tail end of the game session, so I'll drop in an encounter that will fit the time we have".

I'm also personally of the opinion that trying to toss in random encounters in an outdoor environment to meet the D&D style recommended encounter requirements is just frankly absurd. The sheer number of dangerous and aggressive things you'd have to stumble upon is so high that, setting ecological problems aside, and statistical probability as well (seriously, you're unlucky if you run into one dangerous thing a week while traveling through the wilderness, so several a day is just silly), it would make it impossible for any "normal" level society to exist at all in these settings (how the heck do regular people get their goods to town/market?). Which leaves these sorts of encounters to areas that are extremely remote and dangerous (cause, duh). But then why not just decide what's there? To me, that's more like crafting a dungeon environment. If I put a map out, of the "plains of despair, where many try to cross, but none have returned' (or something similarly ominous), I'm going to put things in different locations on my map, and then depending on what route the party takes, I'm going to have them encounter different things (which promotes player agency). And yeah, if I do have some sort of creatures that could be randomlly encountered anywhere in the area, I stick to a flat random chance. Why add extra complexity?

That's just me though. Heck. 90% of the time, if I'm rolling dice as the GM, and then launching into an encounter, the dice were just props. I already decided what was going to happen, and when, and why. I'm just rolling dice for the sake of having something to do with my hands or something (and maybe to keep my players on their toes, so they don't know what prompted the encounter). But yeah. That's how I roll (ba dum bum!).

J-H
2023-08-18, 07:49 PM
I'm also personally of the opinion that trying to toss in random encounters in an outdoor environment to meet the D&D style recommended encounter requirements is just frankly absurd. The sheer number of dangerous and aggressive things you'd have to stumble upon is so high that, setting ecological problems aside, and statistical probability as well (seriously, you're unlucky if you run into one dangerous thing a week while traveling through the wilderness, so several a day is just silly), it would make it impossible for any "normal" level society to exist at all in these settings (how the heck do regular people get their goods to town/market?). Which leaves these sorts of encounters to areas that are extremely remote and dangerous (cause, duh).
If you grew up in the 80s or 90s, did you ever play Castlevania II? Dracula curses the land and the forests become full of monsters, zombies roam the towns at night, and the protagonist has to travel through dangerous wildernesses to recover parts of Dracula so he can be raised and re-killed.
That's what I'm turning into a campaign.


But then why not just decide what's there?
I like surprises and variability as a DM, and I don't want to have to have the written instructions be "eyeball when your players need an encounter." The dice are unpredictable and neutral, and thus "fair." It also means all I have to do is write up my escalating encounter table instead of specifying exactly when and where everything is.

Because of Dracula's curse, long resting outside of temples/churches is not reliable. I do have some things in place to mitigate that.