Author Topic: counter or blob? more pedantry  (Read 2132 times)

Offline mindloss

  • Full Member Mark II
  • ***
  • Posts: 169
counter or blob? more pedantry
« on: August 29, 2011, 02:46:31 am »
So, here's a question that arises particularly often in the early game. Say that I have an inbound wave of 50 frigates due in a minute. I have at my disposal 50 bombers, and 50 fighters.

Now, I know that the golden rule is that bombers > frigates > fighters > bombers. The question is, do I want to defend with BOTH groups, increasing my attack power substantially but giving him juicier targets (my fighters), or just the counter group? From playing the game it seems to suggest strongly that more is better unless it's a particular kind of setup (bombers vs forts, etc.), and I am almost positive that this holds true as you approach the limit (seeing as a defensive 10:1 blob can often eat an invader while taking few to no losses).

But, there are still those first few skirmishes to consider. And as a new player, I would pose the more open question of "How important is it to make sure you're countering with the right units?" I'm usually not very careful about it, and rarely run into big snafus because of it, but maybe I'm missing out.

The original scenario I gave becomes more complex when you factor in price. Fighters are cheaper than bombers or frigs; after crunching the numbers, it may turn out he takes out more ships, but at a lower overall cost to you. To make matters even more complicated, it's not as though you're playing another human with a comparable resource mechanic. For instance, you may find a situation where you can sustain a 50% greater value loss but inflict 100% more damage on the AI by doing so. Is that desirable? First of all, the AI outnumbers you n to 1, so in this case, not likely, but more to the point it uses a completely different system for generating ships, so... I have no f'in idea. Just food for thought.

... I'm gonna go crunch the numbers for a 50-50-50 frig/bomber/fighter battle. Now I'm curious.


Edit: Also just realized you can get 'proofs' of either side by taking the extremes. If you outnumber the opponent 1000 ships to 1, odds are he won't get a bleedin' shot off; thus stacking there is almost certainly better. However, take the case of one fighter + one bomber vs. one frigate. I'll bet the fighter/bomber wins, but it may well not be before the frigate pops the fighter, in which case you'd have been better off sticking to the bomber counter. Following that logic, my guess is that there's a breakeven point somewhere at a pretty small number of ships where it becomes worth it to pile in (all things being equal).

Okay. Still gonna go crunch those numbers.
« Last Edit: August 29, 2011, 02:50:52 am by mindloss »

Offline Commiesalami

  • Full Member Mark II
  • ***
  • Posts: 167
Re: counter or blob? more pedantry
« Reply #1 on: August 29, 2011, 02:53:30 am »
One more thing to think about is that fighters build quick and are cheap as dirt.  Losing one of those isn't a very big deal at all compared to the more expensive bombers and frigates.

Offline mindloss

  • Full Member Mark II
  • ***
  • Posts: 169
Re: counter or blob? more pedantry
« Reply #2 on: August 29, 2011, 06:48:24 am »
Ha! I actually did go and do it. And it was surprising!

