Author Topic: making AI better  (Read 5421 times)

Offline sol_ilya

  • Newbie Mark III
  • *
  • Posts: 38
making AI better
« on: March 12, 2012, 10:17:34 am »
There is one AI flaws - I enraged entire planet and retreat. Threat is huge and AI ships are IV or V. But they do not enter my planet. I place a lot of turrets and fortress. move my fleet away from planet and all AI ships enter into trap. I immediately return my ships back and easily finish them. AI in this case too predictable. My suggestion is - make random time when AI fleet enter the planet. They can still enter immediately after my fleet retreat or maybe wait 30 seconds, 1 minute, 2 , 5,10,15,30. hour or endlessly. That looks liike - you get your fleet away, ai do not attack. You wait one minute and send you ships to somewhere else and when you ships run away far away that ai ships makes assault. That ai logic shall works something like this: ok they gone but let them gone enogh far away so they will be late to return and help in defence.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: making AI better
« Reply #1 on: March 12, 2012, 10:36:19 am »
Yea, the whole "baiting" of freed ships trick has been known for a while. There has been some higher priority stuff going on though, so it hasn't been looked at yet.

A randomized minimum time to wait like you suggested seems like a good idea. Also, a randomized minimum time to wait to enter after the planet becomes "eligible" to enter is also good.

Also, how about if after waiting outside a wormhole for N amount of time, a ship has the possibility of choosing a new planet to go after (which may be the same planet again)? This would also help spread threat around.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: making AI better
« Reply #2 on: March 12, 2012, 10:38:46 am »
Oh, and there has been suggestion to make the AI consider the firepower (or possibly some fraction of the firepower) of the mobile miltary on non-AI planets adjacent to the planet they are trying to enter.

Offline Catma

  • Jr. Member
  • **
  • Posts: 51
Re: making AI better
« Reply #3 on: March 12, 2012, 12:33:49 pm »
I was under the impression that the AI would sometimes retreat when local firepower spiked, and that the degree to which it would do this depended on the difficulty level. I haven't seen a significant amount of that, but I am only in the 7s yet, for difficulty.

While we are on the general subject, I would like to have to deal with AI scouting. I don't like that the AI is omniscient. The AI should make good decisions based on the info it has, giving it the advantage in a fight. But, the only way to make this balanced would be to have the player be able to disrupt that info.

However, there are a number of problems with this from a both a raw design perspective and from considering the existing game. AI scouts would be problematic both because of the way cloaked units work, and because it might perhaps give the player too much power. Maybe there could be structures that analyze the situation in surrounding systems (acting as cross-system scouts) to get around the cloaking problem. And maybe these units generate AIP when destroyed...
« Last Edit: March 12, 2012, 12:46:46 pm by Catma »

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: making AI better
« Reply #4 on: March 12, 2012, 12:39:10 pm »
The AI does retreat, but there are a few rules. One, the ships on the system have to be overpowered by a certain ratio. IIRC, the ratio depends on difficulty.
Also, a ship must be on a planet for at least three seconds before it considers retreating.

And finally, many times, they will try to escape, but cannot due to tractor beams or something. Many early game waves will try to retreat and all of them fail to due to tractor beam turrets.

Offline Nodor

  • Sr. Member
  • ****
  • Posts: 254
Re: making AI better
« Reply #5 on: March 12, 2012, 01:57:51 pm »
Neinzul preservation wardens have been forcing me to place force fields over wormholes for a long time.  (Since only a force field over the gate prevents them from running away and endless spawning more crap - and 10+ sitting in a system and spawning crap makes taking stuff... more annoying than necessary.)

Also, retreat tends to happen when stuff is mostly toast.  i.e. the last 50 bombers pulling off the force field/command station after the wave of 1K+ is almost crushed by my substantial fleet.

If your command stations are at the very edge of the map (thanks to the new gravity well graphics) retreats become a) more likely to fail and b) more noticable.

I have also had waves arrive and retreat 3 seconds later. ... say if I had a 24 shipyard spire fleet force (with dreadnaughts) on the other side of the planet.


Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: making AI better
« Reply #6 on: March 12, 2012, 02:07:38 pm »
Neinzul preservation wardens have been forcing me to place force fields over wormholes for a long time.  (Since only a force field over the gate prevents them from running away and endless spawning more crap - and 10+ sitting in a system and spawning crap makes taking stuff... more annoying than necessary.)

Also, retreat tends to happen when stuff is mostly toast.  i.e. the last 50 bombers pulling off the force field/command station after the wave of 1K+ is almost crushed by my substantial fleet.

If your command stations are at the very edge of the map (thanks to the new gravity well graphics) retreats become a) more likely to fail and b) more noticable.

I have also had waves arrive and retreat 3 seconds later. ... say if I had a 24 shipyard spire fleet force (with dreadnaughts) on the other side of the planet.

I think what is happening is that the AI is checking for "should I retreat now" too infrequently. So while it is correctly recognizing that the attack has failed and it should retreat, the time between any two checks is too long for prompt responce, giving ridiculous situations like those above. I'll need dev confirmation on that though.

Also, IIRC, units that the AI considers "bomber like" (units with a good bonus against structural) are less likely to retreat, and more likely to just "bum rush" the command station. I believe bomber units have a different cutoff for retreat than the other fleet ships, so they will stick around longer. The reasoning being that if they can take out even one forcefield, it is worth the death of many bombers. Given the situation you described, it looks like that alternate cutoff is too extreme. Bombers should be more aggressive and retreat later than other units, but not that late. I will also need dev confirmation on this though.


As for the "command station" away from wormholes thing, that is actually a good strategy for preventing successful retreats. You'll notice similar extra losses of your fleet when you have to target stuff away from wormholes.

Offline Shrugging Khan

  • Hero Member Mark III
  • *****
  • Posts: 1,217
  • Neinzul Y PzKpfw Tiger!
Re: making AI better
« Reply #7 on: March 13, 2012, 09:28:53 pm »
1. Let the AI take into account the strength of mobile military units on adjacent planets, IF the AI has scouting units on those. (Yep, I want scouting for the AI)

2. After a random (long-ish) amount of time spent sitting at the wormhole, waiting in vain...all mobile threat units in the galaxy gather together to form an impromptu strike force. Cue Exo SF logic.
The beatings shall continue
until morale improves!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: making AI better
« Reply #8 on: March 13, 2012, 10:05:25 pm »
1. Let the AI take into account the strength of mobile military units on adjacent planets, IF the AI has scouting units on those. (Yep, I want scouting for the AI)

Still on the fence about the AI scouting thing, but they should at least take into consideration some portion of the hostile, mobile firepower on planets adjacent to the planet they are planning on entering.

2. After a random (long-ish) amount of time spent sitting at the wormhole, waiting in vain...all mobile threat units in the galaxy gather together to form an impromptu strike force. Cue Exo SF logic.

That seems a bit harsh, and too easy to form a "bottleneck" and trick the AI into entering a "trap".

How about special forces units and freed units that have not yet decided which planet to attack/stalk are more likely to choose planets via wormholes with lots of other units already "stalking" it, with preference towards large groups of "stalking" units or groups of "stalking" units that are closer to gathering enough firepower to safely enter the planet?

Again, it should be randomized (though a weighted, "intelligent" randomized), and not just a "grab everything" or "concentrate into one location" choice. As Chris has posted about his lessons with AI, just always going for the "greedy" approach tends to make the AI too easy to manipulate.

For this to work effectively though, the AI needs to start taking turrets a bit more seriously
Also, the "stalking" behaviour of special forces ships needs to be looked at. Right now, they are not waiting for as much build up as they should be.