Jump to content


Photo

AI building/attack logic - or lack of it


11 replies to this topic

#1 keraunos

keraunos

    Dominus et Deuculus

  • Members
  • 546 posts

Posted 06 March 2009 - 07:58 PM

With last release of PR, the best of all, paradoxially I got sick of FoC engine. All those splendid units that have their uses - and AI doesn't use them properly. The worst thing is that we can't really do anything about balanced fleets. It has to look like this simply becouse we don't have an exact formula (AFAIK, there is none whatsoever) and we can't force AI to build all the stuff in certain proportions.

PROBLEM
AI simply choses certain path (usually using AI combat power*cost factor), and then pursue it to the extreme. It's even worse with attacking behaviour - AI attempts to gain certain advantage over player point-wise, not composition-wise. That's why it seems for it a good idea to attack 30 ftr+bomber squadrons with 5 VSDs :( To be honest, that's the most annoying thing in FoC. No matter how good the mod is, how many and how well balanced units are, AI will screw this by bad builing/attacking decisions. It might build more or less all units (if you balance cost/combat power properly), but it will usually put them into the diffrent fleet.

SOLUTION
The only solution I see is to give AI option to build balanced fleets instead of single ships. It would limit our choices, but I can hardly see any other option. We'd have to group certain crafts together. Some examples: each
-TIE Fighter would have an escort of some TIE Fighters and TIE Targeters (later, more advanced TIE Fighters + TIE Bombers)
-Nova Wing would be accompanied by Gunboats
-Corvettes would have a squadron or two of accompanying fighters/bombers
-Frigates would have a corvette and some more fighters/bombers etc.

Prices would have to go up as well. Essentially it would give us "Combat Groups" that would give AI some more fighting chance against a player. It's too easy to defeat SSD with bombers - now think about SSD escorted by some ISDs (each spawning fighters)/Corvettes) :) Obviously we run a risk in here - destroying one ship would destroy entire group, but I think it's worth the effort.


SOLUTION IN PRACTICE
One solution I thought could be ideal - DS-I/II "Escort"command. However, it only works for units present in the beginning - reinforcing ships won't spawn another ones.

So the only option, usual one - spawn squadrons. We would have to create additional unit for each group that would spawn this entire fleet. And the fleets themselves shouldn't be too big (to give player some more variablility) - only much more balanced.

Final word - this could also help us remove GC lag by creating a squadrons of ships instead of single ones.


Thoughts?

#2 cpl0311

cpl0311
  • Members
  • 24 posts

Posted 07 March 2009 - 06:37 AM

I'm using spawn squadron on my ISD's. It would be easy to add corvettes in there, and add this ability to other ships. It's only a matter of calculating price and what units you want. Otherwise this would be a pretty good idea. The only question would be if the AI uses the ability or not, which you could just always ad as a default.

Overall not a bad idea though.

Also this doesn't eliminate the problem of the AI not building space colonies.

Edit: Merged.

Edited by Phoenix Rising, 12 March 2009 - 07:20 PM.


#3 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 12 March 2009 - 07:22 PM

At some point, I'm just going to have to scrap the vanilla AI and start over from scratch. The worst that could happen is that I'd be replacing old bugs with new bugs, so there's really nothing to lose.

#4 Tropical Bob

Tropical Bob

    title available

  • Members
  • 1,348 posts

Posted 13 March 2009 - 04:34 AM

At some point, I'm just going to have to scrap the vanilla AI and start over from scratch. The worst that could happen is that I'd be replacing old bugs with new bugs, so there's really nothing to lose.

But, of course, everything to gain.

#5 keraunos

keraunos

    Dominus et Deuculus

  • Members
  • 546 posts

Posted 13 March 2009 - 03:50 PM

Excellent idea :p I've tried to mod AI a bit earlier on, but ended up with weird behaviour so I gave it up :( With your dedication, I think it's really gonna be not only ultimate FoC mod, but also SW-game...

#6 Decay

Decay
  • Members
  • 71 posts

Posted 22 March 2009 - 08:34 AM

If you guys ever did remake the entire game AI, imo it would be most amazing, especially in skirmish games.

I've seen the computer upgrade to a lvl 3 Golan, yet still just pump out dreadnoughts and crappy fighters. Tis sad

#7 Karhedron

Karhedron
  • Members
  • 9 posts

Posted 23 March 2009 - 11:55 AM

First : Trying to 'throw away' the old AI and start anew sounds like some very hard work. Should anyone really try this : good luck and a lot of patience.

On to the squadron idea.
Would this mean that AI AND player would have to stick to those squadrons? Then I would not like it. I prefer to choose what type of ships I want. I might build a balanced fleet...or not. That would be up to me.

Next question would be what the AI would do with those squadrons. Bombers escorted by fighters sounds good on the paper. But has the AI separate units as well? If no...what would that combination do lead by the AI?
Would it send the Fighter/Bomber squad to throw some torpedos at capitals therefore having no fighterscreen at all? Or would it engage in dogfights with enemy fighters to protect its own big ships therefore crippling its ability to bring down the caps of the enemy?

Although I think the idea sounds good I am not too sure it will really work. And if it goes for player and AI I would not be willing to sacrifice my freedom of choice just for better balanced AI fleets.

Looking at the tremendously good job that was done with giving a lot of planets unique defense fleets that is as close as I think we can get to 'balanced' enemies with the engine we got.

So..good idea. But I don't think it would work and I guess I wouldn't like it better than now.

IMHO always implied..

Edit : Just thought of something else. I really like to play the Rebels somewhat like the rogues they were in the movies and books. So I might jump in with a small fast taskforce, do some damage and hyperspace back out before the hard-hitting enemies reach me. With that squadron thing it might become a tad too easy. You could destroy whole groups just by destroying the spawning ship. Destroying the escorts would do no damage at all because they would respawn. This might just be a personal preference in tactics but still...with that idea it would be totally overpowered or useless. Nothing in between.

Edited by Karhedron, 23 March 2009 - 12:02 PM.


#8 keraunos

keraunos

    Dominus et Deuculus

  • Members
  • 546 posts

Posted 24 March 2009 - 11:32 AM

First : Trying to 'throw away' the old AI and start anew sounds like some very hard work. Should anyone really try this : good luck and a lot of patience.

True. That's why I've never tried to mod AI :thumbsupsmiley:

On to the squadron idea.
Would this mean that AI AND player would have to stick to those squadrons? Then I would not like it. I prefer to choose what type of ships I want. I might build a balanced fleet...or not. That would be up to me.
[...]
Although I think the idea sounds good I am not too sure it will really work. And if it goes for player and AI I would not be willing to sacrifice my freedom of choice just for better balanced AI fleets.

Either this, or creating of two sepate 'games' - one for player vs FleetAIEmpire, one for player vs FleetAIRebellion. Neither would be difficult. I see your point and it's up to the player :p I could easily live with researching fleets instead of single ships as for me focusing on only few ship types is kind of cheating. After all both sides used what they had on hand, both fleets were really diverse - something that we see in the beginning, but not as campaign progress.

While the research system is great and shows progress of SW ships during timeline, a lot of research were done 'independently' of funding programs etc. I think I'd prefer scripted researches (slowly progressing through all the ship classes) with eventual faster research based on funding (research). Obviously, it's beyond FoC engine ;)

