Opening up the Battle Formula

Background:

Each battle phase has its own formula and they need to be revisited, as similar to The Morale Formula, they aren’t well documented and their intended design isn’t clear.

Starting with Air v Air attacker’s losses. There’s other stuff going on, but the meat of it is this:


Attacker’s losses:
DEF_FIG_QTY = number of defending figs
DEF_BONUS = bonus percentage; military science + no fear + fleet admiral (race doesn’t affect def)
DEF_PWR = 10 * (1 + DEF_BONUS / 100)

ATK_FIG_QTY = number of attacking figs
ATK_BONUS = bonus percentage; military science + no fear + fleet admiral + race bonus
ATK_PWR = 10 * (1 + ATK_BONUS / 100)

VAR_A = 4 (unsure of purpose)
VAR_B = 2 (unsure of purpose)

VAR_X = ( (FIG_DEF_PWR * DEF_FIG_QTY) / ( FIG_ATK_PWR * ATK_FIG_QTY ) / VAR_A)
ATK_LOSSES = min( ( ATK_FIG_QTY * VAR_X), ATK_FIG_QTY) / VAR_B


Example + explanation:

Attacker Pax with 1,500
vs
Defender Ward with 1,000 + no fear, 45% military, fleet admiral (60% total def bonus)

  • VAR_X = ( (16 * 1,000) / ( 10 * 1,500 ) / 4)
    • = 16,000 / 15,000 / 4
    • = 0.26666666666667
  • ATK_LOSSES = min( ( 1,500 * 0.26666666666667 ), 1,500) / 2
    • = 400 / 2
    • = 200

The “min” function above chooses the lesser of 2 values. Strangely, this part of the formula seems to be kind of useless. Compare to sending 100,000 figs into the same battle:

  • VAR_X = ( (16 * 1,000) / ( 10 * 100,000 ) / 4)
    • = 16,000 / 1,000,000 / 4
    • = 0.004
  • ATK_LOSSES = min( ( 100,000 * 0.004 ), 100,000) / 2
    • = 400 / 2
    • = 200

We seem to be suffering again from arbitrary, or at least undocumented, formula design. I can’t begin to understand if the above is working correctly because I don’t know what it’s supposed to be doing.

As a fun side note, there’s a separate part of the formula not shown here that changes your fighters’ performance depending on the presence of other air units, which makes no sense to me. Having more transports for example, will shift this formula slightly independent of the actual transport loss formula.

Anyway, thoughts/insights are welcome, but atm I’m guessing we’re going to need to redesign this formula as well.

2 Likes

So if I send 1mil trannies, I will perform better than 0 trannies?

It will change the output yes, though not sure if always for the better.

Without formula for defence losses we can’t determine if losses attacker / defender are in balance.

Glad this part is finally seeing daylight!

From a related conversation regarding farming:

Lightguns (Curveball) - 08/11/2017
Suppose small fam 1 mill nw, big fam 10 mill nw. Give small fam 10x attack bonus

A flexible bonus multiplier would be interesting.

1 Like

not sure, remember MW56 I believe where ICD and Darrk went head to head near the end? One fam was like twice the size but the fleet was pretty much the same.

Whatup doods,

Large disparity of unit sizes (especially aggressive ground running against people who still have decent air left in comparison to yours) has mathematically always firmly favored the defender. I mean you win, but you better have built just a shit ton of trannies if you want to keep that up for long. The upshot was this (mechanic?) protracted conflicts in so far as it allowed smaller actives to fully participate in the fun. In a deep uni, your bottom 10 fam members had to be playing well if you were ever gonna finish top 10.

Today - I think it almost works to blunt the far higher income IQ the standard player has now. Everyone knows how to whip up enough to mount a defense.

If that take helps as this sloshes around your noodle @I_like_pie. <3

I will spend some time absorbing it, I can’t believe I missed this as a topic in my email alerts.

/hugs to all

How about a few charts demonstrating the outputs when you change some of the inouts?

So attacker_losses(attacking_figs, defending_figs), etc.

Mix in:

  • bonuses from research
  • race bonuses
  • no fear
  • etc.

It should let people have a better grip on things…

BUT, I like the idea of not being able to maximize everything, so those w/o Excel skills or PhD
In operational research can have fun too.

And also, a rand() variable as input that can really, though not often, screw results up completely!

We can finally start diving back in here. I tested a baseline where both the attacker and the defender were the following:

  • no military bonuses of any kind
  • 1000 figs

This is just a basic, equally matched fight. The results:

125 fighters lost dogfights against the defending fighters
55 defending fighters were shot down by the attacking air forces

@Darrk’s assessment is close, but it’s even more than large fleet disparities: any matchup inherently favors the defender by more than a factor of 2x. This is because battles are turn-based. In each stage:

  1. All of your target’s defending units fire first, taking no damage.
  2. Your attacking forces take losses.
  3. Your remaining forces fire, your target takes damage.

