Author Topic: AI War Beta 7.019-7.020 "Oops MkII" Released!  (Read 13121 times)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
AI War Beta 7.019-7.020 "Oops MkII" Released!
« on: April 11, 2014, 05:41:37 pm »
(Crossposted from this blog post)

This one is partly a hotfix to deal with a fairly serious AI bug I introduced in the previous version, but there was a fair bit of other work in the hopper ready to go out as well.

Not a huge release, overall, because we're basically in the last week before the April 18th official release of The Last Federation.  The AI thinks you should go take a look.  It'll watch your defenses while you're gone.

Speaking of the AI, some background on the main bug this release fixes:


Whenever AI threat ships (unlike guard ships, threat ships are free to attack you wherever and whenever they please) are on a planet there's a basic decision tree that gets checked repeatedly on the AI thread:

I) Is there an interesting human presence here?  Basically this means anything over a token force, or the presence of a human command station, or the presence of a human irreplaceable (fab, etc).

I.A) If so, are we seriously overmatched by the local forces, and have we been here long enough to run away?
I.A.1) If so, pick a random planet an run for it.

I.B) If we're not overmatched, do we seriously overmatch the local human forces?
I.B.1) If so, generally focus on knocking out any irreplaceable units and the command station (if any).

I.C) If we're pretty evenly matched, then let each ship pick the targets it's best against in an effort to win the fight.

II) But if there is no interesting human presence here:

II.A) If we're Special Forces:
II.A.1) Go to the currently designated Special Forces rally point (which could be its "waiting area" a few hops deep into AI Territory if there's nothing suitable, or it could be a sufficiently-important AI planet with human forces it wants to crush).

II.B) If we're Threatfleet (not just normal threat, but threat that got stuck waiting somewhere for over half an hour and thus joins the coherent Threatfleet)
II.B.1) Go to the currently designated Threatfleet rally point (which could be its "waiting area" a few hops deep into AI Territory, or it could be an AI planet under attack by human forces the Threatfleet thinks it can take, or it could be a neutral/human planet it thinks it can take)

II.C) If we're just normal threat, look at all the planets and sort them by a combination of Desirability (command stations and irreplaceables have various values of this) and Difficulty (based on the local forces there and the forces in the way from here to there), then get on the road to the best looking target.  Later on, at each wormhole, each ship will check whether it should wait before proceeding due to an unfavorable local strength balance.


And normally all this works pretty well.  Except when a certain boneheaded programmer (yours truly) is renovating the AI code and accidentally makes it so it thinks the answer to the question marked "I)" above is ALWAYS "no".

So the AI threat would get to the target planet, surrounded by hideously powerful human defenses protecting a pile of irreplaceables, and ask itself "is there an interesting human presence here?" ... "Nah.  Where to next, Bob?".

If I ever add that behavior back to the game as a legitimate AI Type, I'll probably call it "Inebriated".  Three sheets to the wind.  Yet strangely still effective in many circumstances.


In other news, the AI is now much smarter (theoretically, see above) about factoring in your mobile forces: specifically, when looking at a planet to see if it can win a fight there, it considers not just the local mobile and static human strength but also human mobile strength within 3 hops.  This makes it much more difficult to lure into attacking a planet with relatively light static defenses by just pulling your mobile stuff back to the other side of a wormhole, only to bring it back in immediately after the AI takes the bait.  There are a few nuances to when mobile human strength counts in this way, and some other new rules about how it evaluates "can I take that planet?" to help embolden the AI to attack on multiple fronts once it's in a serious fight with you anywhere.

There's also a few other changes in there, like MkV Spirecraft Jumpships becoming immune to Black Hole Machines, the Core Guard Post on-death exos now always spawn on the post's planet (making it less mandatory to split your fleet during a high-difficulty AI Homeworld assualt), and Remains Rebuilders are a bit better about prioritizing Energy Collectors and stuff currently in their range, etc.

Update: 7.020 hotfix for some performance problems (i.e. 10 second freezes, in some cases on some machines) recently introduced into the reinforcement logic.

