The AI thread.

Actually, I agree with you… but it makes the simulation look terrible sometimes. It’s just kind of stupid to see all those missiles and plasma balls flying in different directions not hitting anything, not even coming close, not even firing in the direction of the enemy fleet. For me at least, it detracts from the beauty of space combat.

Please correct me if I’m mistaken about the nature of your argument, but there are times when (to paraphrase you) “firing at anything in range” can do more harm than good…

That lack of efficiency you touched upon can have impact on my intended battle strategy that’s anything but “very minimal”. To me, the effect is intensely frustrating personally and has frequently been a material setback for my forces when considered in larger terms of the overall progress of the battle. The AI is unable to discern that strategic scope; it only has governance over the tactical means to prosecute my strategy. That’s where AI mishandling situations in detail annoys the hell out of me.

Having an entire bomber squadron unleash its torpedoes on some lowly frigate in the enemy fleet’s forward picket line is just plain dumb. Worse still if it does so upon an opposing squadron of interceptor fighters. Practically everyone who’s played the game has seen that happen to them more than once.

A friendly unit of mine attempting to damage an enemy unit via a weapon that does happen to suddenly be in range and have no other “legal” target, but the gun system in question doesn’t have enough shield or armor penetration.

Unauthorized use of a gun system that’s suddenly being ordered to fire while well outside of its optimum range, despite still meeting the tactically possible but strategically wasteful or even near-useless definition of being “in range” of the weapon.

A gun system that I’ve intended for dedicated use against another class/type/threat level of target entirely, and the ship carrying it has all of its combat orders crafted exclusively with such in mind – the premature or delayed discharge of such guns (mass discharge, if we’re talking about an entire formation of friendly units here) can get that formation out of step with the rest of my overall fleet, contributing towards the weakness of my planned engagement.

I don’t expect the AI to think my strategy for me. That’s my job. I do expect it to not actively damage efforts to implement the result of my thinking.

Well it’s kinda nice when the heavy plasma ball hits the fighter.

Mind you I agree with Archduke Astro about firing at a nonsense target and then not having the next volley ready for the real target and dying after wasting your fighter torpedos on a single rocket fighter.

Berny

if we have fired more than 3 ineffectual shots at this target, reduce score by 0.5 I think I’ve found another problem.

Is there any “memory” to these scores? I’ve got some plasma frigates in a situation where they keep switching back and forth between two “easy” (large, armed, stationary) armored targets repeatedly, ignoring the small softer cruisers that are also in range. You can see the 3-shot process going like clockwork - the gunners get frustrated and swap from one tank to the other in a loop.

It’s only a short term memory thing. The reason for this is circumstances change. You don’t want a gunner to bounce 3 shots of an enemy shield, then later in the battle avoid firing at that same ship, even though its shields are now down.

I completely agree, but solving it is harder than it sounds. AI always has to be arranged around the worst case, to prevent deadlocks.
To you and me, with 30 years of human brain intelligence dedicated to a single tactical decision, its obvious that bomber A should not fire at fighter B, when target cruiser C is just out of range.
But…
How do we actually define When that is the case?
Is it when we are heading towards cruiser C? not neccsarily so. Both us and C may be very slow and far apart, we may have ample time. How much time? that depends on what C does next, on our speed now, and in the interim period. Are there frigates between us and C that will cross our path that may prove a better intermediary target? Does it depend on our chances of hitting B anyway, which depends on at least 15 different factors…

We could simply declare that if there is a better target C, then never to engage B, untilC is destroyed. But is that really true? What if C has shields we cannot penetrate? what if our engines are destroyed and we cant move? or if C actually can outrun us? Maybe C already has 10 bombers targeting it? But then what if incoming fighter squad D is certain to destroy those bombers anyway…

Very quickly such code can become spaghetti. I agree that improvements could be made to the current situation, especially regarding plasma and missiles, but it needs to be very carefully designed. Some missiles (anti-fighter ones) positively SHOULD be fired at fast moving enemies. It’s a nightmare… :smiley:

Couple things…

Shouldn’t that be ‘inside min or outside max’?

Shield disruptor as in the weapon? Or any weapon with a high shield penetration? Could that line work better when grouped with the other ignore clauses?

Is there a psuedo-code line for the protector order that I missed?

It seems to me that a computer can determine how likely a shot is to hit, just as easily it can determine how close the target is. This is actually part of the process of firing the weapon to begin with, so it seems to me that a gunner AI could easily determine the likelihood of hitting an enemy and opt not to fire the weapon if the chances of hitting are astronomically low, based on tracking speed, and the target’s size and speed.

