Author Topic: AI low cap ships  (Read 14049 times)

Offline Faulty Logic

  • Hero Member Mark III
  • *****
  • Posts: 1,194
  • Bane of the AI
AI low cap ships
« on: September 18, 2012, 03:06:20 am »
There are consistently about three times the number of caps of low cap AI ships than normal cap ones.

Example: CPA fleet in my current game had 59 Spire Blade Spawners (about 12 caps) but only about 350 each of the triangles (3.5 caps for each type). It also had 45 or so Z medic frigates (5.625 caps).

There have been many, many complaints about this, each one assuming the AI ignored ship caps completely, and each one ignored (so I assume) after pointing out that this (the assumption that the AI ignores ship caps) is false. However, assuming the ship-caps are balanced against each other, this would still indicate a problem.

This is a forum post rather than a mantis issue because I don't know whether or not it is intentional.

Edit: on reread I come off as quite accusatory. Sorry.
« Last Edit: September 18, 2012, 06:41:45 pm by Faulty Logic »
If warheads can't solve it, use more warheads.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: AI low cap ships
« Reply #1 on: September 18, 2012, 07:30:12 am »
There may very well be a lingering math error or two that is causing the AI to not get as penalized for low cap stuff as they should be for some types of spawns. Over time, you begin to see the descripency (read, feel the pain).

My rebuttals were more saying that the AI ignoring caps is NOT correct behaviour, and that the math does try to scale all the various ways the AI can get ships according to caps.

Do you have the reinforcement logs and any other logs that describe ways AIs can get ships? That may provide some insights.

Also, thanks to the "preferred reinforcements type" logic the AI now has for each planet, what you just saw may have a valid explanation to it.
Either that, or some unlucky statistical clustering.
It's random, it can be hard to tell.

Offline KDR_11k

  • Hero Member Mark II
  • *****
  • Posts: 904
Re: AI low cap ships
« Reply #2 on: September 18, 2012, 08:42:55 am »
Or maybe it's just a rounding issue.

Offline Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Re: AI low cap ships
« Reply #3 on: September 18, 2012, 08:49:02 am »
Actually, I'm not certain CPAs care about caps.  They just release X ships of the correct Mark, going down in Mark if they've run out, or up in Mark if there is nothing lower either.  So you could just get really bad luck if it happens to pick a lot of low cap ships.  But the overall population of ships across the galaxy should roughly correspond to their cap size, and so CPAs will tend to have ship counts on par with ship caps, but not always.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI low cap ships
« Reply #4 on: September 18, 2012, 09:03:28 am »
Yea, CPAs don't care about the strength of the unit, they just release what's available, on a one-for-one basis (partly because otherwise the CPA announcement would be made a liar: it doesn't know which ships will be available at launch-time, and it's already given you a literal number).  The AI did "pay more" to get those low-cap ships in the first place, though; whether it was from initial-spawns, initial-barracks, or reinforcements.