The result is a dramatic mismatch on its own, with bonuses compounding the issue. This is why it’s so dramatic when Wardancers defend; their “attack bonus” is actually a bonus on their defensive units’ attacking stat, not an “attacking only” bonus.

So bonuses themselves aren’t the problem, they just exacerbate the root imbalance.

What’s worse is, defender-first makes it incredibly difficult for smaller players to fight back. If a smaller player is able to muster up enough fleet to match their opponent, they’re going to get smacked around anyway. A smaller player has to support a larger fleet than their larger opponent before they can even break even.

Solution A: Attacker-First

Attacking-first would also be a problem, because farming would be cheaper. However, as farming cost is not much of an existing factor as it is, the impact would be less dramatic.

Solution B: Randomize Order

Turn-order is determined randomly on a per-battle basis. This could be something that is influenced by ops, research, etc.

Solution C: Replace Turn-Based Entirely

We replace turns with direct match-ups, with neither attacking nor defending having any inherent advantage.


The great news is that we can now build support for all 3 of these (and/or others), and swap them in and out as galaxy settings.

As always, feedback and ideas are welcome.

Awesome stuff Pie!!!

Here’s my suggestion:

Add a new science called something like “Battle Tactics”

For every percent your Battle Tactics exceeds your foe’s, that percent of your troops acquires First Strike. (ie, if you have 50% BT and your foe has 30% BT, then 20% of your fleet has FS)

In each damage phase, first allow all first striking units to inflict their damage, reducing the opponent’s force. Afterwards, all remaining units inflict damage simultaneously.

Finally, consider creating, or altering existing races, to add bonuses such as “Gain 20% Battle Tactics for Offensive Attacks”. Something like this would fit quite well for the Camaar, for example.

2 Likes

Love it

Solution c seems most fair to me.

I don’t see why there should be a turn advantage.

Use full fleet to calculate defence loss air
Use full fleet to calculate attacker loss air
Mutate numbers in one go.

Use full fleet to calculate defence loss ground
Use full ground fleet that landed to calculate attacker loss ground
Mutate numbers in one go.

2 Likes

Agreed. It also seems the most intuitive.

@Byakko, I really like the concept you’re describing; it offers the benefits of option B (ability to influence battle logic) but more formally defined as an initiative bonus than just tilting a random factor in your favor.

I wonder if it would be better as a buff though; especially as a shared buff, with a counter-buff to nullify it. For example, when active, 10% of your forces gain first strike, unless your opponent is counter-buffed.

This would allow smaller players to use it more easily as it wouldn’t be bound by research, and highly-funded small attackers in large families wouldn’t gain an advantage due to lower networth bumping their research percentages.

WOW.
Lots to read in the links.

Knee-jerk reaction:
I agree with LGunz / Pie “3” sounds/feels right.

2Q’s would like some A’s:

  1. Are any of the changes live yet? I see in a link Pie has been testing them.
    Update: Battle Rewrite!

  2. If live, has anyone really noticed? A link to a praise/whine thread would be most welcome.

I will totally read up and share anything I see this weekend.
Exciting stuff!

Agree with this approach!

1 Like

Solution a: just seems like it would be switching from 1 inbalance to another imo

Solution b: If moving forward, shared buffs are implemented I think the way @Byakko lays it out is great and adds another important element to attacking. Could see this having a fun impact on the game.

Solution c: with everything staying as is, i.e. no new race changes/buffs implemented for solution b, I agree with @The_LiGhTgUnS that this is the most fair approach. Just a 1 for 1 fight

This is really cool that we’re able to start looking into this stuff more in depth!

Personally, I think this is the best option. The way it stands isn’t ideal, and option B wouldn’t really stop what we see now. I believe this option would be best for all sides involved

So I am going to throw in a little magic game play into this discussion, as I think that option c is the only way to take away and advantages or disadvantages,

so in magic, if my creature is a 5/5 and your creature is a 5/4 they deal damage simultaneously and kill each other. If one creature is a 5/5 and the other is a 3/3 then the 3/3 would die, and the 5/5 would live, but be assigned 3 damage for the rest of the turn, meaning 2 more damage would kill it.

My thought is that if play a has 5000 fighters, and player b has 3000 fighters, assuming their is no military science involved, player b should lose all his fighters and player a should have 2k remaining.

their are abilities that could change how damage is dealt like first strike and double damage and things like this could be made into ops.

dont know if that completely makes sense, but thats my thought.

2 Likes

MTG_Dad, I love how you apply MTG to IC. Haha. :slight_smile:

I think I’ll go with Solution C.

However, I am totally lost on battle formula as I’m not expert in code. Maybe you can simplify into formula where I can understand it? If you are going to fix it, then show us the formula? Or it’s going to be secret? :open_mouth:

I’ve played for many years and I figured out what I need to do: If failed, build more fleet. If win, then good, keep build more fleet. I always pay attention to networth to make sure I’m still in range and work on military % to get bonus. But I’m aware that battle was not accurate or whatever. If we are going to improve the formula, we’ll have to analyze it and fight it out to understand how it work better.