Equations/Algorithms?

Discussion on how to play against other humans.
Paff
Posts:6
Joined:Sat May 07, 2011 3:11 am
Location:Karatu, Tanzania
Contact:
Equations/Algorithms?

Postby Paff » Sat May 07, 2011 3:27 am

Hey. There are a lot of parts of the game about which I don't know the exact "game rules", and I'm wondering if anyone knows or if it's just a mystery. These things include:

- Spying: If I have X spies with +M spying, and my opponent has Y spies with +N spying, what's the math to determine the chances of spies killing each other, succeeding with their missions, etc?
- Beam Weapon To-Hit Chance: Similar to the above, if I have a ship with +X beam attack, and I fire on a ship with +Y beam defense, from a range of N, how do I calculate my chances of hitting, and my chances of partial-hits, and how much damage the partial-hits will do?
- Powered Armor/Heavy-G For Boarding Actions: Powered Armor and High-G Homeworld both let your ground troops take extra hits before dying in planetary invasions. Does it also help in boarding actions?

So, does anyone know about any of those? Thanks.

Void Stalker
Posts:20
Joined:Sun Aug 30, 2009 9:47 am

Postby Void Stalker » Sat May 07, 2011 6:35 am

Glad to see MooII still being discussed. For your questions to be answered will require someone more knowledgeable than I, but I didn't want to have you waiting forever for a reply. On the spies killing each other, I was always under the impression that it took a leader with the "Assassin" trait to kill them off. This may just be my impression, and incorrect, but who knows.

I liked your questions, and will be following this thread to read responses and maybe learn a thing or two myself.

StriderV
Posts:3
Joined:Fri Jul 08, 2011 5:24 pm

Postby StriderV » Fri Jul 08, 2011 5:35 pm

Though I can't answer your other questions, I can answer on the chance to hit.

Percent chance to hit = 100/(1 + 2^E)

where E = -(BA - BD)/16
BA = Beam Attack
BD = Beam Defense

Also, every space away from your target your ship gets -1 BA. Range is calculated accurately using pythagoras, so R^2 = X^2 + Y^2

There is no such thing as a "partial hit". The further away you are, there is range dissipation. These formulas are a bit more complex as it varies based on your weapon's mount. Here are the tables (and this is based on your weapons normal mount damage).

Code: Select all

Normal Mount: Ranges Multiplier ------ ---------- 0 to 2 1 3 to 5 0.9 6 to 8 0.8 9 to 11 0.7 12 to 14 0.6 15 to 17 0.5 18 to 20 0.4 21 to 23 0.35 Heavy Mount: Ranges Multiplier ------ ---------- 0 to 8 1.5 9 to 14 1.4 15 to 20 1.3 21 to 26 1.2 27 to 32 1.1 33 to 38 1.0 39 to 44 0.9 45 to 50 0.85 Point Defense: Ranges Multiplier ------ ---------- 0 to 2 0.4 3 to 5 0.2 6 to 8 0 9 to 11 -0.125
If you have High Energy Focus, add .5 to each of these multipliers (so, yes, this makes high energy focus MUCH better for PD weapons than HV weapons).

All of these tables were taken from Gontzol's FAQ on gamefaqs.com

User avatar
rewster1
Posts:61
Joined:Mon Oct 01, 2007 7:29 am
Contact:

Postby rewster1 » Mon Jul 11, 2011 9:02 am

Powered armor and heavy G both do help in boarding actions.

I actually did some small amount of testing on my hypothesized theory of marine combat calculation, which is based on Gontzol's FAQ formula for percent chance to hit which StriderV mentioned, only replacing BA and BD with your ground combat rating and your opponent's ground combat rating respectively.

My formula once you know the "chance to hit" is then:

X = A*B*C/(Y*Z)
Where X is the number of marines needed on average to capture successfully, A is your opponent's number of marines, B is your opponents hit points (from 1 to 3 depending on PA and HG), C is their percent chance (which is 100 minus your percent chance), Y is your hit points, and Z is your percent chance.

A neat result of this seems to be that if you are at about +30 GC over your opponent and you have 2 hit points to their 1, you can usually capture a battleship with a frigate. :twisted:

User avatar
rewster1
Posts:61
Joined:Mon Oct 01, 2007 7:29 am
Contact:

