Lords Mobile Today: 15    Total Posts: 8373

Total:#6

Create Thread

[Chat(Android)] Combat simulator - need math help ( pretty please )

[Copy link] 5/710

#1
Posted on 2017-05-04 02:11:48 | Show thread starter's posts only

I've spent over 10 hours testing combat. I'm simply clueless how it works. I need some fresh ideas.

To simplify things, all below data come from 2 fresh new accounts. Sadly i triggered 1% defense boost on both accounts due to barracks upgrade. But the 1% defense boost is close to non existent for low counts.

To simplify even more, i will focus on infantry phalanx only and infantry versus infantry combat. Simple no ? Well no.

Here are some mind boggling tests ( second column is survival count )
    13i vs 13i                13/13 -> it takes 13 infantry attacks to break through 1 defense and health
    14i vs 14i                13/13 -> 1 dead. At this point i would say it takes me 14 infantry to kill 1 infantry. Kill ratio is 0.07
    15i vs 15i                14/14 -> Confirmed. Still 1 kill
    16i vs 16i                16/16 -> NOPE! He is back from the dead. 16 infantry is weaker than 14 infantry.
    17i vs 17i                16/16 -> HAH, we are back to expected values
    18i vs 18i                17/17 -> good
    19i vs 19i                18/18 -> fine
    20i vs 20i                16/16 -> What the hell ? Why did 3 extra infantry suddenly die ? I guess at this point we are at a new formula. It takes 5 infantry to kill 1 infantry. Kill ratio is 0.2
    21i vs 21i                17/17 -> ok
    22i vs 22i                18/18 -> ok
    23i vs 23i                19/19
    24i vs 24i                20/20
    25i vs 25i                21/21
    26i vs 26i                22/22
    27i vs 27i                22/22
    28i vs 28i                24/24
..........
    50i vs 50i                41/41 -> At some point formula changed again. New kill ratio is 0.18
.........
    100i vs 100i            80    / 80 -> formula changed again. Kill ratio is 0.2
.........
    1000i vs 1000i         784    / 784 -> formula changed again. Kill ratio is 0.226

So. At this point you would think. Aaah it's simple. it's because of the rounding errors. Good, good, let's continue.

100i / 50i                95/26 -> kill ratio is 0.1 in one case and 0.74 in other case. Somewhat expected since there fight is uneven
200i / 100i                188/48 -> kill ratio 0.12 vs 0.26 -> that is a considerable difference
300i / 150i                283/74 -> kill ratio 0.113 vs 0.253 -> wow, we dropped backwards this time
400i/200i                376/96 -> 0.12 vs 0.26
....
1000i/500i                936/236 -> 0.128 vs 0.264 -> that is close to stable if we do not consider rounding errors

Now, how do i link equal amount of troop combat that has a kill ratio of 0.226 with combat that has 1->2 combat ratio and a kill count of 0.128 / 0.264? Because 0.128 is not half of 0.226, and 0.264 is not double of 0.226.

100i vs 110i            76/90 -> 0.1 vs 0.218 -> was expecting 0.203 vs 0.2486. Back to the drawing board

I've spent 4 hours study Lagrange Interpolating Polynomial, liniar polinomial, bezier curves and quite a few recursive function generators to figure out how the hell do they come up with combat results. Any ideas ?

Just when you think you got it, here is a another funny example

100 archer versus 1 infantry and 100 archer results in 81 alive archers vs 80 alive archers. Yes lol, having a larger army is NOT beneficial in this case ! ( same if you put cavalry )

Signature
#2
Posted on 2017-05-04 02:22:44 | Show thread starter's posts only

When making a 2m troop rally, kill ratio difference from 0.2 to 0.226 will lead to 52000 troop dead count difference. At this point i would say that is simply the result of your troop count is very nicely dividable by 4 ( squads ? )

Signature
#3
Posted on 2017-05-04 04:27:32 | Show thread starter's posts only

You're probably making the same mistake I did not too long ago. If you attack someone you get Battle Fury (5% Army ATK) If you want to make a controlled test you need to make sure the defender activates Battle Fury too.  

You also need to make sure (if you are not testing on camps) that the wall of the defender is destroyed before you attack, because a wall that is intact migates a certain amount of damage.

Let me know if this helped. I'm looking forward to see your testing results :)

Signature
Like IGG on Facebook http://www.facebook.com/igg
Follow IGG on Instagram http://instagram.com/iggigotgames/
Like CC on Facebook http://www.facebook.com/CastleClash
Like COL2 on Facebook http://www.facebook.com/ClashofLordsII
#4
Posted on 2017-05-04 05:29:49 | Show thread starter's posts only

Account are level 6. Battle fury is not available yet. All tests are made on camps. Even if supposedly battle fury was invisibly active, at very small numbers the difference is insignificant ( 0.05 coefficient ) and all tests were made one after another meaning all tests would have used the invisible battle fry and would not have made a difference. You can see on the 1000vs1000 tests that results are simetric, which means both teams use exactly same coefficients
If you look at the numbers as a big picture, kill ratio seems to fluctuate. Increases and decreases based on troop count. Something about that magical 16 vs 16 battle and 20 vs 20 battle.
It would help enourmously if IGG would give out some hints how many attack waves happen. I have been running recursive formula generators ( 18 unknown variable with grade 2 polinoms ) for about 6 hours and yet still could not find a function that could even get closer to combat results

Signature
#5
Posted on 2017-10-22 16:00:19 | Show thread starter's posts only

Any update Tudi?

Signature
Like IGG on Facebook http://www.facebook.com/igg
Follow IGG on Instagram http://instagram.com/iggigotgames/
Like CC on Facebook http://www.facebook.com/CastleClash
Like COL2 on Facebook http://www.facebook.com/ClashofLordsII
#6
Posted on 2017-10-25 08:30:35 | Show thread starter's posts only

i let go of all possible attempts to understand combat system lol. Just yolo combat.
I could not find one simple mathematical formula to model the behavior of the system.

I guess the jumps in the system can happen due to squads grouping and thus the rounding of numbers combined with the number of recursive combat phases.

The actual combat formula remains a mystery. It does not scale linearly / exponentially / logarithmicaly with up to 5 parameter formula. Tried to generate all functions and neither fit with all combat report examples. The 5 parameters were imagined to represent ( hp, def, atk, combat phases, diminishing returns ). Maybe i should have added squad grouping, crit chance, miss chance... also. Still, the values seemed to have a bigger than acceptable output error.

Have to check if my test accounts got deleted or not. What i can try is to attack "wall" with 1 unit,  10 units, 100 units... and check how wall HP changes ( have no defense upgrades on the accts). This will only give me a hint relative strength of units and thus a scaling strength. The actually attack value of a unit will still remain a mystery just in case the wall has "base defense" value.

I tried to record combat simulations to try to guess the number of combat phases, but many times the enemy army status just changes yolo mode.

Signature