|
Post by thealmightymudworm on Mar 21, 2014 18:48:01 GMT
From TUFFF (August 2011)...
|
|
|
Post by thealmightymudworm on Mar 21, 2014 18:50:15 GMT
From TUFFF (after some teething troubles)... ...if you're interested in how it works...well that second page calculates the probability of winning one attack round based only on SKILL levels. And the third page (labelled "sheet 1") calculates the probability of winning the battle taking into account STAMINA. It uses the binomial distribution (used to calculate the probability of N successes from M trials, with probability of success P.) In this case N is number of hits its takes to kill your enemy, M is max number of attack rounds (that don't end in a draw) that the battle can last, and P is the probability of winning an attack round. The chance of winning is equal to the probability of winning N or more attack rounds out of a maximum of M rounds. (The only reason I have knowledge of the binomial distribution is that I studied statistics at university!) I had a model that calculated probabilities for multiple monsters, but I wasn't convinced it worked properly, so I left it out.
|
|
|
Post by thealmightymudworm on Mar 21, 2014 18:52:20 GMT
From TUFFF... Thank you for this calculator, Jamus. I like this - now you can find out if your combats are fair. The probabilities are very interesting. If my opponent and I both have a stamina of 14, then you have a 50% chance of winning if your skills are the same. If your skill is 1 lower, then the probability is reduced to 17.78%. If your skill is 2 lower, the probability becomes 3.29%. If my opponent and I both have the same skill and my stamina is 14, then I have a 61.28% of winning if my opponent's stamina is 12 and 72.56% of winning when their stamina is 10. A seemingly small change has a huge effect on combat probability in Fighting Fantasy.
It works for me, but I cannot download it in its active form (you may have intended that people don't download it)
|
|
|
Post by thealmightymudworm on Mar 21, 2014 18:53:26 GMT
From TUFFF... OK. Finally cracked it. Two Words
|
|
|
Post by thealmightymudworm on Mar 21, 2014 18:55:40 GMT
From TUFFF... Thank you for this calculator, Jamus. I like this - now you can find out if your combats are fair.
The probabilities are very interesting. If my opponent and I both have a stamina of 14, then you have a 50% chance of winning if your skills are the same. If your skill is 1 lower, then the probability is reduced to 17.78%. If your skill is 2 lower, the probability becomes 3.29%.
If my opponent and I both have the same skill and my stamina is 14, then I have a 61.28% of winning if my opponent's stamina is 12 and 72.56% of winning when their stamina is 10.
A seemingly small change has a huge effect on combat probability in Fighting Fantasy.
It works for me, but I cannot download it in its active form (you may have intended that people don't download it) Thanks slloyd, you make a good point about the huge impact of a small change in stats. I find it fascinating that some ff authors could think up and write these great encounters and adventures but would then neglect the aspect of balancing the combats and dice rolls so that the player has a good chance of finishing the adventure. Maybe part of it was because they didn't have time to playtest their books, being so focussed on trying to finish writing all the references before the deadline. I have no problem with people downloading it - I'm just not sure how to make it available to download. Is there a way to add an attachment? Also, Sylas, how did you fix the problem?
|
|
|
Post by thealmightymudworm on Mar 21, 2014 18:57:47 GMT
From TUFFF... I'm not entirely sure, jamus. The calculator required some kind of pop-up, and I had mine set on Block Fidgeted with something else next and, VOILA! Accidents do happen and aren't always bad.
Also, in straight battle it is pretty accurate, but it doesn't factor in your special power of LUCK. Obviously a low LUCK score won't be used often, but having a score of 10 or more can turn a battle in your favour despite a minor SKILL disadvantage. Two Words
|
|
|
Post by thealmightymudworm on Mar 21, 2014 18:58:31 GMT
From TUFFF (April 2012)... Quite fun instrument this Probability Calculator, amazing congratulations jamus, I wonder how it would do with more than one opponent
|
|
|
Post by thealmightymudworm on Mar 21, 2014 18:59:35 GMT
From TUFFF (Oct 2012)... Ouch, I'm sorry to say that your calculation of win/draw/loss (or just win/loss) for each round of combat appears to be incorrect. Send me an e-mail alsander400(at)yahoo(dot)com and I will send through an excel speadsheet showing a table of all possible combinations and their weightings. This spreadsheet calculates a %win/loss per round and the final % win/loss per battle. Your method makes the effect of any changes larger than it already is.
|
|
|
Post by thealmightymudworm on Mar 21, 2014 19:00:28 GMT
From TUFFF (Nov 2012)... Hi Alsander, thanks for your post. Looking back at the revision history, I see that someone (on the 26 July) has changed some crucial numbers in the second sheet, which has stuffed up the calculations. The column 'Probability of rolling this Attack Strength' was changed so that numbers 1 - 6 had a 1/6 chance of being rolled, and 8 - 12 had a 0% chance of being rolled - which makes no sense when you are rolling two die to determine your attack strength. Anyway that is what was stuffing up the calculations. I have fixed it up now. Cool, glad you like it Offm
|
|
|
Post by thealmightymudworm on Mar 21, 2014 19:01:23 GMT
From TUFFF... I've checked your totals against mine in a number of different scenarios and they now match perfectly. As both my probability calculator and yours were developed independently, it gives me a level of confidence that they are correct. Now I can start on the next step in my (mad) quest to work out the probability of successfully winning against Razaak in Crypt of the Sorcerer.
|
|
|
Post by nathanh on Mar 22, 2014 12:02:42 GMT
In case anyone is interested, I've written a probability calculator that works for single or multiple combats (using the roll-separately-for-each-opponent rules) and returns the probabilities of ending up on every possible final Stamina score, rather than just win probability. You can even feed this output into another combat to get the results of two successive combats, and so on.
I also have a function that calculates whether and how you should use Luck in a particular battle to optimize your win probability for that battle (you can manually lock the number of times it's allowed to use Luck if you want to preserve some Luck).
These aren't implemented in something nice like a spreadsheet though, they're implemented in R because that's what I use for my day job.
|
|
|
Post by deadshadowrunner on Mar 22, 2014 14:11:35 GMT
The luck one sounds interesting.
|
|
|
Post by drmanhattan on Jun 13, 2021 11:03:26 GMT
In case anyone is interested, I've written a probability calculator that works for single or multiple combats (using the roll-separately-for-each-opponent rules) and returns the probabilities of ending up on every possible final Stamina score, rather than just win probability. You can even feed this output into another combat to get the results of two successive combats, and so on. I also have a function that calculates whether and how you should use Luck in a particular battle to optimize your win probability for that battle (you can manually lock the number of times it's allowed to use Luck if you want to preserve some Luck). These aren't implemented in something nice like a spreadsheet though, they're implemented in R because that's what I use for my day job. I am interested! Is it on GitHub? what would be cool is then to divide up the results into an Nd6 single roll table so you’d get “dead” as one result and the others would be the different possible stamina losses (or use a % table for d100)
|
|
|
Post by nathanh on Jun 20, 2021 19:45:56 GMT
Sadly I just had it saved locally and I don't think I preserved it. I'll have a look through my FF folder to see if I salvaged anything. I don't remember exactly how I did it but it'd be one of two approaches: - A recursive function: e.g. if you and your foe have 4 stamina, and you have a 0.6 chance to strike the next hit and 0.4 chance to receive the next hit, then your probability of winning is 0.6 * (probability of winning in a 4 stamina vs 2 stamina fight) + 0.4 * (probability of winning in a 2 stamina vs 4 stamina fight). So define a function probWinFight(pHit, myStamina, theirStamina) as (0.6 * probWinFight(pHit, myStamina, theirStamina - 2) + 0.4 * probWinFight(pHit, myStamina - 2, theirStamina)) [with a special case where myStamina = 0 or theirStamina = 0 so that it eventually stops]. If you want to work out your distribution of ending stamina values, this would take more effort, but a positive side is that it's relatively easy to include luck: in each call you calculate a version where you don't use luck that round and a version where you do, and take whichever gives a higher probability.
- Observing that a combat is a Markov chain where each round you either move to the state where you stamina is 2 lower or your opponent's stamina is 2 lower (ignore draws--they get in the way), or you stay in the same state if one side is dead. The states in the Markov chain are the stamina pairs, so for the above example there are 8 states: 4 4, 4 2, 2 4, 2 2, 4 0, 0 4, 2 0, 0 2. Construct a transition matrix for these 8 states, observe there can be a maximum of 3 decisive rounds, so raise the transition matrix to the power 3. Advantage of this approach is that out-of-the-box it tells you the probability distribution of your ending stamina, and allows you to conveniently chain together multiple combats simply by multiplying the corresponding transition matrices. Disadvantage is that it will be much more demanding to work out how to use luck. I think this is the route I chose, but I have no memory of how I tackled the luck question.
|
|
|
Post by jamus on Apr 15, 2022 0:13:26 GMT
i like that you created this
|
|
|
Post by scouserob on Sept 26, 2022 11:38:03 GMT
I'm working on a solution probability calculator for Fighting Fantasy games. Mainly to help find the optimal path and probability of success through the books. The idea is to populate a 5 dimensional probability array with the starting state and then let the array evolve over fights, statistic gains/losses, provisions, etc. The five dimensions I have (so far) are: Skill, Stamina, Luck, Provisions, Flags. I've programmed up single fights so if anybody can check the probabilities that would be great. Here is the stamina probabilities after a fight against a Pool Beast of SK8 ST10 with initial starting stats. Are these right? And here are the probabilities after going into a Giant Spider SK9 ST6 fight straight after that Pool Beast: Again if anybody can check this I'd be grateful. Next up are the big nasties of including Luck strategies into battles and fighting multiple opponents simultaneously. If anyone is interested in hearing any further details then please let me know.
|
|
|
Post by scouserob on Sept 26, 2022 11:43:40 GMT
In case anybody is interested or can check these... Here is what I've programmed of the Scorpion Swamp 5 Amulet solution so far: Public Sub ScorpionSwamp() frmMain.Fight(7, 6) 'Goblin Statue frmMain.StaminaChange(30) frmMain.LuckChange(30) frmMain.Fight(8, 10) 'Pool Beast ScorpionSwampStaminaGem(3) frmMain.Lose1D6Stamina() 'Curse Gem frmMain.Fight(9, 6) 'Giant Spider ScorpionSwampStaminaGem(3) frmMain.Fight(6, 16) 'Crab Grass ScorpionSwampStaminaGem(3) frmMain.SkillChange(-1) frmMain.Fight(6, 7) '1st Swamp Orc frmMain.Fight(7, 7) '2nd Swamp Orc frmMain.Fight(6, 5) '3rd Swamp Orc ScorpionSwampStaminaGem(3) frmMain.Fight(11, 4) 'Unicorn ScorpionSwampStaminaGem(3) frmMain.LuckChange(-1) 'Search for Gems Luck Test frmMain.StaminaChange(3) 'Healing Pool ScorpionClearingLuckTest() 'First Visit to Scorpion Clearing ScorpionSwampStaminaGem(2) 'Climb Eagle Nest frmMain.Fight(5, 17) 'Slime ScorpionSwampStaminaGem(2) End SubThe stamina change of 30 is just overkill to force you back up to initial stamina after the fight. The StaminaGem(3) means use a stamina gem if your Stamina is less than or equal to 3 below the floor of half your stamina. The ClearingLuckTest incorporates both the luck test and potential stamina test in the Scorpion clearing. Here some results for this:
|
|
|
Post by scouserob on Sept 26, 2022 16:07:42 GMT
I've programmed up the multiple opponents subroutines now. (Well for two and three opponents but I can extend it easily in future.)Here are the probabilities for fighting the Swamp Orcs in Scorpion Swamp one at a time and all at once: Can anybody check them for me please? Now the big bad luck strategy in battles seems to be the only remaining big thing to implement. Then it'll be all the little individual logic problems of each book or strategy. Attachments:
|
|