Postby rewster1 » Mon Jul 11, 2011 9:20 am

As far as spying, I also came up with the following after a bit of testing, though I couldn't figure out if the same calculation was involved in any way this time. This is just a table based on my results. SR is spy rating, and AR is agent rating (of the opponent).

Code: Select all

SR-AR avg turns to steal % Chance 50 2.5 33 30 5 20 15 10 10 0 40 2.5
It seems to show that spying is really only effective if you're at least +15, which can be hard to do when your opponent is uni.

The interesting thing here is that it seems that having more spies or more agents than 1 doesn't really affect chance to steal. I tested with 1 spy and 10 agents, 1 and 1, and 10 and 1, and all results were similar. It's as if there is really only one spy in action on each turn, and the other spies just queue up waiting for the first one to be killed off before taking over. Also, despite the ground combat animation showing what appears to be strength in numbers, I believe the marines actually function the same way. The animation really ought to show a bunch of people on each side lining up to duel.

On the other hand, the numbers of spies vs. agents may have something to do with the chance of assassination, which I haven't really looked into.

Forgot to mention, I also tested with 0 agents.... and the results were the same. It would appear then that agents are only useful for assassination.

User avatar
Overlord2
Posts:661
Joined:Wed Jun 13, 2007 5:25 pm

Postby Overlord2 » Mon Jul 11, 2011 6:36 pm

The exact spying formula (1.31 & 1.40).

Before roll for the spying there is roll on assasination of spies. Got no information on that formula. As for the spying chance the formula is the following:
Random attack (0-100) + all offensive bonuses - [Random defense (0-100)+all defensive bonuses]>60 spying is successful; >80 spying is successful and you frame other race; >90 some diplomatic action follows, don't remeber;
For Sabotage formula is the same with the exception that figures are different - 70 and 90.
All offensive/defensive bonuses include all techs as they are, race bonuses, leaders and bonuses from the spies.
The exact bonuses of the spies are available in the following table:
https://spreadsheets.google.com/pub?key ... utput=html
Last edited by Overlord2 on Sat Oct 27, 2012 7:17 am, edited 1 time in total.

User avatar
Overlord2
Posts:661
Joined:Wed Jun 13, 2007 5:25 pm

Postby Overlord2 » Tue Jul 12, 2011 7:16 am

Forgot to mention, I also tested with 0 agents.... and the results were the same. It would appear then that agents are only useful for assassination.
You can't steal without at least a single spy assigned to spying mission.

User avatar
rewster1
Posts:61
Joined:Mon Oct 01, 2007 7:29 am
Contact:

Postby rewster1 » Tue Jul 12, 2011 8:25 am

"Agents" in my post was referring to defensive spies, where spies refers to offensive. So zero agents would mean the defender has nobody defending.

The spy formula you posted is pretty interesting. I was surprised by the bonus from the number of spies... as it really did seem to have zero effect for me, but then there's no way I could have playtested enough to come up with accurate figures.

Paff
Posts:6
Joined:Sat May 07, 2011 3:11 am
Location:Karatu, Tanzania
Contact:

Postby Paff » Sun Jul 17, 2011 4:34 am

Awesome, thanks. And thanks for the ground combat info, completely forgot to ask about that.

Come to think of it, I also don't know how structure vs systems works. How many total "system points" do ships have vs structure points, what's the chances of any given damage point going to structure vs systems, how does that damage get distributed amongst the different systems, and how many "systems points" does each system have?

User avatar
Overlord2
Posts:661
Joined:Wed Jun 13, 2007 5:25 pm

Postby Overlord2 » Thu Jul 21, 2011 12:16 pm

Powered armor and heavy G both do help in boarding actions.

I actually did some small amount of testing on my hypothesized theory of marine combat calculation, which is based on Gontzol's FAQ formula for percent chance to hit which StriderV mentioned, only replacing BA and BD with your ground combat rating and your opponent's ground combat rating respectively.

My formula once you know the "chance to hit" is then:

X = A*B*C/(Y*Z)
Where X is the number of marines needed on average to capture successfully, A is your opponent's number of marines, B is your opponents hit points (from 1 to 3 depending on PA and HG), C is their percent chance (which is 100 minus your percent chance), Y is your hit points, and Z is your percent chance.