Next question would be what the AI would do with those squadrons. Bombers escorted by fighters sounds good on the paper. But has the AI separate units as well? If no...what would that combination do lead by the AI?
Would it send the Fighter/Bomber squad to throw some torpedos at capitals therefore having no fighterscreen at all? Or would it engage in dogfights with enemy fighters to protect its own big ships therefore crippling its ability to bring down the caps of the enemy?

Nah, after spawning the squadrons would behave normally. 'Fleets/squadrons' idea would essentially combat different AIs for strategic map and space combat. The problem now is - even if AI builds all the different ships (which is doable, but requires careful balancing), it's not making effective fleets with it. So what if AI builds 5 Bulwarks and 20 fighter squadrons, if Builwarks make separate squadron and attack independently? This is reasonable for FoC AI, as it only counts 'Combat Power', which is really high for Bulwark. FoC AI simply doesn't have certain scripts like 'include fighters/bombers/corvettes' etc., only vague 'combat power'.

Looking at the tremendously good job that was done with giving a lot of planets unique defense fleets that is as close as I think we can get to 'balanced' enemies with the engine we got.

True. My only point is I'd also like to have more fun fighting Rebellion ;) Now biggest challange are pirates, after this it's a walkover :(

Edit : Just thought of something else. I really like to play the Rebels somewhat like the rogues they were in the movies and books. So I might jump in with a small fast taskforce, do some damage and hyperspace back out before the hard-hitting enemies reach me. With that squadron thing it might become a tad too easy. You could destroy whole groups just by destroying the spawning ship. Destroying the escorts would do no damage at all because they would respawn. This might just be a personal preference in tactics but still...with that idea it would be totally overpowered or useless. Nothing in between.

Then it wouldn't be a mod for you, true. I have bigger fleets engagements in mind, and I prefer less canon viewpoint of the war (as always, history is written by the victors, so I consider Rebel numbers provided in books/movies part of the Rebel propaganda, and I don't believe they were so much inferior to Empire in terms of numbers ;) )

Mind that I'm mainly writing my impressions on first released version of 1.1 (the bugged one), as now I'm unable to play PR (weaker computer... for a while ;) )

#9 Tropical Bob

Tropical Bob

    title available

  • Members
  • 1,348 posts

Posted 25 March 2009 - 06:53 AM

You wouldn't even really need special campaigns. All you need is to put in some, if I'm correct about this, <Special_Case_Production> tags for the AI controlled players. It would add a bit to the file-size though, unfortunately.

Edited by Tropical Bob, 25 March 2009 - 06:54 AM.


#10 Karhedron

Karhedron
  • Members
  • 9 posts

Posted 26 March 2009 - 11:15 AM

