Ryat Ryat

AI Improvements

AI Improvements

Yarlen has come out and stated that AI will not be open to modding. However, he did say that they would like suggestions for improvements. Even suggested a new thread for it.

https://forums.sinsofasolarempire.com/410061/get;2979589

So I figured I might as well getting it going.

AI Improvements

1. Better capital ship building selection.

2. Better building placement. Especially Starbases and other defenses.

3. Better tactical abilities such as handling enemy starbases like going around instead of suiciding on them.

4. Better autocasting

5. Better ability targeting. No 100 Utility Cruisers focused on one ship.

6. Better prioritizing of targets. Siege Craft vs others. Trade ships vs others. etc.

7. Better AI expansion.

8. Sliders? Maybe?

9. Better scout pathing. Avoid double backing and pirate bases.

10. More commands to give to AI
      a. Colonize planet

11. Control over whether or not AI's can build super weapons.

12. Better researching

Thoughts? Other recommendations?

75,520 views 46 replies
Reply #26 Top

Perhaps initial capital ship choice  for AI players could be based on personality?  Aggressive ones would favor carriers first and then battleships or siege caps while eco and researcher personalities would favor colony and support caps (maybe just colony).   

I haven't paid close enough attention to see how much it tries to do this already as I always play against random AI opponents.  I should probably pick a specific type to play against it and see.

Of course, part of the trick would also be to simply make some of the under-performing capital ships (and abilities) more viable in general and as starters in particular, and and have the AI choose abilities that scale with what stage the game is in, esp given the new ability levels.  (What if each ability were geared toward early, middle, and late game and they all had one of each?  That's a separate idea entirely, though.)  

 

 

Reply #27 Top

I think they already do this, I like to set races with the traits they are made for (e.g. TEC Ag/Fort/Ec, Vasari Ag/Re, Advent Re/Fort (Harder to figure them out)) And generally the aggressive ones attack me with carriers and dreadnoughts early while fortifiers have a support cap ship to start.

What the AI needs is better and more varied deployment, I'm tired of fighting a huge battle over a backwater station while one of my terran planets sits undefended, continually scouted by the enemy but not attacked because the computer threw everything at that fortified dead asteroid (only thing they're good for anyway)

Reply #28 Top

Possible improvements to overall fleet engagement strategies of the sort you're describing pale in comparison to the AI's tendency to suicide all of its ships towards your closest starbase. I think fixing that should probably be the first thing to be fixed. 

But if the AI didn't starbase suicide, it should definitely then think about which planets would actually be worth attacking. As it is now, it doesn't really matter that much because they'll all easily die to a SB.

I have noticed an interesting (good) tactic the AI uses on a not-uncommon basis: if you send your main battle fleet towards one of its planets, sometimes it will immediately send 2 or 3 siege frigates to your planet on the other side of the phase lane, which can do a lot of damage if you aren't prepared.

Reply #29 Top

2. Better building placement. Especially Starbases and other defenses.

Also, making the AI prioritize building repair platforms over turrets would be nice, or at least making them build some, as currently they rarely if ever do.

3. Better tactical abilities such as handling enemy starbases like going around instead of suiciding on them.

One little thing that could help : make the AI highly prioritize attacking construction frigates. As it is now you can build anything you want while it's attacking you.

(maybe making militia ships not do that so the turret trick still works ? :)... )

Reply #30 Top

Here's my problem with the devs simply asking us for AI improvements: the only way we will ever be satisfied with the AI is if IC has a dedicated 3-4 man team focused just on making better AI. And this seemingly has never happened in the history of PC games.

 

Think about some of the best AI in PC games. Supreme Commander: it's not the default AI, it's the modded Sorian AI. Same thing with Age of Empires 2 (the modded AI is incredible). Age of Empires 3, which has terrible AI, was hardcoded in. Yet an ingenious programmer found a way to use scripts and still somewhat improve the AI with the Draugur AI, and a ton more work than if the AI were open.

 

