Please do tell me my odds!

Moderator: Vic

Post Reply
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Please do tell me my odds!

Post by zgrssd »

When Rolling a [1D100 + something] vs a fixed Difficulty is easy to figure out what your chances are: Failure chance is [Difficulty] - [that something you add] in%

But a in a lot of cases, both sides are rolling dice. Most noteably, in combat both side roll 1D[Combat Strenght]. Now of course I could do it the hard way: 1D5 v 1D10 is only 50 possible roll combinations. But those can quickly get ridicilous once we have a 1D50 vs 1D100 - that is 5000 Combinations.

I think we need something a bit more usefull in practical calculations. And I fear this is something arround the Birtday Paradox in complexity. The chance that two random values match, is not the same as 1 Random value matching a specific value.
Does anybody have any usefull ideas here? Rules of Thumb?

With 1D50 vs 1D100, it could see it that there is a 50% chance to win for the 1D100 side, regardles what the other rolls. But beyond "somewhere above 50% I got no idea.
Thomas8
Posts: 46
Joined: Tue Jun 09, 2020 6:53 pm

RE: Please do tell me my chances!

Post by Thomas8 »

You can use: anydice . com

Example: You roll 1d100+30 vs 2d100+10 -> output (1d100+30) - (2d100+10) and change representation to 'at most'. You see that there is 72.62% of this rolling below 0 (so computer chance winning) - that means you have around 28% chance to suceed. Since 50 is critical failure - you have 36% of rolling critical failure and 4.5% to roll critical success.

But yes it would be good if those value were present on each stratagem and decision. So we wouldnt need external tools to calculate it.
User avatar
Malevolence
Posts: 1798
Joined: Sat Apr 03, 2010 11:12 am

RE: Please do tell me my chances!

Post by Malevolence »

Indeed; anydice is a superb tool. Bookmarked for all games.
Nicht kleckern, sondern klotzen!

*Please remember all posts are made by a malevolent, autocratic despot whose rule is marked by unjust severity and arbitrary behavior. Your experiences may vary.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

RE: Please do tell me my chances!

Post by zgrssd »

I would be happy to have a simple thing I can do just looking at combat values (no bonuses, just 2 rolls).

1D50 vs 1D100. 50% of the results are a victory for the D100, no mater what the D50 rolls - it just can not beat 51-100.
But what are the chances for the remaining 50% of results?
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

RE: Please do tell me my chances!

Post by zgrssd »

ORIGINAL: zgrssd

I would be happy to have a simple thing I can do just looking at combat values (no bonuses, just 2 rolls).

1D50 vs 1D100. 50% of the results are a victory for the D100, no mater what the D50 rolls - it just can not beat 51-100.
But what are the chances for the remaining 50% of results?
If it was D50 vs D50, I would expect the chances to fall 50/50.

Maybe we could reduce it, by only looking at the bigger die?

There are 100 possible values on the D100:
50 automaitcally win, regardless what the D50 says.
Of the remaining rolls, on average it should be 25 Rolls that win for the D100, 25 that win for the D50.
50+25 = 75
75/100 = 75%
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

RE: Please do tell me my chances!

Post by zgrssd »

Originally the question came up, because I wanted to know how a avearage buggy (100 on each design roll) would fare against Arachnids.

Arachnid:
200/100 soft
50/25 hard
200 HP
soft target

Buggy:
100/200 Soft
50/50 Hard
100/150 HP
hard target

If the Strategic Attacker is the buggy:
Buggy rolls 100 vs 200
Arachnid rolles 25 vs 100

For buggy:
200 possible results.
100 win instantly for Buggy
50 win for Buggy
50 win for Arachnid
150/200 = 75% chance of a dead Arachnid

For Arachnid:
75 Result have the buggy survive automatically.
12.5 Results, the Buggy survives
12.5 Results, the Buggy dies
(75+12.5)/100 =87.5% failure, 12.5% of a dead Buggy

I think I am not properly accounting for ties, but beyond that it should be a reasonlable formula. More Newtons Theory of Gravity, the Einsteins.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

RE: Please do tell me my chances!

Post by zgrssd »

Small corrections:
- Rolls are 0 to attack value. So, 1 more value both sides.
- with a tie, it goes to the defender in this particular attack roll. In practice that is one combination (0,0) only the defender can win.

Let us see if I can not get some code together for this?

Code: Select all

 int AttackWins = 0;
 int CombinationsTried = 0;
 
 for(int AttackerRoll = 0; AttackerRoll <= AttackerScore; AttackerRoll++){
   for(int DefenderRoll = 0; DefenderRoll <= DefenderScore; DefenderRoll++){
     //Actuall part
     if(AttackerRoll > DefenderRoll){
       AttackWins++;
     }
     CombinationsTried++;
   }
 }
 
 //Try to figure out what AttackWins / CombinationsTried makes to get the odds for the attacker. Defender odds are the inverse of that.
 

I am pretty sure that should work. But I got no compiler around ot test it.
User avatar
Tchey
Posts: 88
Joined: Wed Jun 17, 2020 5:02 am
Contact:

RE: Please do tell me my chances!

Post by Tchey »

Anydice is fine, but ingame info is (almost) always better.
* Jeux1d100 ? Le blog Jeux1d100.net sur les jeux indécents et Linux, et la chaîne YouTube *
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

RE: Please do tell me my chances!

Post by zgrssd »

With my above code in a online compiler and a 200 vs 100, I got:
20301 Combinations Tried
15150 Attacker Wins
74.62% for Attacker Hitting. Wich is pretty c lose to my prediction of 75%.

With 100vs100 I get:
10201 Combinations
5050 Attacker Victories
49.50% Attack Victory.

So the tiebreaker seems to be causing a slight discrepancy in favor of the defender, but only like 0.5% when at 100. At 10v10 (55/121) it is 5%, so it seems to easily scale.
I also definitely got a "off by one" error. Just need to figure out where that one is. But then that is to be expected when coding any loop. Ever.

Edit: Apparently not a off-by-one error at all. Values of 200 after all have 201 possible combinations.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

RE: Please do tell me my chances!

Post by zgrssd »

This is the final code I ended up with:

Code: Select all

using System;
 					
 public class Program
 {
 	public static void Main()
 	{
 		int AttackerScore = 200;
                 int DefenderScore = 100;
 		int AttackWins = 0;
 		int CombinationsTried = 0;
 
 		for(int AttackerRoll = 0; AttackerRoll <= AttackerScore; AttackerRoll++){
 		  for(int DefenderRoll = 0; DefenderRoll <= DefenderScore; DefenderRoll++){
 			//Actuall part
 			if(AttackerRoll > DefenderRoll){
 			  AttackWins++;
 			}
 			CombinationsTried++;
 			//Console.WriteLine("{0} {1} {2}", CombinationsTried, AttackerRoll, DefenderRoll);
 		  }
 		}
 
 		Console.WriteLine(CombinationsTried);
 		Console.WriteLine(AttackWins);
 		//Try to figure out what AttackWins / CombinationsTried makes to get the odds for the attacker. Defender odds are the inverse of that.
 	}
 }

Output:
20301
15150
Post Reply

Return to “War Room”