Either this, or creating of two sepate 'games' - one for player vs FleetAIEmpire, one for player vs FleetAIRebellion. Neither would be difficult. I see your point and it's up to the player :blink: I could easily live with researching fleets instead of single ships as for me focusing on only few ship types is kind of cheating. After all both sides used what they had on hand, both fleets were really diverse - something that we see in the beginning, but not as campaign progress.


No. Didn't think about focusing on few ship types. My fleets are diverse most of the time.


Nah, after spawning the squadrons would behave normally. 'Fleets/squadrons' idea would essentially combat different AIs for strategic map and space combat. The problem now is - even if AI builds all the different ships (which is doable, but requires careful balancing), it's not making effective fleets with it. So what if AI builds 5 Bulwarks and 20 fighter squadrons, if Builwarks make separate squadron and attack independently? This is reasonable for FoC AI, as it only counts 'Combat Power', which is really high for Bulwark. FoC AI simply doesn't have certain scripts like 'include fighters/bombers/corvettes' etc., only vague 'combat power'.


Ahhh ok. I kind of thought of something totally different. Like mixed fighter/bomber squads and stuff like that. That sounds a lot better

Then it wouldn't be a mod for you, true.


Yap..seems to be that way. But bet I'll try it anyway should it be there someday :unsure:

I have bigger fleets engagements in mind, and I prefer less canon viewpoint of the war (as always, history is written by the victors, so I consider Rebel numbers provided in books/movies part of the Rebel propaganda, and I don't believe they were so much inferior to Empire in terms of numbers ;) )


[Rebel-Mode-on]
We don't need superior numbers. If we want to we can :
-blow up a Deathstar with 1 X-Wing
-destroy the Order of the Sith-Lords with 1 Jedi
-cripple a SSD with 1 A-Wing
-destroy the tractor beam of a Stardestroyer with 1 proton torpedo

Btw...I want all of this included in PR : The Red Edition :umad:
[Rebel-Mode-off]

Oh damn..it is already included. Now that I play Empire for once...10 Stormtrooper Squads annihilated by 1 Speeder in auto-resolve :p

#11 keraunos

keraunos

    Dominus et Deuculus

  • Members
  • 546 posts

Posted 07 April 2009 - 04:40 PM

Sorry, I somehow missed your post :p Not that I have too much too answer ;)

Yap..seems to be that way. But bet I'll try it anyway should it be there someday :grin:

I doubt I'm gonna create such a mod for PR. After all, he's right: he created this splendid system of upgrades to give us a choice. It's simply FoC AI that's too dumb to understand it :p Engine limitations, I'd say

[Rebel-Mode-on]
We don't need superior numbers. If we want to we can :
-blow up a Deathstar with 1 X-Wing
-destroy the Order of the Sith-Lords with 1 Jedi
-cripple a SSD with 1 A-Wing
-destroy the tractor beam of a Stardestroyer with 1 proton torpedo

Btw...I want all of this included in PR : The Red Edition :)
[Rebel-Mode-off]

Oh damn..it is already included. Now that I play Empire for once...10 Stormtrooper Squads annihilated by 1 Speeder in auto-resolve :laugh:

Lol. Kind of reminds me one of the strange examples in vanilla FoC - I was playing with Rebels (for once :p), wiped out entire Imperial force (huge battle) but I was too lazy to hunt single remaining TIE bombers squadron. Ok, autoresolve ;) And... I've lost untouched MC80 ;)

#12 Phoenix Rising

Phoenix Rising

    Beyond the Impossible

  • Petrolution Staff
  • 6,509 posts
  • Projects:Phoenix Rising
  •  Mod Leader
  • Division:Petrolution
  • Job:Mod Specialist

Posted 28 April 2009 - 11:20 PM

I've seen the computer upgrade to a lvl 3 Golan, yet still just pump out dreadnoughts and crappy fighters. Tis sad

That's not quite a bug per se... let's call it an "unintentional side effect". The problem in question is due to the size of the AI build queue - without an interface, the AI can queue up more units than a player (by my observation, this number is usually 10+). When the AI decides to upgrade the station (handled by a different script, but in the same queue), it keeps on queuing up units behind it (and, indeed, there will be some in front of it as well) - except they're still lower-level units, because the research hasn't been pushed through yet.

So it can take some time after the actual upgrade takes effect for the newer units to show up, but I assure you, they will show up. (The tactical AI really isn't half bad; it's galactic that's the problem.) As always, lower units can be built at higher levels and although I leave it up to the AI to decide what to build from all of its available options, it will make the "right" choices under normal circumstances (i.e., given enough money / units in play, the AI will build TIE Avengers over TIE Fighters).

If anyone feels like tinkering, I have a way of fixing this problem, only I'm not sure if scripting has a function to do it. All of this could be avoided if we could get the AI to flush its queue just before it decides to upgrade and just after it finishes upgrading. It'd probably go in AI_Plan_ExpansionGeneric_SkirmishUpgradeSpaceStation.lua (although you might have to delete the redundancy in TacticalMultiplayerBuildSpaceUnitsGeneric.lua).



Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users