A neat result of this seems to be that if you are at about +30 GC over your opponent and you have 2 hit points to their 1, you can usually capture a battleship with a frigate. :twisted:
Hmm, tested your formula and it seems not precisely correct. In fact the number of required marines to have successful capture is up to 25% more....
Also it is not clear what happens when the ground combat bonus exceeds value 100...or is exactly 100

User avatar
rewster1
Posts:61
Joined:Mon Oct 01, 2007 7:29 am
Contact:

Postby rewster1 » Fri Jul 22, 2011 10:41 am

Hmm, tested your formula and it seems not precisely correct. In fact the number of required marines to have successful capture is up to 25% more....
Also it is not clear what happens when the ground combat bonus exceeds value 100...or is exactly 100
Agree on the "hmmm". I don't pretend I have a definitive formula, as I simply don't have enough time to test it enough to satisfy even myself. Are you saying that the average number of marines needed should be 25% more, or that you often need 25% more than the average (implying sometimes you might need 25% less)?

As far as exceeding 100, I'm not sure why that would matter. The formula I was using was
Percent chance to hit = 100/(1 + 2^(-(BA - BD)/16))
Where BA would be your GC rating and BD would be your opponents'.
If the difference between you and your opponent was 100, you'd be at about 98.7% to their 1.3%.

User avatar
Overlord2
Posts:661
Joined:Wed Jun 13, 2007 5:25 pm

Postby Overlord2 » Fri Jul 22, 2011 12:02 pm

Hmm, tested your formula and it seems not precisely correct. In fact the number of required marines to have successful capture is up to 25% more....
Also it is not clear what happens when the ground combat bonus exceeds value 100...or is exactly 100
Agree on the "hmmm". I don't pretend I have a definitive formula, as I simply don't have enough time to test it enough to satisfy even myself. Are you saying that the average number of marines needed should be 25% more, or that you often need 25% more than the average (implying sometimes you might need 25% less)?
The number of marines for high probability of capturing (close to 100%) should be by about 25% more (up to 25% more). With the number of marines, which follows from your formula you CAN capture sometimes, but probability is about 50% or less. I.e. you kill almost all enemy marins but 1 or couple survives. This is usually. For guaranteed kill you need +25% marines from your figure.
As far as exceeding 100, I'm not sure why that would matter. The formula I was using was
Percent chance to hit = 100/(1 + 2^(-(BA - BD)/16))
Where BA would be your GC rating and BD would be your opponents'.
If the difference between you and your opponent was 100, you'd be at about 98.7% to their 1.3%.
Understood. At first I imagined formula in different way, but later I figured out what you meant.

User avatar
rewster1
Posts:61
Joined:Mon Oct 01, 2007 7:29 am
Contact:

Postby rewster1 » Fri Jul 22, 2011 2:47 pm

Yeah, I think my formula would be for a 50% success rate.
I only got a C+ in statistics, but I think you'd need to know the standard deviation in order to calculate for say, a 98% success rate (2 deviations). If you believe a 25% increase gets you pretty close to 100% success, then perhaps the standard deviation is 12.5%?
I wouldn't know how else to determine it other than testing it in game, which is what you did.

User avatar
Overlord2
Posts:661
Joined:Wed Jun 13, 2007 5:25 pm

Postby Overlord2 » Fri Jul 22, 2011 5:09 pm

Yeah, I think my formula would be for a 50% success rate.
I only got a C+ in statistics, but I think you'd need to know the standard deviation in order to calculate for say, a 98% success rate (2 deviations). If you believe a 25% increase gets you pretty close to 100% success, then perhaps the standard deviation is 12.5%?
I wouldn't know how else to determine it other than testing it in game, which is what you did.
If you talk about normal distribution it is 3 deviations then. So 25% increase in number of marines will correspond to 3 deviations. But the number of marines is integer so you won't get precise value of the standard deviation for each case, since the number of marines will be rounded. Anyway the sought number is the number of marines, which gives stable result, hence it is not difficult to calculate it basing on your formula.
However, I would point out that the number of marines required for capturing coudn't be treated as random variable in this case. The dependence is clearly coming into sight. The less number of marines gives considerably less chances to capture, while increased number of marines gives considerably more chances than 50%.


Return to “Strategy & Tactics”

Who is online

Users browsing this forum: No registered users and 11 guests