Dice Pool Probability Calculator/Aggregator for TROS-Like games
-
- Recruit
- Posts: 12
- Joined: 31 Jul 2016, 03:21
Dice Pool Probability Calculator/Aggregator for TROS-Like games
For any TROS-like games using Dice pools and TNs, here's a quick JS /html webpage I did up to help determine probability of successes (both discrete and total) when dealing with both contested/uncontested rolls. It has all the individual roll stats to help Great for gamemasters/players/developers, etc. Also, it can act as a useful shortcut in rolling with a single Math.random() against an aggregated floating point ratio/percentage probability instead of counting each successful dice individually. Enjoy!
http://glidias.github.io/Asharena/demos ... ility.html
http://glidias.github.io/Asharena/demos ... ility.html
- higgins
- Heresiarch
- Posts: 1190
- Joined: 05 Jan 2013, 08:00
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
Oh, this is really nice! I've been using an ancient excel spreadsheet, but it doesn't tell you anything about opposed rolls. This one definitely does.
"You can never have too many knives."
- Logen Ninefingers, The Blade Itself
- Logen Ninefingers, The Blade Itself
- thirtythr33
- Editorial Inquisition
- Posts: 1266
- Joined: 12 Aug 2015, 03:23
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
I have this spreadsheet I made to do the same thing.
https://www.dropbox.com/s/20b11zxy902g3 ... .xlsx?dl=0
Mine can also handle flat Obs for either party as well, and I've been trying to figure out how to do exploding dice.
https://www.dropbox.com/s/20b11zxy902g3 ... .xlsx?dl=0
Mine can also handle flat Obs for either party as well, and I've been trying to figure out how to do exploding dice.
"O happy dagger!
This is thy sheath; there rust, and let me die."
- Juliet Capulet
This is thy sheath; there rust, and let me die."
- Juliet Capulet
- higgins
- Heresiarch
- Posts: 1190
- Joined: 05 Jan 2013, 08:00
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
Exploding dice are always the stuff of nightmares for any kind of probability charts.
"You can never have too many knives."
- Logen Ninefingers, The Blade Itself
- Logen Ninefingers, The Blade Itself
-
- Recruit
- Posts: 12
- Joined: 31 Jul 2016, 03:21
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
To get average Mean Margin of Favor (favoring which side), you can calculate it quickly using:
( (Chance to succeed at BS>=1) + (Chance to succeed at BS>=0)) /2.
So, a value of 50% favors neither side. (even though this may favor a particular side in certain actual game contexts.)
Would probably add that as well into the calculator. But strategically, most characters would want to adopt the necessary dice to deal a positively safe/ideal BS (bonus success/margin of success), depending on what the character is trying to achieve.
Also (slightly) useful to add would be Chance for Tie Occuring:
= (Chance to succeed at BS>=1) - (Chance to succeed at BS>=0).
Had to setup a calculator like this to help in developing an AI bot for TROS/TROSLikes.
Regarding TROS/TROSlikes, I thought exploding dice is only used conditionally when rolling against TNs greater than 10 in order to stack over it's current value ? Ie. If i roll a 10, i won't get an extra dice to roll, i just re-roll back the same dice (only if necessary) to stack an additional value over it existing tenth in the hope of meeting the necessary TN for that dice. Thus, to get the probability of a single dice roll's success given a TN, it is simply a 0(1) method that can be used.
I haven't really validated this fully to see it's entirely true, but I did some tests particularly for TNs greater than 10, 20+s, 30s, etc. and the results are correct.
( (Chance to succeed at BS>=1) + (Chance to succeed at BS>=0)) /2.
So, a value of 50% favors neither side. (even though this may favor a particular side in certain actual game contexts.)
Would probably add that as well into the calculator. But strategically, most characters would want to adopt the necessary dice to deal a positively safe/ideal BS (bonus success/margin of success), depending on what the character is trying to achieve.
Also (slightly) useful to add would be Chance for Tie Occuring:
= (Chance to succeed at BS>=1) - (Chance to succeed at BS>=0).
Had to setup a calculator like this to help in developing an AI bot for TROS/TROSLikes.
Regarding TROS/TROSlikes, I thought exploding dice is only used conditionally when rolling against TNs greater than 10 in order to stack over it's current value ? Ie. If i roll a 10, i won't get an extra dice to roll, i just re-roll back the same dice (only if necessary) to stack an additional value over it existing tenth in the hope of meeting the necessary TN for that dice. Thus, to get the probability of a single dice roll's success given a TN, it is simply a 0(1) method that can be used.
Code: Select all
public static inline function getTNSuccessProbForDie(tn:Int):Float {
return tn < 11 ? (10-tn+1) / 10 : ( 1- ( tn - Math.floor((tn)/10)*10 ) / 10 ) * Math.pow(0.1, Math.floor(tn/10) );
}
- thirtythr33
- Editorial Inquisition
- Posts: 1266
- Joined: 12 Aug 2015, 03:23
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
In BoB ties always go to the attacker and every dice explodes (by allowing you to roll another dice and add it to the pool. TN doesn't go over 10 in BoB).
"O happy dagger!
This is thy sheath; there rust, and let me die."
- Juliet Capulet
This is thy sheath; there rust, and let me die."
- Juliet Capulet
-
- Recruit
- Posts: 12
- Joined: 31 Jul 2016, 03:21
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
Currently working on a AI bot calculator to help detect "favorable/sensible" manuevers/combos that are possible to use against given opponent.
http://glidias.github.io/Asharena/demos ... itest.html
Above is a test-bed to test-execute static functions remotely. Usually the last 3 functions on the leftmost column are key for the AI to help detect possible "favorable/sensible-enough" moves. If AI is severely disadvantage in CP and does not have any good openings, a null /false value is return. (would likely have to stick to a "desperate" manuever fallback option)
What's left? Still need to add in stuff like armor/target-zone consideration (aim at weakest spot) and some of the remaining combos like whether it's good to steal initiative or not (and some of the other mixed/double attack combos.., and when it's possible to switch to a Rota/Counter, or when to use Block Open and strike when dealing with weak strikes (besides the current typical defensive Disarm manuever) ).
On the right column, if you scroll down to bottom, a static variable B_BS_REQUIRED_DMG can be adjusted to simulate armor value barrier. When up against armored opponents with a >1BS required to deal damage, AI may switch to beat/bind-and-strike manuevers (instead of regular damaging attack manuevers) to lower the opponent CP pool first, if it deems unable to penetrate through armor of opponent yet. It will determine at what point it's "reasonable" enough to try an Alpha Strike or Coup-de-grace killing blow manuever with the entire dice pool being used as well, or whether a CP-budgeted damaging strike is viable enough.
Remember to include equipments for both characters prior to testing the static functions.
Of course, the actual AI will have to predictively determine all these combos' avaialbility at the start of every round, and whether he should approach the battle with an offensive/defensive intent together with any related stance bonuses, etc. in order to best maximise his overall strategy. Currently, there is no avenue put in place to "bluff" the AI with regards to your revealed combat pool, but that can be added later once the core static methods are up.
http://glidias.github.io/Asharena/demos ... itest.html
Above is a test-bed to test-execute static functions remotely. Usually the last 3 functions on the leftmost column are key for the AI to help detect possible "favorable/sensible-enough" moves. If AI is severely disadvantage in CP and does not have any good openings, a null /false value is return. (would likely have to stick to a "desperate" manuever fallback option)
What's left? Still need to add in stuff like armor/target-zone consideration (aim at weakest spot) and some of the remaining combos like whether it's good to steal initiative or not (and some of the other mixed/double attack combos.., and when it's possible to switch to a Rota/Counter, or when to use Block Open and strike when dealing with weak strikes (besides the current typical defensive Disarm manuever) ).
On the right column, if you scroll down to bottom, a static variable B_BS_REQUIRED_DMG can be adjusted to simulate armor value barrier. When up against armored opponents with a >1BS required to deal damage, AI may switch to beat/bind-and-strike manuevers (instead of regular damaging attack manuevers) to lower the opponent CP pool first, if it deems unable to penetrate through armor of opponent yet. It will determine at what point it's "reasonable" enough to try an Alpha Strike or Coup-de-grace killing blow manuever with the entire dice pool being used as well, or whether a CP-budgeted damaging strike is viable enough.
Remember to include equipments for both characters prior to testing the static functions.
Of course, the actual AI will have to predictively determine all these combos' avaialbility at the start of every round, and whether he should approach the battle with an offensive/defensive intent together with any related stance bonuses, etc. in order to best maximise his overall strategy. Currently, there is no avenue put in place to "bluff" the AI with regards to your revealed combat pool, but that can be added later once the core static methods are up.
Last edited by Glidias on 22 Aug 2016, 23:14, edited 3 times in total.
- higgins
- Heresiarch
- Posts: 1190
- Joined: 05 Jan 2013, 08:00
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
Glidias wrote:positively safe/ideal BS
This is completely offtopic and feel free to call me immature, but I simply have to wonder whether making these abbreviations funny was a conscious choice on the designers' part.Glidias wrote:Chance to succeed at BS
"You can never have too many knives."
- Logen Ninefingers, The Blade Itself
- Logen Ninefingers, The Blade Itself
-
- Recruit
- Posts: 12
- Joined: 31 Jul 2016, 03:21
Re: Dice Pool Probability Calculator/Aggregator for TROS-Like games
lol, Song of swords..blame it on it... MS, MOS, ....