Also, it processes each planet in turn, and releases all the ships there it can (of the tech level that it's trying for at the time), rather than going for maximal spread-across-planets.  Therefore, if the order of planet processing happens to pick more planets that have low-cap ships as 1 or more of their 3 "focus types" (for reinforcements), they'll probably release a lot of those.

That said, I don't dismiss concerns about the-AI-getting-low-cap-ship-for-same-cost-as-normal-cap-ship out of hand, but I do need details of what exactly happened (saves are good), and proof (logs are good) of it happening.  Otherwise I'm kinda shooting in the dark to figure out if it's actually a bug, or just a perception.
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 Faulty Logic

  • Hero Member Mark III
  • *****
  • Posts: 1,194
  • Bane of the AI
Re: AI low cap ships
« Reply #5 on: September 18, 2012, 06:44:24 pm »
This also applies to schizo waves, special forces, and hybrid drones. I don't which if any are intentional.

Sorry about the tone of the OP, just realized it was less than polite.

I will have some reinforcement logs soon (assuming they are so named in the controls menu and RuntimeData).
If warheads can't solve it, use more warheads.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: AI low cap ships
« Reply #6 on: September 18, 2012, 06:46:54 pm »
This also applies to schizo waves, special forces, and hybrid drones. I don't which if any are intentional.

Sorry about the tone of the OP, just realized it was less than polite.

I will have some reinforcement logs soon (assuming they are so named in the controls menu and RuntimeData).

If you are seeing it in other things as well, it may be worth posting the two wave logs and the "Hybrid hyjinks" log as well, which will detail their respective operations.
« Last Edit: September 18, 2012, 06:50:16 pm by TechSY730 »

Offline Faulty Logic

  • Hero Member Mark III
  • *****
  • Posts: 1,194
  • Bane of the AI
Re: AI low cap ships
« Reply #7 on: September 18, 2012, 06:50:21 pm »
Which section of the reinforcement logs should I post?
If warheads can't solve it, use more warheads.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: AI low cap ships
« Reply #8 on: September 18, 2012, 06:51:26 pm »
Which section of the reinforcement logs should I post?

Attach the whole thing?

Or is it too big to attach to your post raw?

EDIT: Oh, and in case it wasn't clear, I meant an actual attach, not an inlined "copy paste".
The attach is burried under additional options for whatever reason. It's easy to miss.

Just FYI if you didn't already know.
« Last Edit: September 18, 2012, 07:03:00 pm by TechSY730 »

Offline Faulty Logic

  • Hero Member Mark III
  • *****
  • Posts: 1,194
  • Bane of the AI
Re: AI low cap ships
« Reply #9 on: September 18, 2012, 07:04:26 pm »
Way too big, assuming the AI thread one is the correct one.
If warheads can't solve it, use more warheads.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: AI low cap ships
« Reply #10 on: September 18, 2012, 07:07:29 pm »
Way too big, assuming the AI thread one is the correct one.

You could manually delete the entries that were from previous games.
Sadly, the game does not "auto-prune" really old entries once a log file get big.


For the waves (and possibly reinforcements too), you will need both the AI thread and the Main thread ones, as they both have important math steps.
You could zip them up also; zipping up plain text files usually results in really great compression ratios.
Also, see my edit of my previous post.

Offline Faulty Logic

  • Hero Member Mark III
  • *****
  • Posts: 1,194
  • Bane of the AI
Re: AI low cap ships
« Reply #11 on: September 18, 2012, 07:19:16 pm »
Ack: while attempting to zip the relevant files, I deleted them. Should have more soon, just need to play.

Hypothesis:

First, the AI reinforces, dividing its strength relatively equally among ship types. These resolve to things like 5 triangles and 1 low-cap due to rounding.

The AI is now in strength budget debt.

Further reinforcement pulses eliminate the debt. Repeat from First.

This accounts for the high proportions of low-cap ships. This also leads to higher static strength on a planet.


The low-cap heavy cpas are most likely a result of the initial seeding (and its rounding).

I was never trying to post in-line.
« Last Edit: September 18, 2012, 07:22:23 pm by Faulty Logic »
If warheads can't solve it, use more warheads.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: AI low cap ships
« Reply #12 on: September 18, 2012, 07:47:10 pm »
As its going from post to post and planet to planet within a pulse, the debt is preserved properly. Only after the pulse ends does any debt get erased.

Previously, this had a negligible impact on average, but with the new "ship type focus" logic for reinforcements, I could see some circumstances where it could easily get into a cycle of repeated cross pulse "debt cancelleation", leading to noticeable skewing of ratios over time. (I can post a more detailed, clearer description later when I am not typing on my phone)

That wouldn't explain the schizo waves exhibiting this though...
« Last Edit: September 19, 2012, 08:31:31 am by TechSY730 »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI low cap ships
« Reply #13 on: September 18, 2012, 09:40:45 pm »
This also applies to schizo waves, special forces, and hybrid drones. I don't which if any are intentional.
Schizo waves and special forces both pay attention to ship strength, which factors cap.  Hybrid drones don't factor strength (just cap) but the hybrids are way less likely to pick the really nasty low-cap ships for that reason.

Quote
Sorry about the tone of the OP, just realized it was less than polite.
I hear smileys are useful for dulling the edge of "internet tone-loss" ;)

Anyway, yea, the debt gets erased after an entire reinforcement pass, but that's cross-planet.  If the AI getting an extra low-cap ship per-reinforcement-pass per-player is a big deal I'm not sure what to say.  They don't happen all that often.  The alternative is trying to remember the debt (exceedingly tricky, since the really important data is on the AI thread, and it's hard to persist AI-thread data across save-load; in fact it's basically impossible in MP if a remote client tries to save the game, because remote clients don't run an AI thread), or not letting the AI buy ships that would put it into debt (which would result in low-cap ships basically never being picked for guard-post-reinforcements).
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 Bognor

  • Hero Member
  • *****
  • Posts: 570
Re: AI low cap ships
« Reply #14 on: September 19, 2012, 08:29:28 am »
Yea, CPAs don't care about the strength of the unit, they just release what's available, on a one-for-one basis (partly because otherwise the CPA announcement would be made a liar: it doesn't know which ships will be available at launch-time, and it's already given you a literal number).  The AI did "pay more" to get those low-cap ships in the first place, though; whether it was from initial-spawns, initial-barracks, or reinforcements.
Hmmmmm....  So a canny player could soften up an upcoming CPA by pruning all the Blade Spawners and Stealth Battleships, while letting the Infiltrators and Lazer Gatlings be?
Your computer can help defeat malaria!
Please visit the World Community Grid to find out how.