Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Please do tell me my odds!

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Shadow Empire >> War Room >> Please do tell me my odds! Page: [1]
Login
Message << Older Topic   Newer Topic >>
Please do tell me my odds! - 6/19/2020 7:23:58 PM   
zgrssd

 

Posts: 1492
Joined: 6/9/2020
Status: offline
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.

< Message edited by zgrssd -- 6/20/2020 12:52:48 AM >
Post #: 1
RE: Please do tell me my chances! - 6/19/2020 8:18:00 PM   
Thomas8

 

Posts: 35
Joined: 6/9/2020
Status: offline
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.

(in reply to zgrssd)
Post #: 2
RE: Please do tell me my chances! - 6/19/2020 8:57:00 PM   
Malevolence


Posts: 1764
Joined: 4/3/2010
Status: offline
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.

(in reply to Thomas8)
Post #: 3
RE: Please do tell me my chances! - 6/19/2020 10:27:11 PM   
zgrssd

 

Posts: 1492
Joined: 6/9/2020
Status: offline
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?

< Message edited by zgrssd -- 6/19/2020 10:29:59 PM >

(in reply to Malevolence)
Post #: 4
RE: Please do tell me my chances! - 6/19/2020 11:12:28 PM   
zgrssd

 

Posts: 1492
Joined: 6/9/2020
Status: offline

quote:

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%

(in reply to zgrssd)
Post #: 5
RE: Please do tell me my chances! - 6/19/2020 11:21:18 PM   
zgrssd

 

Posts: 1492
Joined: 6/9/2020
Status: offline
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.

(in reply to zgrssd)
Post #: 6
RE: Please do tell me my chances! - 6/20/2020 12:51:15 AM   
zgrssd

 

Posts: 1492
Joined: 6/9/2020
Status: offline
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?

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.

(in reply to zgrssd)
Post #: 7
RE: Please do tell me my chances! - 6/20/2020 8:42:10 AM   
Tchey


Posts: 59
Joined: 6/17/2020
Status: offline
Anydice is fine, but ingame info is (almost) always better.

(in reply to zgrssd)
Post #: 8
RE: Please do tell me my chances! - 6/20/2020 11:54:19 AM   
zgrssd

 

Posts: 1492
Joined: 6/9/2020
Status: offline
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.

< Message edited by zgrssd -- 6/20/2020 11:59:20 AM >

(in reply to Tchey)
Post #: 9
RE: Please do tell me my chances! - 6/20/2020 12:19:41 PM   
zgrssd

 

Posts: 1492
Joined: 6/9/2020
Status: offline
This is the final code I ended up with:
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

(in reply to zgrssd)
Post #: 10
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Shadow Empire >> War Room >> Please do tell me my odds! Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.125