(Devs, if you glance over this and see that I've got my mechanics wrong, kindly point it out.)


I manually put in the stats for Fighter/Bomber/Missile. If desired, one could always import a big ol' dataset.

Test case:

Code: [Select]
>>> matchup('Standard Fighter', 'Missile Frigate')
Standard Fighter died after 30 seconds.
At the end, Standard Fighter had -9500 HP left, and Missile Frigate had 120400.


The three 1v1 combos track with what you see on the Reference tab in game, disregarding a small value I assume is targeting/tracking time or something, so I'm hoping I plugged the math in right.

How about five bombers vs five frigates?

Code: [Select]
>>> multi_match(['Bomber']*5, ['Missile Frigate']*5)
---Second 1---
---Second 2---
---Second 3---
---Second 4---
---Second 5---
---Second 6---
---Second 7---
---Second 8---
---Second 9---
---Second 10---
Missile Frigate shot Bomber for 8400, leaving it with 145600/154000.
Missile Frigate shot Bomber for 8400, leaving it with 137200/154000.
Missile Frigate shot Bomber for 8400, leaving it with 128800/154000.
Missile Frigate shot Bomber for 8400, leaving it with 120400/154000.
Missile Frigate shot Bomber for 8400, leaving it with 112000/154000.
---Second 11---
---Second 12---
Bomber shot Missile Frigate for 57300, leaving it with 96700/154000.
Bomber shot Missile Frigate for 57300, leaving it with 39400/154000.
Bomber shot Missile Frigate for 57300, destroying it!
Bomber shot Missile Frigate for 57300, leaving it with 96700/154000.
Bomber shot Missile Frigate for 57300, leaving it with 39400/154000.
---Second 13---
---Second 14---
---Second 15---
---Second 16---
---Second 17---
---Second 18---
---Second 19---
---Second 20---
Missile Frigate shot Bomber for 8400, leaving it with 103600/154000.
Missile Frigate shot Bomber for 8400, leaving it with 95200/154000.
Missile Frigate shot Bomber for 8400, leaving it with 86800/154000.
Missile Frigate shot Bomber for 8400, leaving it with 78400/154000.
---Second 21---
---Second 22---
---Second 23---
---Second 24---
Bomber shot Missile Frigate for 57300, destroying it!
Bomber shot Missile Frigate for 57300, leaving it with 96700/154000.
Bomber shot Missile Frigate for 57300, leaving it with 39400/154000.
Bomber shot Missile Frigate for 57300, destroying it!
Bomber shot Missile Frigate for 57300, leaving it with 96700/154000.
---Second 25---
---Second 26---
---Second 27---
---Second 28---
---Second 29---
---Second 30---
Missile Frigate shot Bomber for 8400, leaving it with 70000/154000.
Missile Frigate shot Bomber for 8400, leaving it with 61600/154000.
---Second 31---
---Second 32---
---Second 33---
---Second 34---
---Second 35---
---Second 36---
Bomber shot Missile Frigate for 57300, leaving it with 39400/154000.
Bomber shot Missile Frigate for 57300, destroying it!
Bomber shot Missile Frigate for 57300, leaving it with 96700/154000.
Bomber shot Missile Frigate for 57300, leaving it with 39400/154000.
Bomber shot Missile Frigate for 57300, destroying it!
Match is complete!
Team A has 5 ships remaining to Team B's 0.


Looks good. Now we get to the interesting bit: 5 bombers+5 fighters vs. 5 frigs.  (Do note that these are very basic calculations, not taking into account weapons range or any other kind of impeding factor. Also, ships choose their next target simply by what they can kill or do the most damage to. I have no idea how this optimization works in the game, but I gather it's a bit more complex.)

Anyway:

Code: [Select]
>>> LOG_LEVEL=1
>>> A=['Bomber','Standard Fighter']*5
>>> B=['Missile Frigate']*5
>>> multi_match(A,B)
Match is complete!
Team A has 7 ships remaining to Team B's 0.
>>> for x in A: print("%s," % x.name),

Bomber, Bomber, Bomber, Bomber, Standard Fighter, Bomber, Standard Fighter,

So we've thrown away three fighters for no perceptible gain. Either way takes about 36 seconds.

But surely this changes as you increase the size of the blob?

Code: [Select]
>>> multi_match(['Bomber']*50, ['Missile Frigate']*50)
Match is complete!
Team A has 45 ships remaining to Team B's 0.
>>> multi_match(['Bomber']*50+['Standard Fighter']*50, ['Missile Frigate']*50)
Match is complete!
Team A has 72 ships remaining to Team B's 0.

In the first case, A lost 5 of his 50 bombers. In the second case, he only lost 1 bomber, but lost 27 fighters.

Code: [Select]
>>> ships['Bomber'].cost*5
8000
>>> ships['Standard Fighter'].cost*27
10800

Not a good trade. But there is one mitigating factor:

Code: [Select]
>>> ships['Bomber'].buildTime*5
58.33333333333333
>>> ships['Standard Fighter'].buildTime*27
45.0


Okay, just one more, for all the marbles:

Code: [Select]
>>> multi_match(['Bomber']*500, ['Missile Frigate']*500)
Match is complete!
Team A has 444 ships remaining to Team B's 0.
>>> A=['Bomber']*500+['Standard Fighter']*500
>>> multi_match(A,['Missile Frigate']*500)
Match is complete!
Team A has 719 ships remaining to Team B's 0.
>>> A[499].name
'Bomber'
>>> ships['Bomber'].cost*(500-444), ships['Standard Fighter'].cost*(1000-719)
(89600, 112400)


So for the case of 500 of each ship, you lose a tenth of your bombers if you go head to head... and you don't lose a single one (yeah, right) if you add in 500 fighters. However, looks like the cost of the fighter fodder still isn't worth it.

That's all for me. Now I'll sit back and wait for Keith or whomever to point out what's completely unrealistic or simply incorrect with my model. :)


And for anyone who is interested in slapdash code, it's up at http://pastebin.com/bJ93W9bi.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: counter or blob? more pedantry
« Reply #3 on: August 29, 2011, 08:59:09 am »
Any simulation of the simulation is going to give you only approximate results at best, because we have a really wicked complicated simulation.  That said, the scenario here is simple enough that it was probably a pretty reasonable approximation.

To give a short answer to your original question, though: I prize getting battles over with as quickly as possible, not as cheaply.  Why?  It's kind of like insurance -- you pay a little each battle so that you hopefully don't have a massive expense later.  When bombers come in particular, those are something that if you don't kill them quickly enough and they scatter, they can just eat through infrastructure as well as potentially killing some "invaluable" stuff that you can't rebuild if it dies.

The other thing to remember is that repair costs aren't free: since fighters are so cheap, if they are drawing fire away from the bombers they may be cheaper to rebuild than the bombers would have been to repair.  Note that I say may -- I haven't done that math on that specific scenario.

Whenever I have a fleet that is all together in one location, I almost never hold part of it back from the battle -- everyone should fight, unless one of my ship types is just absolutely going to get eaten by the opposing ships, while doing next to no damage in return.  That's rarely the case.  Instead, my battle tactics come down to two things: 1) can I move part of my force (often sometimes a specific subset of ship types) around to flank, or in early to take the first salvo, or in late to avoid the first salvo?; and 2) which ships can I spare for which battles on what planets?

Generally my biggest challenge is figuring out how to man all the fronts I need to man, as well as keeping some defense-in-depth so that any AI ships that slip through into my core planets don't just run completely amuck or cost me the game.
« Last Edit: August 29, 2011, 09:14:25 am by x4000 »
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: counter or blob? more pedantry
« Reply #4 on: August 29, 2011, 09:12:27 am »
Haha, I used to slap together simulators for other people's games too ;)

The maximum damage reduction from armor was actually changed from 95% to 80% a while ago, but other than that the damage math looks right.

And yes, the targeting selection in the game is vastly more complex than "which one would I hit for the most damage" but that is a factor in it.  It also varies significantly based on whether you have focus fire on, though I think in your code it will effectively focus-fire due to the order of ships in the lists not changing.

Anyway, fighters make great fodder, but they really don't do well against their main counter.  That's why it's their main counter :)  But like Chris indicated, in battle you don't often have time for such nuances ;)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline zoutzakje

  • Hero Member Mark III
  • *****
  • Posts: 1,052
  • Crosshatch Conqueror
Re: counter or blob? more pedantry
« Reply #5 on: September 07, 2011, 02:29:23 pm »
I always only use the counter(s) to deal with a wave. This way the rest of my fleet can stay behind and focus on something else. I also believe that my losses are to severe if I send both frigates and fighters to deal with a wave of bombers for example. If you're worried about enemy bombers reaching your "invaluable" stuff to fast, use a gravity turret. We got more than just military forces to deal with attacks

Offline mindloss

  • Full Member Mark II
  • ***
  • Posts: 169
Re: counter or blob? more pedantry
« Reply #6 on: September 07, 2011, 04:33:45 pm »
Kind of related to this thread: I forget now what I've heard about the auto-targeting logic. If I dump a bunch of frigs, bombers and fighters in on an AI group of frigs, bombers and fighters, will your ships always be gunning for their correct counter? (To make matters trickier, what if their correct counter is slightly out of range and a bunch of other ships are in range? Does your fighter shoot at the frig next to it, or will it motor a few meters to reach a bomber?)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: counter or blob? more pedantry
« Reply #7 on: September 07, 2011, 04:51:10 pm »
Kind of related to this thread: I forget now what I've heard about the auto-targeting logic. If I dump a bunch of frigs, bombers and fighters in on an AI group of frigs, bombers and fighters, will your ships always be gunning for their correct counter? (To make matters trickier, what if their correct counter is slightly out of range and a bunch of other ships are in range? Does your fighter shoot at the frig next to it, or will it motor a few meters to reach a bomber?)

That all depends.  Ships will attempt to do what is most effective based on if you are letting them move or not.  If you have them in attack-move or FRD mode, then anything that's in the same general area they'll move around to hit their best targets.  If they are not in those modes, they are limited to literally what is in their range because you've effectively said they aren't allowed to motor on their own.  So they'll shoot whatever they're most effective against in their range, in that case.

It's a very, very, very complicated sort, though.  It's literally hundreds of lines of code just for that alone, and takes into account things like mirrors, armor, damage bonuses, munitions boosters, how many other ships are firing at a target, what the total damage of incoming shots are (sniper and regular), what the damage is that they can do versus the remaining health of the target, if the target is powered-down, and on and on.  It tends to make very good decisions in the main.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline snelg

  • Jr. Member
  • **
  • Posts: 64
Re: counter or blob? more pedantry
« Reply #8 on: September 16, 2011, 09:51:09 am »
I always only use the counter(s) to deal with a wave. This way the rest of my fleet can stay behind and focus on something else. I also believe that my losses are to severe if I send both frigates and fighters to deal with a wave of bombers for example. If you're worried about enemy bombers reaching your "invaluable" stuff to fast, use a gravity turret. We got more than just military forces to deal with attacks
Me too, in the case of bombers I usually send in both fighters and bombers and hopefully they'll be stuck for a while in gravity/tractor so the frigates can join in as well because of their range.
But if the ai sends frigates I keep my fighters away and I keep my bombers away from fighters.
Basically, if the ai don't have a great counter for it, send it in there.

Although I try to use counters as much as possible it's mostly with the waves. Since they tend to be one type of ship and you get a warning and time to prepare. :P