"Help with a dice math formula?" Topic
15 Posts
All members in good standing are free to post here. Opinions expressed here are solely those of the posters, and have not been cleared with nor are they endorsed by The Miniatures Page.
Please do not use bad language on the forums.
For more information, see the TMP FAQ.
Back to the Game Design Message Board
Areas of InterestGeneral
Featured Hobby News Article
Featured Recent Link
Featured Ruleset Rating:
Featured Showcase ArticleIt's probably too late already this season to snatch these bargains up...
Featured Workbench Article
Featured Profile ArticleWargame groundcloths as seen at Bayou Wars.
Current Poll
|
R Strickland | 19 Jun 2017 5:33 p.m. PST |
I'm working on a game design with a resolution mechanic built atop a complicated table and I'm looking for some help with a polynomial dice math formula to build the table with. It's a bit of an out-there idea but I can't shake it, so I would like to follow it at least a bit further. The first part is to find the general formula that answers this particular question. I just pulled the numbers out of air, the numbers could be anything. If 500 soldiers are firing on the enemy and each has a 30% chance to inflict one casualty, what is the chance that at least 35% will succeed? Once I have the formula the next part will be translating it into a spreadsheet formula. Here's a sample portion of the table. The formula in each cell will take inputs from column b and c values, and row 3 values. link To be clear, the table itself is not part of the game, but rather the table will be used to build other tables that will be part of the game. Does anyone here know their polynomial equations really well? I feel I could have done this in high school or college and in brushing up on math sites online I started to get somewhere but it's something of a slog I feel a wiz at this stuff could help me cut through. I did find a tool online called the Troll that can generate small portions of the table results at a time but it would take dozens of hours to fill it out at that rate and I really need a programatic table. I used this to generate the sample values in the google sheet above. topps.diku.dk/torbenm/troll.msp If you know of a better forum to ask I'd also appreciate any pointers. I tried Quora but didn't get a reply. |
seldonH | 19 Jun 2017 7:46 p.m. PST |
but the number of soldiers in your table is always large and in that case you can use normal for binomial without having to worry with the binomial equation, which is not that tough, but why not use nromal which is easy on your spreadsheet. use a normal with mean = number of soldiers x hit probability and variance = number of soldiers x hit probability x ( 1 – hit probability ) now you can use your spreadsheet normal distrib to get the answer helps ? link. link |
Wolfhag | 19 Jun 2017 8:20 p.m. PST |
Here is another one: link Wolfhag |
dddd99 | 19 Jun 2017 8:22 p.m. PST |
500 soldiers. Each one acts as in independent trial, thus 500 trials. This is given by the binomial distribution which is what is the probability of x successes in n trials. 35% of 500 is 175. So you're asking what is the probability that at least 175 will succeed, that is the probability that 175 succeeds plus the probability that 176 succeeds plus 177 succeeds etc etc. The probability, P, that 175 will succeed is P = ((500!)/(175!(500-175)!))*((0.30)^175)*(1-0.30)^(500-175). The 0.30 is for that each individual trial has 30% chance of success. You then need to calculate the probability that 176 will succeed, which is: P = ((500!)/(176!(500-176)!))*((0.30)^176)*(1-0.30)^(500-176). all the way until 500 succeed and sum all such probabilities to gain the answer. Maybe Excel has binomial distribution formula to simplify and speed up your calculations. Edit: Wolfhag's link is what you need. |
Stryderg | 19 Jun 2017 8:55 p.m. PST |
I went about it a different way: created a spreadsheet with SOLDIERS = 500, HIT% = 30 500 * 30% = 150 (so 500 soldiers at 30% efficiency could inflict 150 hits) Question is: how each time the 500 fire, what is the chance that they will inflict over 175 hits (that's 500 *35%)? Filled vertical columns with 1-500, one for each soldier, next column is a random number from 1-100, next column is an IF statement: if that random number is <= 30, then 1, else 0. At the top of the column of IF statements is another test: IF(sum(all the 0's and 1's) > 175, then 1, else 0). I copy/pasted the 3 columns 100 times. Now sum those top statements and start pressing F9 to recalculate. I get roughly 13 out of 1000 times that the soldiers fire. Google Sheet here: link EDIT: Well, yeah, if you want to use actual math, then sure, use what the guys above recommend. And that just proves that I'm not a mathematician, I just play one on the internet. |
TheDesertBox | 19 Jun 2017 9:34 p.m. PST |
If you are using excel, the formula is =BINOM.DIST() If you can't figure out the inputs, F1 and search or google and search, |
R Strickland | 19 Jun 2017 11:11 p.m. PST |
Wow, thank you all, each one of your answers is very helpful, I really appreciate it! To start with I think the binomial distribution formula hits square on the nose for filling out my sheet. Thanks TheDesertBox. There's a google equivalent, BINOMDIST. Same link as before, now filled out: link I left in the column I had partially filled out using the online generator--it's the one in green. The numbers aren't exactly the same, which gives me a small doubt, but they are so close I'm tempted to think either I was slightly off in my use of the Troll tool before, or the tool itself was off. This should let me continue with my design idea, and I'll share more if it bears fruit. seldonH and Wolfhag, the reference material is really helpful, I have my homework cut out for me digesting the material. I'm sure as I go forward a stronger understanding of the concepts and their applications is going to be key. What's clear is that as you start talking about groups of soldiers in the hundreds, it's not just that the results become predictable, they are so rigid that even a deviation of few percentage points from the average becomes practically impossible. In a wargame, no matter how many are fighting, the random factor is enormous. More importantly, though, the trend is to reduce the granularity of the combat modifiers, and many games simply discount modifiers above a certain level. Field of Glory, for one. But I believe granularity is the key. I believe troops should be very finely differentiated based on intrinsic and circumstantial factors. The "work" to resolve a melee should not be rolling dice, but angling for advantage, matching the right troops, and finely calculating the probability of success for a single solder. Then a math based table can tell you the very narrow band of possible results. I got on this line of reasoning after reading about the battle of Dupplin Moor in Clifford Rogers' War, Cruel and Sharp. How did the English stand against that many Scots? There must be a range of small factors that add to make the chances of a Scot successfully wounding very low (33 causalities). We could name some of them. But it wasn't by chance that the English won because the odds are categorically impossible that it was by chance, as the math shows. Rather, I think the result is predictable, again, as it must be, if you know the factors, and you'd get the same result given the same factors. The-pie-in-the sky game I want to play will give you the same predicable result when running those Scots against those English on that day 9 times out of 10. |
Jlundberg | 20 Jun 2017 3:50 a.m. PST |
If warfare was statistical and purely probabilistic, we would celebrate the great victories of George MacClellan and the Austrians and Prussians who defeated the upstart French Revolutionaries. There is certainly luck involved, sometimes the luck rests with the morale effect of a bold move. A quick read of Dupplin Moor yields a combination of over confidence – not putting out sentries that could detect a river crossing, internal dissension with two senior leaders doubting each other then rushing to be first into combat- which produced a piecemeal uncoordinated attack. It also showed the morale effects of withering fire when the attacks funneled into the center to avoid the arrow storm. A coordinated attack across the continuous front should have been successful. The weight of numbers is somewhat countered by the narrow valley the defenders held. Some rules make it relatively simple to replicate results. Hail Caesar, for instance, you might give the Scots poor commanders, making it hard to bring their forces to bear in a coordinated way, then give troop characteristics to the sides that emphasize the way they performed. The archers might be particularly good and Scots armor negligible. Another example of an outnumbered defender that is way more successful than they "should" have been in Rorkes' Drift. In most any Colonial Rule set it will be very hard to replicate the results – you have to take into account that the Zulus have just taken fearsome casualties at Isandlwana and the objective is not that important |
thehawk | 20 Jun 2017 3:58 a.m. PST |
In Excel when charting and fitting a line to a series of points, the equation of the fitted line is shown. The Open Office spreadsheet application might have a similar facility. As a separate issue, calculating hits is not a simple binomial distribution as there are other dependencies such as volley timing, target size, target spacing and number of ranks. And multiple hits could be inflicted on a single person. The modern method of determining outcomes of chaotic events is to model the rules that govern the behaviour of each participant, group and leader individually. Some findings are that small changes in the situation can have a large impact on the final outcome. The "when" a response is made can be important. Outcomes can be more random than that which probability models would generate. Wargames often neglect the group of individuals e.g. their personality and rules that govern relationship behaviour. There is a good reason why civil protests often "rent-a-mob". In wargames the usual approach is to look at a unit as a whole. So events like a small break in a line being exploited by the enemy is never considered. Or the rate at which casualties are received. |
Wolfhag | 20 Jun 2017 6:42 a.m. PST |
I use a set of pre-printed binomial tables I modified to determine casualties from small arms fire. I'm not using a spreadsheet. First I determine the causality rate based on firepower, defense, troop quality, etc. Then rolling 2D10 (1-100 result) on the table with the number of targets I get how many are affected. I can use a rate of 1% to 99% and up to 12 targets (squad sized WWII game). Wolfhag |
rmaker | 20 Jun 2017 8:16 a.m. PST |
Just to throw another monkey wrench into the works, you are making the (false) assumption that every hit is on a different target. An easy way to estimate the number of discrete targets hit is: (Hits * Targets) / (Hits + Targets) So if you have 150 Hits spread across 500 targets, you would have 115 (and a fraction) actual casualties. |
emckinney | 20 Jun 2017 10:23 a.m. PST |
"you are making the (false) assumption that every hit is on a different target" If hand-to-hand, it's likely accurate. If shooting on a fairly large battlefield, not all attackers will be able to target all defenders, which makes a quick mess of the calculations: some attackers may be forced to double-up on targets, resulting in overkills, while some targets may not be engaged. The Lanchester Law has very specific and stringent rules for applicability. It's also almost certainly wrong in all but a very, very narrow range of circumstances. For example, outcomes are ridiculously sensitive to changes in the numerical ratio between the two sides, with small increases resulting in ever-changing victories with vanishingly small losses for the winner. |
emckinney | 20 Jun 2017 10:25 a.m. PST |
There's significant evidence that modern combat (WWI and forward) is remarkably insensitive to the attacker:defender ratio, attacker density, and even defender density. The scatter plots look like someone just the a handful of sand at the page. |
R Strickland | 21 Jun 2017 10:41 p.m. PST |
Great discussion and suggestions. Having a few late work nights this week and may be the weekend before I have time to read through carefully or take the next step with the table. @Wolfhag: sounds excellent a lot like what I'm thinking. Do you have your rules online or are they sharable? |
Wolfhag | 22 Jun 2017 10:55 a.m. PST |
Strickland, Here is a link to the tables I'm using. They are printed on two sides of a sheet of paper. link I've slightly modified these from some scientific tables that had results out to three decimal places. To use them determine the causality % from your firepower/defense rules. In the left-hand column locate the number of possible targets. Then go across to the column for the causality %. Roll a D100 to get the results. Binomial tables are supposed to simulate multiple die rolls against a set outcome. So with 9 targets at 15% rolling decimal dice, 9 times just roll it once. If you had 20 targets roll on the 10 target row twice so it can handle any number or targets. I'm not a mathematician or statistics analyst but these do work very well in games and eliminate a lot of die rolling or rolling the buckets of dice. emckinney brings up some great points when determining "hits". I'm not sure it would influence causality percentages. It really comes in handy in larger games with artillery. When a prep barrage lifts each turn defender teams/squads are checked to see if they recover from the effects of the barrage suppression. When they do we then check the number of causalities at that time. If you want to generate some funky results, FoW or SNAFU's whenever a double is rolled you can check for jammed weapons, reloading, leaders hit, morale checks, etc. Enjoy, Wolfhag |
|