Enjoy!

This is a standard update that you can download through the  in-game updater itself, if you already have 4.000 or later. When you launch the game, you'll see the notice of the update having been found if you're connected to the Internet at the time.  If you don't have 4.000 or later, you can download that here.
« Last Edit: April 12, 2014, 10:54:12 pm by keith.lamothe »
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 RockyBst

  • Full Member Mark III
  • ***
  • Posts: 219
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #1 on: April 11, 2014, 05:55:27 pm »
Excellent. Now debating whether I want to finish the Heroic game before the wave strength boost comes in, or if the remains rebuilders not flying into 4,000 ships while trying to rebuild a minefield would be better.

I'm seeing a bit of strange behaviour from the special forces currently, by the way. According to the logs they're positioned on a planet 3 hops away, and I'm not cutting the graph. However I keep getting carriers (plural - seem to come about 10/12 at a time) popping their heads in to one of my planets. I mean, it's one way to get 6,000 attack for nothing I suppose but it is a tad disconcerting.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #2 on: April 11, 2014, 06:21:51 pm »
Excellent. Now debating whether I want to finish the Heroic game before the wave strength boost comes in, or if the remains rebuilders not flying into 4,000 ships while trying to rebuild a minefield would be better.
AIW's development patterns lead to a very strange form of meta.

"Attacked by Fighters, counter with Missile Frigates"
"Attacked by Bombers, counter with Fighters"
"Attacked by Tackle Drone Launchers, counter with Forum Post Requesting Nerf"


Quote
I'm seeing a bit of strange behaviour from the special forces currently, by the way. According to the logs they're positioned on a planet 3 hops away, and I'm not cutting the graph. However I keep getting carriers (plural - seem to come about 10/12 at a time) popping their heads in to one of my planets. I mean, it's one way to get 6,000 attack for nothing I suppose but it is a tad disconcerting.
Do you have a save a few minutes (say 5 to 10) before such a popping in?
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 Vinraith

  • Hero Member Mark II
  • *****
  • Posts: 806
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #3 on: April 11, 2014, 06:41:05 pm »
Interesting stuff! The overall intent of the new "consider human strength in depth" logic is presumably to force players trying to pre-emptively clean out threat to do so on AI turf, rather than luring the AI into their own?

Edit: Duh, of course it is, because of the new scrap mechanics luring threat has become more than useful, it's become outright profitable. You had to do something to mitigate that. I am a little concerned about never-ending threat log-jams as a result of this, though. Of course, I suppose if you did something like what's being discussed in the counterattack post thread that wouldn't be as much of a problem...
« Last Edit: April 11, 2014, 06:49:51 pm by Vinraith »

Offline Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #4 on: April 11, 2014, 08:26:15 pm »
Did something change with the AI targetting priority for Enclaves?  I'm seeing some odd new behavior.  For example, an AI Zenith will spawn, beeline across the system passing through my fleetship ball, and target the Enclaves exclusively.  It will even bypass shooting at things it gets a bonus against to shoot the Enclaves.

I don't remember this happening before I picked up 7.018/.019, but of course I may have simply missed it before.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #5 on: April 11, 2014, 08:32:51 pm »
Did something change with the AI targetting priority for Enclaves?  I'm seeing some odd new behavior.  For example, an AI Zenith will spawn, beeline across the system passing through my fleetship ball, and target the Enclaves exclusively.  It will even bypass shooting at things it gets a bonus against to shoot the Enclaves.

I don't remember this happening before I picked up 7.018/.019, but of course I may have simply missed it before.
I didn't change anything specific to Enclaves this time, nor with Zenith Starships.  Not sure what would have triggered that compared to a few versions ago, unless it's just a side effect of the code being cleaned up.  Was it a really stupid decision on the AI's part, given the tactical situation?  Or just unusual?
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 Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #6 on: April 11, 2014, 08:41:59 pm »
Did something change with the AI targetting priority for Enclaves?  I'm seeing some odd new behavior.  For example, an AI Zenith will spawn, beeline across the system passing through my fleetship ball, and target the Enclaves exclusively.  It will even bypass shooting at things it gets a bonus against to shoot the Enclaves.