It sounds as though the major concern on this thread boils down to effectiveness vs efficiency. Cliffski, I’ll have to see what I can do to help run through some logic cases. I bet there are several here that could help hash out the nightmare. Divide and conquer my friend. :slight_smile: Personally, I can live with retarded fighters a while longer if that allows you to get the campaign expansion out more quickly.

Incidentally, I had another episode of bomber mischief on Battle of Mexallon II (expert). I gave my bombers (experimenting with torpedo armed fighters) commands to ignore Fighters (removed the Fighter command), 99% focus on Frigates, 1% focus on Carriers, and added Vulture and Cooperative. I tried both with and without Stick Together. The bombers fired a volley at the incoming fighters and entered the range of the frigate - unready to fire. I understand why that part happens. Eventually the frigates were destroyed. The bombers proceeded to attack the cruisers as expected with one hitch - the bombers would repeatedly fire at fighters while looping around to fire again at the cruisers they were hovering around. Sometimes they appeared close enough to target the cruiser again but fired repeatedly at the pesky fighters. Needless to say my insubordinates all perished; otherwise, they would have received court-marshals.

The slow reloading/firing weapons are a problem, yes.

In this case though, I think it might be easier just to adjust the weapons to fit the AI better. The biggest culprits (megaton, torpedoes, cruiser missile) have long reloads, slow speeds and long burnout times - traits that didn’t get them used much even before the idle gunner AI change.

There’s also the second possibility of just special casing them. I’ve noticed EMP and disruptor weapons already never, ever fire at fighters. We could declare some of the missiles “heavy weapons” that can’t shoot fighters, period, and be done with it.

While it’s on my mind, fighters with the Rescuer order need to ignore other fighters. I think everyone can guess what happens when they don’t…

I’m not convinced. I use that command against enemy fighter waves in an effort to lose fewer defenseless missile frigates. Even my anti-fighter frigates need an extra hand every now and again. It appears to work depending on my fleet layout and number of craft.

Interesting observation. Perhaps a sub-proposal to add parameters to the Rescuer order, allowing the owning player to specify what sort of enemy unit size(s) constitute an activation threshhold for that order.

I’m really beginning to appreciate Cliffski’s statement about the optimizing logic behind the commands being a nightmare - there are so many possibilities. :slight_smile: The benefit of complexity is that experienced players are able to fine tune their fleets while the major deterrent is that new players are presented a monumental learning curve. I know I was a little overwhelmed when I first started playing, but now I am more familiar with it and look for the fine tuning. In the end, that’s what drives this game though - fine tuning your ships to squeeze out every last drop of honor possible. I’m wondering if the Campaign expansion will change that.

Isn’t this already part of priority in the decision pseudo-code?
the final step is multiplying everything by priority, so if you have 20% fighter and 60% cruiser, then Rescuer provides a bonus of +0.10 against fighters and +0.30 against cruisers. Perhaps if Rescuer had a bigger influence to begin with, the differences in priority might be more of a factor.

Maybe I should have explained. If you have a fighter squadron, and one member of the squadron is picked on by a cruiser, they other fighters will most likely go after said cruiser, even if they don’t have the Attack Cruisers option, or even the ability to harm the cruiser. Which will only start a frustrating loop. Fighter attacked by cruiser -> RESCUE -> Different Fighter attacked by cruiser -> RESCUE (even though it didn’t work the first time) The fighters get whittled down and do nothing. If the fighters ignore other fighters, whether it’s their squad or a different one, they might actually attack targets that are causing a direct problem to your bigger ships.

Yeah… I have no idea how this can happen according to the pseudo-code posted.

   if ignoring that ship class, ignore

Clearly not.

Further, the 1.5 score should be multiplied by x0% if there is no priority to attack that target, so I don’t understand how the cruiser in your situation could become a target over ANY fighters in the example you mentioned.

Is this an error in the coding (not operating by the rules of the posted pseudo-code), or am I misunderstanding the posted pseudo-code?

True. I believe they are proposing independently setting each priority parameter per command for flexibility. That way you can differentiate between a rescue against fighters vs a cooperative attack against fighters - both could receive the same bonus.

This situation is one discussed earlier in the thread. Currently the AI defines the target based upon what is in range of turret rather than target exists on map.

From Cliffski: “If no target is found, the whole thing is re-run ignoring classes, so we at least find some sort of target. This is the code for individual turrets, not the code that determines where to fly to.”

Hence the turret targeting is based upon turret range and not whether the ship class exists or not. Does that help?

Thank you. I was so dissapointed that Cliffski wasn’t focussing on the navigation AI that I completely misunderstood what he was saying when he talked about “re-running” ignore classes. Originally, I read that to mean it was a programming loop that was constantly ignoring other targets. I missed the whole second part of that sentence somehow.

Yes, that’s much more clear now. I’m not so sure I agree that it’s how it should be done, but at least I understand better what it’s doing.