Enemy AI Enhancement


Smarter biter AI with adaptive resistance, breach reinforcement, scheduled raids, wall regen, and overhaul-mod compatibility.

Overhaul
a month ago
2.0 - 2.1
2.51K
Combat Enemies

i Continuation of a locked thread (sorry)

15 days ago

Relevant portion of the last message:
"Which integration adds the nests on the other planets? Smart Enemies does not populate those planets with nests. Please send the mod list, versions, and exact commands used for the redeems."
The nests on other planets weren't from native generation, chat could randomly spawn a few of them in a range around the player, and the rest was from natural expansion. The 2.1 changes are brutal.
Mod list: https://pastebin.com/HsBRs5Dz
Versions: Mostly all up to date, but a few were ported by the guy, somebody in the community, or held back slightly to avoid breaking things.
Exact (relevant) command used: "/sc remote.call("smart-enemy-ai", "force_breach_ping", game.players[1].position, game.players[1].surface.index)"

Sorry for taking so long, he kept forgetting it was a task or mentally setting it as complete when the overall factorio state changed. We won (chat) btw, so the save can be provided if you want it.

13 days ago
(updated 13 days ago)
  1. Moving away defeats the breach request

The command targets the position supplied when it runs. The attack does not follow the player.

  1. Stompers and strafers stand idle

Current breach searches select entities of type "unit" and exclude pentapod names. Stompers and strafers use "spider-unit". Support requires more than a name filter change.

  1. Rapid chat requests have little effect

The current code rejects another breach request while one job remains active. Controlled squads also have a 30-second recipient cooldown. The supplied command does not display whether the request succeeds.

  1. Enemies approach through the same defenses

Breach commands give recipients one destination. Factorio selects their paths. The mod does not assign separate approach routes.

  1. Raids repeatedly attack from one direction

The code can reuse a previously selected nest for the same target. This could explain the observation, but the report does not establish a defect. Previous selection does not mean previous combat success.

  1. More Enemies at 11× does not produce equivalent raids

Raid Size is a own setting and not influenced by other mods.

  1. Raid size needs an in-game control

This control already exists. Set Raid Intensity to Custom, then adjust Raids — Size (Custom).

These points describe the current source. Exact versions and a save from before the reported behavior are necessary for further checks.

12 days ago

What reported behavior specifically (so I can know if the targeted save is possible to retrieve), how do you want me to give you the save, and what kinds of exact versions. Exact version for EAI, game version, all entity mods, what?

12 days ago

I was able to track all requests down.
For your requests:
Split Raids:
Possible but would make raids weaker.

Track player position:
Not intendet as Raids have a cluster of Baseparts and attack those clusters. A player tracking would need repeated pathfinding for the palyer each second for each group in a raid thats permanent ups impact as paths can no longer be stored. Thats also why attacks came all from one nest. The planet was simply to new. rest of the requests are answered in the message before.

WHat you need is a STreamer mod with extensive functionallity for the Community to play with the streamer. My mod Commands are more for debugging reason and the mod design is for longer games 200h+.

11 days ago

Oh, he loves the mod itself for its intended purpose, the main concern was pentapods and wrigglers (and arachnids) ignoring other raids+breaches, and breaches resulting in the biters ignoring everything else. Thank you for responding though. And he has a few other mods and commands to enable all other behaviors, so all that was a real concern was those 2, while everything else were merely incidental requests that may or may not have been possible. Raids were never intended to be used on the player, merely breaches.

6 days ago

Balancing for pentapods and wrigglers is a future feature as i have to develop a whole new mechanioc and balance it :(

Will be interesting to see how you manipulate their AI.

3 days ago

Its not about manipulating its more about how big should a raid be at diffrent evolution stages and how many should i send

2 days ago
(updated 2 days ago)

Oh really? In all my other conversations with people I got the impression it was quite a lot harder to manipulate pentapods than biters/similar units, though it was potentially more quite different, instead of quite difficult. Not quite sure (consider the alias). Well, good to know. Certainly can't be similarly sized, and with gleba how it is you have quite a lot more considerations to make regarding targeting... Here's an odd idea, how about instead of direct unit count considerations, raids target a total cumulative health pool, with each units' contributed health being calculated as something like (unit health^.96) (Or just plain old linear scaling) such that you can guarantee fairly consistent raid sizes for low evo and low unit type variety, but for high evo (or chaos planets) it's self balancing, but not a simple 1 behemoth = x smalls correlation. I'm sure a little bit more complicated math and faster scaling raid target curve would make the balance more reasonable than this basic suggestion, but I'm sure you get the thought. High health pools scale addition to the pool less than low health pools, or similar. You get it. Not an important addition. Would raid frequency also be a factor that should scale differently on gleba?

TLDR (because you really don't have to): Take none of my actual math suggestions. The devastation of stompers makes any scaling relatively moot, as "fair" numbers are painfully high still. A collective health pool with no individual unit contribution scaling seems to be the most useful/useable. If this is a good idea at all.

On second/continued thought, assuming nominal 1000 biters/eq at 100% evo on nauvis, the spawning probabilities are roughly as follows:
Behemoth - 37.5%, Big - 50%, Medium - 12.5. Assuming a 50/50 split between biters and spitters, which is likely not the actual way raids are done, this would result in a cumulative health pool of nearly a million, at 995312.5 (wow that's a ton) and an average health per unit of 995, so we have our data. At 100% units of health 995, whatever equation is used should be almost 1k, and .......... yada yada, doesn't actually matter. After 3 hours of casual work because I couldn't let it rest, turns out no math is needed, and just allocating a pool with no health scaling is probably the best option. At 100% evo with a pool of that, linear says throw (at most, 100% stompers) up to 66 big stompers (and nothing else) while all my moderately useless math said was 73. Both of those numbers are catastrophic. Luckily those numbers are decreased a lot with the inclusion of "squishy" strafers and wrigglers, though I can't get the exact numbers from the wiki, I'd assume the average is around low 4k, high 3k, meaning 260 with linear, 300 with the silly exponential, most of them wrigglers and strafers. Again, devastating numbers, but survivable at the time 100% evo is achieved. So, disregard any math suggestions, basic is best it would seem. At most, a simple exponential of x^.99 with a cap for big stompers. Or maybe the curve itself changes with evo. Eh. Not worth your time to worry about unless it's actually useful.

New response