PDA

View Full Version : Another rambling OCD post on loss mechanics



Ramshutu
02-02-2012, 02:50 PM
Okay, i have been investigating loss mechanics, i found it quite an interesting itch to scratch and felt this may need its own thread.

I've been running some numbers and comparing them to what I am seeing in game. I am using some broad raid info I've gained from two accounts, a level 12 and level 35 to give me some confidence that what I see isn't down to a fluke of unit makeup or level.

Essentially, we all know that when you attack, the unit list is scanned one by one in some fashion to determine what units are lost. How this list is scanned, how many and why you lose the units you do I shall attempt to explain.

1. using the 'consume_percentage' fields of the database (link below) I have calculated that if there was a straight loss calculations (running through each unit and rolling a dice) the odds that of surviving a raid with 0 losses is <0.2%

2. On my low level account, I am seeing 0-2 losses, with around 75% of attacks and 30% of raids resulting in no loss.

3. On my higher (lol almost said high there) account, I am seeing 1-3 losses, with <5% of attacks resulting in no loss and <2% of raids resulting in no losses.

4. Due to 1, I can say for almost certain that the number of units you loose does not depend on the units you have. While I am thinking of starting a 3rd account to check, I suspect that having 100 high loss units will loose the same number as 100 equivalent low loss units. If there were a simply a fixed loss cap and straight roll on all units, I would expect to see more losses than I am seeing on both accounts, the low level account has far too many no losses. This means that the loss cap is random.