Every single time the AI is moddable, it will always turn out better that the devs of any PC game can make it. Why? Because there are people out there who not only want better AI, but can make it and are willing to put in more hours than even the devs to do so. Unless IC can promise to implement all of the changes, then we as a singleplayer/co-op community would be better served by having an open AI. Either that, or a collaboration with interested AI modders and the devs. The community needs to do the work, because I've never found devs who could spare the time to make an AI actually use all of the stuff and WELL in a game that suppers online multiplayer. Why? Because then all the loyal fans on the forums have to do is say "play online" to those asking for better AI, and the developers are forever excused from actually improving the AI.

 

EDIT: My apologies at coming off so negative. But I've simply not seen an actual desire to improve the AI.

Thread from 2 years ago: AI suiciding on starbases, https://forums.sinsofasolarempire.com/362085

Guess what: 2 years later, the AI still suicides on starbases.

The AI was suiciding its caps since 1.0. The AI still does not make rational capital ship choices: since 1.0.. So it might have helped if, when Yarlen suggested this thread be made, he prefaced it by saying: "recommendations other than those made in the past 3 years". Because I can dig up an awful lot of "AI improvement needed" threads. So I think there's a larger problem going on here than just the devs being unable to use the forum search feature.

Reply #31 Top

They never asked for AI recommendations then, either.

 

:fox:

Reply #32 Top

Dawn of Victory is handcuffed to no end by the hardcoded AI, and they have resorted to making the mod multiplayer only because of it.

Reply #33 Top

I never heard that, it looks like such an awesome mod, but I don't have enough bandwidth for MP so there's yet another reason I wish they'd open the AI.

While we're asking for stuff we can't have, I want a way to queue commands without the ships executing them until I press the "go" button

Reply #34 Top

Quoting AdmiralAckbar42, reply 33
While we're asking for stuff we can't have, I want a way to queue commands without the ships executing them until I press the "go" button

Pause button then shift click your targets. Do it all the time.

Reply #35 Top

Pause button? The only way I can figure out how to pause is to open the menu

Reply #36 Top

Pause is a key on your keyboard. It says "Pause/Break" on my keyboard, and it's on the top right.

Reply #37 Top

For some reason, I am unable to chat while the game is paused. Does anyone know if this is a bug or is by design?

Reply #38 Top

AI gets a little too crazy with super weapon building. Wouldn't mind that being controlled better.

Reply #39 Top

Quoting Ryat, reply 38
AI gets a little too crazy with super weapon building. Wouldn't mind that being controlled better.

What the heck? I've yet to see them build one superweapon since 1.3. What settings are you playing on?

Reply #40 Top

Amazed this hasn't come up. Make the AI research with a modicum of intelligence. The AI beelines anything that allows them to build/do things (Except race specific tactical buildings and PJIs) and fleet supply, and that's it. It will only ever research anything else, even such critical things like phase missiles or pacts for all the envoys it loves, if it's fleet supply is filled up. And since it maxes fleet supply and loses ships so fast...

I've found that the AI actually does put abilities on starbases, for example. It just doesn't research them.

 

:fox:

Reply #41 Top

Agreed. Research is sometimes hit or miss. I have seen AI set to research sometimes research everything and sometimes some weird pattern I don't really understand.

Quoting GoaFan77, reply 39

Quoting Ryat, reply 38AI gets a little too crazy with super weapon building. Wouldn't mind that being controlled better.

What the heck? I've yet to see them build one superweapon since 1.3. What settings are you playing on?

Usually Unfair with the DS mod in place. I am also using a map that makes resources less of an issue so maybe that allows the AI to go crazy. It can get wild when I do my 6 player test. About 5 AIs firing super weapons (they usually have about 2 to 3 each) all the time.

Reply #42 Top