I don't remember this happening before I picked up 7.018/.019, but of course I may have simply missed it before.
I didn't change anything specific to Enclaves this time, nor with Zenith Starships.  Not sure what would have triggered that compared to a few versions ago, unless it's just a side effect of the code being cleaned up.  Was it a really stupid decision on the AI's part, given the tactical situation?  Or just unusual?
A Mk III Zenith Starship vs a bunch of Mk I triangle ships, Mk I starships + riots, and Mk I+II Enclaves is a fight the Humans win, but it killed both Mk I Enclaves and almost a Mk II.  It didn't kill a single fighter, bomber, or frigate.  It wasn't shooting at the drones, either.  Full focus fire on the Enclaves.
It wasn't stupid, since it did kill 2 enclaves, and everything else the AI had in that system was pretty much dead (it was part of a Raid Engine wave to a neutered planet where everything else died fast).  But it was a very determined attack.  I saw similar behavior (beeline Enclave targetting) from some other AI ships as well during other attacks, but nothing quite so obvious.
I seem to remember the topic of raising Enclave targetting came up in some threat a little while ago, but I didn't think it had happened - so I asked.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #7 on: April 11, 2014, 09:09:46 pm »
I seem to remember the topic of raising Enclave targetting came up in some threat a little while ago, but I didn't think it had happened - so I asked.
Yea, I'd thought of having it do something like you describe, but didn't actually implement it.  In general I don't think there's a lot of juice to squeeze from clever tactical (within-one-planet's-fighting) tricks on the part of the AI as the human will always have a much better idea of the actual situation and how to respond to it.  So I focus mainly on how the AI picks its fights, and on tuning up its overall tactical efficiency (without getting too special-case'y).

Anyway, I'm not surprised that you'd see behaviors like a powerful individual unit beelining an important unit to kill it, but I am surprised that you wouldn't have seen it until now.

To clarify, was the Zenith actually not firing at all before it got into range of the enclaves?  As in actually leaving a loaded weapon unfired?  That shouldn't be possible for any military unit beyond a few seconds (can take a moment to get a target list in heavy fighting), as even if the AI thread doesn't give a target the main-thread's logic for that unit should pick one.  And there actually is no "hold fire" command that the AI can issue.  Its guns have no safeties, you might say.
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 Toranth

  • Hero Member Mark III
  • *****
  • Posts: 1,244
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #8 on: April 11, 2014, 09:27:32 pm »
I seem to remember the topic of raising Enclave targetting came up in some threat a little while ago, but I didn't think it had happened - so I asked.
Yea, I'd thought of having it do something like you describe, but didn't actually implement it.  In general I don't think there's a lot of juice to squeeze from clever tactical (within-one-planet's-fighting) tricks on the part of the AI as the human will always have a much better idea of the actual situation and how to respond to it.  So I focus mainly on how the AI picks its fights, and on tuning up its overall tactical efficiency (without getting too special-case'y).

Anyway, I'm not surprised that you'd see behaviors like a powerful individual unit beelining an important unit to kill it, but I am surprised that you wouldn't have seen it until now.

To clarify, was the Zenith actually not firing at all before it got into range of the enclaves?  As in actually leaving a loaded weapon unfired?  That shouldn't be possible for any military unit beyond a few seconds (can take a moment to get a target list in heavy fighting), as even if the AI thread doesn't give a target the main-thread's logic for that unit should pick one.  And there actually is no "hold fire" command that the AI can issue.  Its guns have no safeties, you might say.
The Zenith starship may have fired at the drones as it approached.  I know that I had 96 of each triangle ship before it arrived, and I had 96 of each afterwards as well.  Drones are a little hard to keep track of, of course  ;)
Normally what I'd see is that ships with anti-Heavy bonuses would attack the Flagships and Riots first, since they are usually closer, before eventually moving on to the Enclaves.  I just finished my last game yesterday, though, and it already advanced 25+ hours a few weeks ago, so there were lots of Riots, Shieldbearers, etc, in my fleetball at the point I upgraded.  I wouldn't have noticed that behavior at that point, because any single starship probably would have been unable to kill an Enclave before being killed.  In this new game, I've still got only one planet and a very small fleet, so it may just be the behavior is more obvious now.