5. With the above, we have two options. Firstly, the loss count could be random, in that the game decides how many units you will loose, and then rolls to choose which you loose. Alternatively, the loss cap could be random (the game decides how many units, at most, you will lose), this is difficult to test; you would have to have a consistent set of units and work out what the chances of not losing any versus how many you do lose ( for example, having 200 units with 1% consume would yield a 13% chance of keeping all units, with an average consume of 2% this drops to about 2% chance there's very little differences to compare otherwise)

6. Programmers are lazy. I am one, and can speak from experience. With this in mind, I suspect (but cannot yet proove) that there is a random loss cap rather than random loss count, based on either level, number of units, or allies (these are the only real differences between the two accounts, but will be able to tell which at some point soon....) if the dice were rolled until you made up the losses, the calculation may take time.

7. What I am having trouble with, is the unit choice. the units are searched in some order, a dice roll is conducted for each. If this fails, then the unit dies. If the cap is reached or you have no more units to search, the loss calculation ends, and that's it. The choices for the order are a) high to low loss, b) alphabetical c) inventory order d) reverse attack list order and d) completely randomised.

8 I am pretty sure from implementation and from the statistics that it isn't d) or c) I loose too many rangers, and too few destroyers compared to the number I have for either to be true. A) almost fits the stats, but I have too many blips loosing units low down the list for it to match the stats. B) seems to fit a little better... Avengers are quite high up the list, but I would expect this implementation to be convoluted.

So, if anyone has more detailed info or their own unit losses compared to overall unit breakdown (how often do you loose unit x, how many do you have, and what number of higher loss units do you have),


In summary, however, I think that regardless of whether there is a random loss count or loss cap per fight, the statistics mean that there isn't much of a difference in the result, with lots of units at a very low loss, your still pretty likely to loose them regularly.

bulking up on meat shields is the only way of avoiding bad losses. For example, having 50 rangers in your raid will almost certainly eat up the losses you would otherwise have on more expensive ones (it would mean a very small chance of making it through the rangers without loss). For example, Having 20 harriers as the lowest loss rate units would mean that you would loose at lest one harrier 1/3rd of raids.

I will be doing some investigating into the infirmary now, I suspect that this will lower the loss cap randomiser which means that you will loose the same units, but less (or none of them)

However, the data I have is all circumstantial, without befriending a dev with mountain dew and cheetos, then teasing out industrial secrets with my wit and charm, I could be horribly, horribly wrong and so would welcome anyone else's data.




FYI the database of loss rates can be found here:

https://docs.google.com/spreadsheet/lv?key=0AgjEOMAMom92dFhOellvbTAwQ0dvZGJfYk9EQjMxRn c

Thanks to JackRakan for the database information

Agent Orange
02-02-2012, 04:48 PM
Or it could be

F the game recently added the boost buildings so it would seem that the game separates out units by type, we also know. It separates out units by casualty rate, but what we are not really looking at is the effect of certain units with specific strengths.

What I am most curious about is reports from those loosing super hornets and stealth frigates. Specifically the makeup of the opponents forces with emphasis on AA vehicles and sea scouts.

I'm presently testing this theory but it's impossible to really figure out since I don't get a loss report for those attacking me.

Wildfire
02-02-2012, 06:35 PM
Or it could be

F the game recently added the boost buildings so it would seem that the game separates out units by type, we also know. It separates out units by casualty rate, but what we are not really looking at is the effect of certain units with specific strengths.

What I am most curious about is reports from those loosing super hornets and stealth frigates. Specifically the makeup of the opponents forces with emphasis on AA vehicles and sea scouts.

I'm presently testing this theory but it's impossible to really figure out since I don't get a loss report for those attacking me.

Over the last couple of weeks I've only been attacked by one person usually several times a day, actually everybody in sight must be attacked by him, he's over 1100 more fights won in the last 3 days, he's currently 15k attack and I'm 14.5K defense so from my news feed this is the breakdown of units I lose,

lose fight lose nothing
lose fight lose 304597
win fight lose 1 medic, win 30000
lose fight lose 456886, 2 medic, 1 amphibious trooper - ouch!
win fight lose 1 medic, win 30000
lose fight lose 310000, 1 mobile tactical unit, 1 sea scout, 1 avenger - ouch again!
lose fight lose nothing
win fight lose nothing
lose fight lose 1 GIGN
lose fight lose nothing
lose fight lose 700
lose fight lose 1 GIGN
lose fight lose 1 medic and 12977
win fight lose 1 sea scout
lose fight lose 1 military ambulance

The ones in the middle with the big losses were multiple hits reported as one line in the news feed. It seems to be a fairly random spread of what type of unit to lose, the sea scouts and military ambulance were the surprise ones to me, there should have been over a thousand higher loss units to chose from. Where this fits in a theory other than a weighted random throw for a win or loss and then a random selection of lost units I don't know.

For two players close in strength I'm surprised not to have lost more units. I assume as the attacker he loses more units than I have because I certainly lose a lot more then this when I attack, but I'm not sure as he's made over 1100 attacks in 3 days which at my rate of loss would be 2000-3000 units to replace which hardly looks possible.

Agent Orange
02-02-2012, 06:41 PM
Tough to say, what I would be interested in are his pvp units. If he's attacking that much he'll most likely be accumulating a lot.

JMC
02-02-2012, 06:49 PM
I wouldnt try to figure out how the casualty rate works until they fix the bug.

Before without looking at the code or anything i could pretty much figure out how the casualties worked. Dont know why people like to make it more complicated than it actually is.

Every unit has a percentage and they randomly die. If you have more of a particular unit obviously their combined percentage of dying raises. High casualty units have higher percentages while low casualty units had lower percentages. This is why meat shields worked, most of the time. Obviously you would still lose a valor unit here and there because there is still that small percentage of losing it.

The current problem is that these percentages mean nothing. Every unit seems to have an equal casualty rate and any player with a brain has a lot of valor units in his army. So it only makes sense that you would lose a lot more balor units than other units. Then, the expensive unit losses arent actually THAT high. They are just very high in comparison to before and you notice it more because you actually care about those units. I doubt many of you care about the 1000 meatshields you probably lost, but if you lost 1 harrier thatd be a pretty big deal.

Next i can say that your attack power compared to your opponents defense definitely played a role. Before i could gaurantee 0 losses attacking players with under 25% of my power. Players with about 25%-50% would register 1-2 casualties. 50% to 75% would register 2-4 losses. And someone above 75% would register 3-5, and even win the battle sometimes.

With the bug it seems that no matter what you take 0-4 losses regardless of strength. Obviously with a lot higher chance of 2-4 losses than 1 or 0.

Wildfire
02-02-2012, 06:59 PM
Tough to say, what I would be interested in are his pvp units. If he's attacking that much he'll most likely be accumulating a lot.

Either he's losing them as fast as he gets them or he's stockpiling his valor,
he has
14 GIGN
14 Avenger
32 Seahawk
18 Strike Eagle
87 Super Hornet
10 Combat Boat
70 Stealth Frigate

so not a lot for that much current fighting, and over 17K total Fights won.

Wildfire
02-02-2012, 07:05 PM
I wouldnt try to figure out how the casualty rate works until they fix the bug.

Before without looking at the code or anything i could pretty much figure out how the casualties worked. Dont know why people like to make it more complicated than it actually is.

Every unit has a percentage and they randomly die. If you have more of a particular unit obviously their combined percentage of dying raises. High casualty units have higher percentages while low casualty units had lower percentages. This is why meat shields worked, most of the time. Obviously you would still lose a valor unit here and there because there is still that small percentage of losing it.

The current problem is that these percentages mean nothing. Every unit seems to have an equal casualty rate and any player with a brain has a lot of valor units in his army. So it only makes sense that you would lose a lot more balor units than other units. Then, the expensive unit losses arent actually THAT high. They are just very high in comparison to before and you notice it more because you actually care about those units. I doubt many of you care about the 1000 meatshields you probably lost, but if you lost 1 harrier thatd be a pretty big deal.

Next i can say that your attack power compared to your opponents defense definitely played a role. Before i could gaurantee 0 losses attacking players with under 25% of my power. Players with about 25%-50% would register 1-2 casualties. 50% to 75% would register 2-4 losses. And someone above 75% would register 3-5, and even win the battle sometimes.

With the bug it seems that no matter what you take 0-4 losses regardless of strength. Obviously with a lot higher chance of 2-4 losses than 1 or 0.

Yep that's what I was seeing too, I was using your advise on how to pick rivals to lose nothing against before it all changed. My meat shields should be amphibious troopers as they make up a fifth of my army but I only lost one in the above exchanges, I've only half that number of medics but I lost 5 of them, they are supposed to be high casualty units so maybe that does work to some extent.

Ramshutu
02-03-2012, 06:09 AM
I wouldnt try to figure out how the casualty rate works until they fix the bug.

Before without looking at the code or anything i could pretty much figure out how the casualties worked. Dont know why people like to make it more complicated than it actually is.

Every unit has a percentage and they randomly die. If you have more of a particular unit obviously their combined percentage of dying raises. High casualty units have higher percentages while low casualty units had lower percentages. This is why meat shields worked, most of the time. Obviously you would still lose a valor unit here and there because there is still that small percentage of losing it.

The current problem is that these percentages mean nothing. Every unit seems to have an equal casualty rate and any player with a brain has a lot of valor units in his army. So it only makes sense that you would lose a lot more balor units than other units. Then, the expensive unit losses arent actually THAT high. They are just very high in comparison to before and you notice it more because you actually care about those units. I doubt many of you care about the 1000 meatshields you probably lost, but if you lost 1 harrier thatd be a pretty big deal.

Next i can say that your attack power compared to your opponents defense definitely played a role. Before i could gaurantee 0 losses attacking players with under 25% of my power. Players with about 25%-50% would register 1-2 casualties. 50% to 75% would register 2-4 losses. And someone above 75% would register 3-5, and even win the battle sometimes.

With the bug it seems that no matter what you take 0-4 losses regardless of strength. Obviously with a lot higher chance of 2-4 losses than 1 or 0.

I dont think that the statement that 'all units have the same loss rate' is true. If it was, the unit loss spread would be consistently different than what I am seeing.

More importantly, there is a very big difference between the chance of an individual unit being lost, and the chance of one of many of your individual being lost. It's easy to think that 'I often lose unit x' means that 'unit x has a high loss rate' but I have no evidence of this being the case from the statistics I have.

Maverick50727
02-03-2012, 11:53 AM
Does anyone know isf the PvP was fixed in the new 1.3.1 and has done any testing yet?

Ramshutu
02-03-2012, 01:17 PM
I've not done a great deal of raiding, but it seems like the loss rates are still about the same.

Maverick50727
02-03-2012, 01:21 PM
Cool I haven't upgrade to 1.3.1 yet but thought the same. I think the PvP revamp mus be something server based as it didn't break due an upgrade, so the fix shouldn't require one in theory.

vball
02-03-2012, 03:41 PM
A question, following the train of thought. Would it make sense therefore to purchase Bio Warfare troops for offense and medics for defense? Since they are high casualty units they would in essence be "meat" while hopefully preserving more expensive units such as aircraft ships and still giving you a high offense and defense?

Or would it make sense to buy units that are both, but risk them in both offense and defense?

Example Military ambulance and bio warfare cost 209k, vs one Harrier at 360k.

Any thoughts are appreciated.

Ramshutu
02-03-2012, 05:10 PM
A question, following the train of thought. Would it make sense therefore to purchase Bio Warfare troops for offense and medics for defense? Since they are high casualty units they would in essence be "meat" while hopefully preserving more expensive units such as aircraft ships and still giving you a high offense and defense?

Or would it make sense to buy units that are both, but risk them in both offense and defense?

Example Military ambulance and bio warfare cost 209k, vs one Harrier at 360k.

Any thoughts are appreciated.

With more than a few hundred units, with the new mechanics, you will almost certainly loose something. I'm certain that the unit losses are calculated by going through your units one by one, in some order, and performing a 'dice roll' based on the loss percentage. If you loose items at the beginning of this list, then you are more likely to each the loss cap before higher value units are reached.

It's how the list is ordered that I haven't full worked out. It's either high loss rate to low loss rate, or the order items appear in the inventory list you see. I am trying to get a little more info on which it is.