Quoting Kitkun, reply 40
Amazed this hasn't come up. Make the AI research with a modicum of intelligence. The AI beelines anything that allows them to build/do things (Except race specific tactical buildings and PJIs) and fleet supply, and that's it. It will only ever research anything else, even such critical things like phase missiles or pacts for all the envoys it loves, if it's fleet supply is filled up. And since it maxes fleet supply and loses ships so fast...

I've found that the AI actually does put abilities on starbases, for example. It just doesn't research them.

Well generally, it's not a horrible idea to research only ship designs and useful things like ice/volc colonization, although getting a few more extra techs (like phase missiles) when you have the funds is smart. So a little tweaking in this area would definitely improve AI behavior.

Then again, with the huge bonuses the harder AIs get, they might as well be researching literally everything.

Reply #43 Top

The higher level AIs could afford to do so, though. Just it researches it's way into massive upkeep so fast that even the Vicious AI can mostly just replace it's losses. It's actually quite a lot harder if you force it to research stuff more intelligently.

 

:fox:

Reply #44 Top

Quoting Kitkun, reply 43
The higher level AIs could afford to do so, though. Just it researches it's way into massive upkeep so fast that even the Vicious AI can mostly just replace it's losses. It's actually quite a lot harder if you force it to research stuff more intelligently.

I was thinking about that too. I'm hoping we'll eventually have (or be able to mod) an AI which'll be able to beat a good human player while only getting a moderate bonus in difficulty income... but that doesn't seem likely at all, unfortunately.

Reply #45 Top

Quoting Wrath89, reply 44
I'm hoping we'll eventually have (or be able to mod) an AI which'll be able to beat a good human player while only getting a moderate bonus in difficulty income... but that doesn't seem likely at all, unfortunately.

Nope, this is the best we can do.

Reply #46 Top

What's so hard about giving the AI the ability to 'see' those range circles you see when you hit alt? Then, each circle is weighted based off the strength of the object. So a starbase has a heavy weight, and a mine has a light weight. It only has to do this for static defenses, such as mines, turrets and starbases, right? If the fleet > than the weight, then go ahead and fly on through, otherwise the AI would be forbidden from intentionally going there. Will allow unintentional movement as we humans have those problems as well.

It wouldnt even be computationally expensive. you just precompute the weights for each defensive structure and add it into the game (heck, you could let these be moddable. They would be constants read from a file). When a ship phases in, it builds up the fleet's 'weight' to compare it to (this should be the only real thing done on the fly [Also note that an 'AIweight' variable could be added to each ship, thus allowing modding]). If the autocast/autotarget (which is really what the AI is) trys to target something that is in a bad weight zone, it's an invalid target and has to choose another. The key here is that the weight is bad anywhere in that range circle, not just for the object causing the bad weight.

This will help with the suicide-against-your-defenses style of the AI and your own AI. For ship to ship AI, that comes down to autotargeting priorities. There may be a few ways to improve this in a simple manner, but I'm thinking the AI will need to be given some kind of autotarget override occasionally to 'seem smart'. For example, I believe autotarget prioritizes a LF to attack another LF. Even if theres LRFs as well. If you have no counter for the LRFs to take them out, you and I know that you've got to make up for that deficiency somehow. The AI doesnt. So I would say the AI player should be granted the ability to override the autotarget to 'focus fire' on the ship class that is causing the most damage. Not sure how to code that, but that seems like a good idea to me.

The circles idea could also be extended to planets, with a slight change. The AI builds up a list of overall weight (as last seen by it) for the planets around it. it picks the planet with the lowest weight to attack. If all planets within range are of a higher weight than the fleet, it should recognize this and try to build up a bigger fleet first.

Or, simpler: when exploring/expanding, it builds up a list of next available targets (the ring of planets not owned by it along it's empire. uncolonizable are counted as owned). It adds new items to this list based off the amount of ships and defenses it saw there. When it attacks a planet and is forced to retreat, it moves this planet to the bottom of the list.