Glad to hear that there's no special targeting implemented against Enclaves, though.  Losing a Merc Enclave is already bad enough - if the AI got smart about it, it'd be very painful.
Is there some against Munitions Boosters?  I did notice last game that my Mk Vs always seemed to die first in the fleetball.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #9 on: April 11, 2014, 09:57:27 pm »
Ok, sounds like reasonable behavior, then.  It's possible that some of my cleanup that went into this version unblocked some logic added earlier.


Btw, if you're ever curious about the AI's targeting decisions for a specific unit you can:

0) Find the ship and situation you want the info on.  Getting a save at this point is preferable.
1) Press F3 to get debug info.
2) Mouseover the ship in question; the little tooltip that pops up next to it will have some numbers; the first number is its "FGObjectNumber" (foreground-object number)
3) Enter this in the chat window (like any other cmd or cheat, but this doesn't require cheats-enabled) : "cmd:log ai for unit,1234" where instead of 1234 you put the number from step 2.
4) In the RuntimeData directory, check LogicLog_AILogicForIndividualShip_AIThread.txt for a narrative of what it's been thinking, including its main targeting choices (the main thread will still do "target of opportunity" fire if the main target can't be shot at yet, but that's less important)
- that log will continue to update even while the game is paused (runs on the AI thread); it's therefore often useful to copy the log to another location and then inspect the copy.

Not that I expect players to pour through a bunch of semi-english, but if you're just really curious about a particular behavior, there you go.  I can offer explanations of logs if necessary.


Is there some against Munitions Boosters?  I did notice last game that my Mk Vs always seemed to die first in the fleetball.
It's possible there's some such logic from years ago.  I don't recall adding such.  The AI does have a preference for shooting things that actually die when shot (as opposed to, say, Zenith Starships).
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 Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #10 on: April 12, 2014, 02:23:05 am »
The Last Federation will be released on april 18th? That's my birthday. Cool.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline Histidine

  • Hero Member
  • *****
  • Posts: 581
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #11 on: April 12, 2014, 10:34:29 am »
What happened to the Oops MkI?

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
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 SapphireSage

  • Newbie
  • *
  • Posts: 7
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #13 on: April 12, 2014, 12:46:13 pm »
Regarding the starship for enclaves thing, I noticed that starting from 1 or 2 patches ago all starships and bombers on a planet would make a beeline toward my enclaves and MSDs when they are deployed. I had to use my main starship fleet to defend the enclaves and MSDs from the zerg rush before moving on to the guard posts otherwise I would potentially lose a couple of enclaves or MSDs. Still, I think its a bit better then when the Starships focused those oh so important drones and were ignorable.

Offline ZaneWolfe

  • Sr. Member
  • ****
  • Posts: 272
Re: AI War Beta 7.019 "Oops MkII" Released!
« Reply #14 on: April 12, 2014, 03:13:12 pm »
I've not see such behavior, units preferring to rush Enclaves and MSDs rather than deal with drones and the like, but it could simply be a numbers issue in my case. I put my Enclaves and MSDs together, and back them up either Spire Blade Spawners, TDLs, or the LTFs. Meanwhile the MSDs are pumping out Nienzul Railpods as fast as they possibly can.  (300% Econ backed Mobile Railpod Cannons deal a LOT of damage. Especially with 2 HWs) Thus while I do see units rushing toward them, that is probably because all the firepower is coming from their direction. I'll try and pay more attention, but most things don't get close enough to threaten either Enclaves or MSDs that isn't an Exo. And those have entirely different targeting priorities than most things.

I can't test right now since I'm working, but if anyone else uses MSDs and Enclaves together, can you see what happens when you separate them? Which does the AI go after? The Mobile Unit Hose or the Elcaves?