Author Topic: Improving AI - what are the priorities?  (Read 23417 times)

0 Members and 2 Guests are viewing this topic.

Offline kyrub

Improving AI - what are the priorities?
« on: February 04, 2013, 01:26:50 PM »
Let's put down a shortlist of AI improvements that could have the biggest impact on
a) improving the AI challenge in SMACX game
b) improving the fun of playing SMACX (while not necessarily forcing AI to play the "best way")
Only a few most popular/feasible things will be shortlisted.

Example: AI should build his second colony near his first base, to speed early development (a). AI should build a lot more SAM planes, to create more air contest (b).

Discuss.
(In this thread please: AVOID terraforming, social engineering and faction specific issues. I'll create special threads for them later. Thanks.)

LIST:
  • Production issues
    Far too many mins tied up with supporting useless/unwanted units (esp. transports, often combat units), not enough focus on building key facilities and productive units (formers, crawlers, CPs). More buildings preventing unrest.
  • Combat units with mobility.
    More copters and prevalence of speeders against infantry.
  • AI never attacking with hurry penalty
    Both in defense and offense, this destroys their ability to beat better played armies, even if they have far more/better units.
  • Production changing
    I've often seen AI bases be almost done with a secret project or major expensive facility/unit, then suddenly switch to something else losing a huge amount of minerals in the process.
  • Improve AI-AI trading of techs
    For Transcend difficulty, to keep AIs competitive.
  • Smarter air attacks
    AI Air units should primarily focus on enemy bases. More drop units (as the AI does not produce enough of them).
  • Better air defense
    More SAM planes and more AAA infantry to protect the attacking troops.

UNDER REVIEW
  • Smart probe attacks
    AI trying to not move a probe directly adjacent to the opponent's base..
  • Worker placement
    Improve placement, different focus.
  • Attack from base
    Counter-attack against siege units.
« Last Edit: February 19, 2013, 10:09:52 PM by kyrub »

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #1 on: February 04, 2013, 01:39:40 PM »
a few posts from elsewhere...

Kyrub, if you modify the AI so that it knows how to use gravship formers/supplies and aerial colonies properly, then I will be forever indebted to you!

Quote
I find the AI uses units extremely inefficiently in many situations, mostly because they are too cautious to attack and never (in my experience) attack with the hurry penalty.

Quote
I find that foe air power often comes in and kills some random units (police defenders, formers), then dies to air superiority counters.

Quote
...handling FM badly and having infinite pacifism drones), when there's a SMAX version I'll do some playtesting and see what else stands out. Using clean reactors and rehomeing to a punishment sphere/specialist base to avoid FM drones would be amazing if you could teach them it, but perhaps too complex.


Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #2 on: February 04, 2013, 01:45:18 PM »
I add one personal priority:

AI almost never attacks from inside his own base when under siege. This is terrible, as it makes base sieges too easy and it draggs fun out of the game. As I have seen in the code, the AI actually uses emergency "attacking" defenders, so it's not an impossible step.

Possible occurences:
- land counterattack
- amphibious counterattack against ships
- SAM rovers (? are they effective enough to be built ?)

Offline ete

Re: Improving AI - what are the priorities?
« Reply #3 on: February 04, 2013, 02:13:27 PM »
Speaking from almost entirely SMAX experience (I really hope you start including more of your improvements in SMAX, it seems to me like SMAC with plenty of interesting extras):

#1: Production issues
Far too many mins tied up with supporting useless/unwanted units (esp. transports, often combat units), not enough focus on building key facilities and productive units (formers, crawlers, CPs). Even the most aggressive factions MUST be able to build up infrastructure, otherwise even if they blast through and take over one or two players they don't equip their new empire properly and stagnate in the mid-late game.

Suggested changes:
More facilities (esp: recycling tanks, Tree Farms/Hybrid Forests, multiplying facilities).
More productive units (formers, crawlers, CPs).
Cap on transports, fewer transports.

#2: AI sharing tech with each other ineffectively
It's far too easy to get a massive leg up in tech simply by trading tech around, because while the AI accept most tech trades, they rarely offer them. If the AI offered tech trades more (preferentially trade tech with low tech players?), they'd perhaps trade with each other enough to stay in good positions on the tech chart. Also, they're FAR too resistant to trading techs which offer a SP. While a few SPs are key, a tech which gives a SP is not generally especially good.

Suggested changes:
AI should offer tech trades almost as much as possible.
AI should have no special problems with trading tech for Secret Projects (unless they're working on the project, and even then they should not be quite as averse to it).

#3 AI never attacking with hurry penalty
Both in defense and offense, this destroys their ability to beat better played armies, even if they have far more/better units.

Suggested changes:
Tweak whatever check stops them from attacking with hurry so they attack despite penalty when it's sensible (unit has higher weapon, target or target stack is valuable/has low armor).

#4 Terraforming
I've not seen the SMAC improvements, but the SMAX patch seems a little better, but could do with more. Mostly more forest, some rocky/road mines, less farm/solar and perhaps something which checks current fungus production and plants fungus if it's worthwhile. More formers in general would be pretty great, but that's to do with production.

Suggested changes:
More forest.
Planting fungus when appropriate.
More forest.
Some advanced terraforming when available (plenty of Boreholes, some heavy nutrient squares, maybe energy park?).
More forest.
Less farm/solar.

#5 Using Clean Reactors properly
Basically, the all units which are likely to be alive for a long time should be upgraded to clean once they're available (unless you've got really high support). This means defensive units staying in base and formers should be clean, and unless you're pulling the rehome trick or at peace, making air units and attacking units clean could be inefficient (especially with the AI's pure numbers/no tactics approach to combat).

Suggested changes:
Upgrade all formers and defensive units to clean when possible.
Upgrade air/combat units to clean if at peace with nearby people and have low Support.
Upgrade all combat units to clean then rehome them all to punishment sphere base before sending them into combat if Police is -4 or less (maybe -3, but one drone is dealable with usually).

#6 Combat unit production priorities
'copters. More of them are needed, a lot more with their current cost. They are much more effective than any other offensive unit for their cost. Needlejets are cool, but the bulk of an air army should be 'copters and anti air 'copters. And once they're available any army fighting without them is fighting with one hand tied behind its back.

Speeders should be favored more over infantry, though I believe you worked on this for SMAC. Infantry kind of suck in large numbers, though they can have good armor cheaply which cushions the AI's lack of tactical sense slightly.. Still, more mobility is key.

Defensive probe teams are important. No support and make the AI less probebait. One in each vaguely exposed base would help a lot, and probably be reasonable. More than one in some situations is ideal (vulnerable bases being probed), but not essential.

#7 Native issues
Native focus players don't really need to focus on making worms for much of the game, just capturing them and building up their bases economically while the worms handle military. The more they build, the less they capture. They just need to constantly explore fungus, and rushbuy facilities with the wormcash to give them a chance of matching/outproducing foes later on. A few worms in the short term (which holds up capture anyway) is not worth having no infrastructure.

#8 Production changing
This one's harder to observe without cheating to see the whole map which I usually don't do, but I've often seen AI bases be almost done with a secret project or major expensive facility/unit, then suddenly switch to something else losing a huge amount of minerals in the process.

Suggested changes:
Strongly discourage the AI from switching production when it would lose a lot of minerals, make it switch to another SP at least.

#9 Colony pods going off to die
I noticed this running a sim on a mostly land map, at one point the AI tried to send a colony pod a huge distance away off through fungus. This would have been entirely crippling to the faction.

#10 Drone control issues
Some factions have serious drone issues, but on the other hand some don't. It'd be nice for the AI to handle drone penalties a bit better.

There's also the stacking issue and air/ground force co-ordination thing which I mentioned before (I never got around to writing about the things other than combat in that thread), but on second thoughts.. those are usually less of a problem than most of these.

With a good portion of those improved, I think the AI would be vastly more of a challenge, at least enough to uncover some other issues currently obscured by the more clear flaws. Also, for b, I find it quite annoying when loyal (even submissive) pactmates refuse to trade tech due to the tech being SP-enabling, despite it being in both of our best interests. Dulling this tendency would improve AI-AI tech trading and overall improve their play, but also make them more useful allies and feel more real.
« Last Edit: February 04, 2013, 06:54:09 PM by ete »

Offline Petek

Re: Improving AI - what are the priorities?
« Reply #4 on: February 04, 2013, 09:15:51 PM »
Suggestions:

1. Probe defense. AI should station Probe Teams in perimeter bases (and keep them there) to defend against enemy Probe Teams.
2. Probe offense. When an AI Probe Team approaches a base, it always uses all its movement points. This sometimes results in the probe stopping adjacent to the base where it can be intercepted. Instead, the probe should stop away from the base, where it has a chance of not being intercepted.
3. Data Angel Probe Teams seems to prefer stealing tech instead of infiltrating a faction. They should prefer to infiltrate to take advantage of their TECHSHARE ability.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #5 on: February 04, 2013, 10:07:36 PM »
Thanks! ---- First note, I just added this line to my first post.
(please: AVOID terraforming, social engineering and faction specific issues. I'll create special threads for them later.)


Now onto your suggestions. I find these points most important and I put them on the list.


#1: Production issues, [and #10 Drone control issues falls here as I've seen]
 
#3 AI never attacking with hurry penalty
 
#6 Combat unit production priorities - 'copters.  Speeders [still not working despite effort]

#8 Production changing [crippling]


Quote
#5 Using Clean Reactors properly
Suggested changes:
Upgrade all formers and defensive units to clean when possible.
Upgrade air/combat units to clean if at peace with nearby people and have low Support.
Upgrade all combat units to clean then rehome them all to punishment sphere base.
I am aboard with using more clean reactors. But pardon my cooler interest...
- AI formers have really low survival rate due to worms. AI cannot make formers hide, avoid.. it's sheeps and wolves. Try spectator game... I actually thought about adding trance / armored formers. (Mind you, low formers' survival could also be a factor against boreholes etc.)
- air units when at peace, hehe. AI tends to produce few air units at peace. And when it produces, it's usually one of the Hive/Miriam types, so war is just around the corner.
- I somehow dislike rehoming to PS. It seems an expoit, not a proper strategy.
The 1 point that stands: the defenders should be clean (but: unless under death attack). Formers too, but I don't expect much of them. Maybe offense infantry units, as they are slow. - This can probably make the list, just. But don't expect miracles...

@Petek
Quote
Probe defense. AI should station Probe Teams in perimeter bases
Yes. Sadly. there are huge technical issues.
- How the heck shall we determine "perimeter" base? There's no data gathered on perimeter bases, or bases close to... AI has a "defend!" flag for endangered continent, but that is not very telling, since at that point, it needs to build defenders. AI has a "heat" base when planning a coordinated attack. I am afraid it is not used often.
- To build extra unit is simple. But to make it stay in a base might be actually hard to produce. The infowar unit has automatical push to search for enemy... so we have to figure, how a specific unit does not follow these orders, under what circumstances.

(These points will keep this issue out of shortlist, I am afraid. Let's do something simpler first.)

Quote
2. Probe offense. When an AI Probe Team approaches a base, ... adjacent to the base
Yes, I hate that behavior. I have to find it first, no idea about it yet. Then it will definitely move on the shortlist.

Offline ete

Re: Improving AI - what are the priorities?
« Reply #6 on: February 04, 2013, 10:32:40 PM »
Agreeing with all of Petek's suggestions. Expanding on 2, a probe team should generally stop as far away from a base as possible while being able to reach it next turn if it cannot reach the base this turn. And for infiltration, even though the AI does not actually *need* it because it cheats and sees everything, it'd feel more right if the first action a probe took was always to infiltrate if that faction targeted has not already infiltrated, since infiltration is absolutely key.


Quote
Thanks! ---- First note, I just added this line to my first post.
Okay, I'll save details on those things for later :)

Quote
I am aboard with using more clean reactors. But pardon my cooler interest...
- AI formers have really low survival rate due to worms. AI cannot make formers hide, avoid.. it's sheeps and wolves. Try spectator game... I actually thought about adding trance / armored formers. (Mind you, low formers' survival could also be a factor against boreholes etc.)
If the AI has enough formers, they should have cleared fungus from their main base area by the time clean reactors come along, minimizing worm contact. If possible, perhaps create formers as non-clean then upgrade them to clean every decade or two, so all the ones in safe areas are clean but not much is wasted on making formers in dangerous places clean?

Quote
- air units when at peace, hehe. AI tends to produce few air units at peace. And when it produces, it's usually one of the Hive/Miriam types, so war is just around the corner.
Hm, well, surely they must have some air units left over after war sometimes? I guess aggressiveness so maybe not.

Quote
- I somehow dislike rehoming to PS. It seems an expoit, not a proper strategy.
Agreed. However, it is effective, and would help the AI deal with market much better.

Quote
The 1 point that stands: the defenders should be clean (but: unless under death attack). Formers too, but I don't expect much of them. Maybe offense infantry units, as they are slow. - This can probably make the list, just. But don't expect miracles...
Okay.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #7 on: February 04, 2013, 10:48:04 PM »
(I forgot to tell you, AI has really big problems with upgrading units. It has too many units for start, it has often units that are too different, very expensive upgrades... So relying on upgrading units in time is not gonna solve anything soon.)

Offline ete

Re: Improving AI - what are the priorities?
« Reply #8 on: February 04, 2013, 11:13:51 PM »
With formers there should not be too many variants, and they could be upgrades one by one if there's some way to handle that? But yea, I see how the AI's massive amount of unit variation/large number of units could make upgrading very complex and expensive.

Also, I find AI tends to over-defend bases, especially compared to mine. If they can counterattack half decently (mobile units basically), it should be reasonable to have much smaller stacks of defenders than I sometimes see, at least in many bases. Though they seem to be pretty good at distributing defenders around places engagements are taking place, while leaving a few.

Offline BFG

Re: Improving AI - what are the priorities?
« Reply #9 on: February 04, 2013, 11:19:24 PM »
This discussion makes me wonder how the AI decides how, and when, to build a certain unit - and also when to design it.  I always suspected there was some kind of formula balancing cost versus need versus potential benefit.  If such a formula could be modified to consider all legal unit combinations during the design phase, it could help the AI immensely.  Or, we as a community might even be able to substitute static rankings (in Build/Discover/Explore/Conquer) for every possible unit and accomplish the same thing.
And yes, I realize that, especially since kyrub and yitzi are working with assembly code, either approach may be patently impossible.  Just brainstorming here.

Meanwhile, here's an issue I noticed in a game over the weekend - I had a UN probe attack one of my bases and "destroy my Children's Creche".  The funny thing is, that base didn't have a Children's Creche - it was building one.

Offline ete

Re: Improving AI - what are the priorities?
« Reply #10 on: February 04, 2013, 11:50:35 PM »
This discussion makes me wonder how the AI decides how, and when, to build a certain unit - and also when to design it.  I always suspected there was some kind of formula balancing cost versus need versus potential benefit.  If such a formula could be modified to consider all legal unit combinations during the design phase, it could help the AI immensely.  Or, we as a community might even be able to substitute static rankings (in Build/Discover/Explore/Conquer) for every possible unit and accomplish the same thing.
And yes, I realize that, especially since kyrub and yitzi are working with assembly code, either approach may be patently impossible.  Just brainstorming here.

Meanwhile, here's an issue I noticed in a game over the weekend - I had a UN probe attack one of my bases and "destroy my Children's Creche".  The funny thing is, that base didn't have a Children's Creche - it was building one.
All legal unit combinations would be kinda insane, considering how many there are, and how a huge majority of them are strictly worse than others. And probe teams can target things in production. You probably got hit by that, or it finished and was immediately destroyed.

Also, kryub, "more buildings to prevent unrest" should only be applied when there's some risk of riots. Many factions don't have huge drone issues usually from what I see, it tends to be only the ones which have almost no focus on facilities in general and those with drone penalties which have problems.

And how practical would it be to make the AI focus on the worthwhile SPs? There are huge differences in value between the better and worse SPs at each tech level, and the AI's choice of which to go for seems fairly random/poor.

Offline BFG

Re: Improving AI - what are the priorities?
« Reply #11 on: February 05, 2013, 02:07:10 AM »
All legal unit combinations would be kinda insane, considering how many there are, and how a huge majority of them are strictly worse than others.
Absolutely true.  But for modern systems, even the insanely high number of potential units would be easy to crunch through in a short period of time.  And it would only need to be done once per new tech per faction.

Offline kraze

Re: Improving AI - what are the priorities?
« Reply #12 on: February 05, 2013, 04:39:23 PM »
As in another thread - make AI attack adjacent tiles from within the city when it feels it has enough force to cripple the gathering attacking force.

As it is - it's really easy to exploit AI. Like you can gather a stack of 3 units near AI's city which you can't attack yet (good defense) so you just spend turns gathering more forces with AI doing nothing. Even when it has a unit with 13 attack in the city and you have a bunch of 1 def units AI is passive - considering that it can cripple the whole stack with just a single attack and thus buy himself a turn or more.

As a player when AI brings units to an adjacent tile near my city I will always attack AI's stack. Often it just makes him lose the turn since AI cannot mount a good attack anymore and I spend that free turn just bringing in more forces with my attacking unit moving nowhere from the city, getting repaired next turn.

Offline ete

Re: Improving AI - what are the priorities?
« Reply #13 on: February 05, 2013, 10:10:26 PM »
Out of curiosity, what puts you off shortlisting getting the AI to offer tech trades more? Current setup seems to be accept almost everything but hardly ever offer, which is just begging for a human player to get a huge tech advantage by trading with everyone, and if they could be made to offer tech more they'd trade the same amount with a smart human but MUCH more with other AI which would make all the AIs stronger (because they will all have more tech) and reduce the ability to tech broker (because they'll all have almost the same set of techs). And maybe even reduce the tech cost for AIs, if the tech cost formula does not count traded techs.

Especially before I got good enough at the game to outplay the AI in other ways, playing tech broker was usually the key to taking the lead, and even now playing against broken factions played by the AI it usually gives an important advantage in the early-mid game.

@kraze: Sounds like the not attacking with hurry issue? Although maybe it applies to other units too, but I think speeders come out sometimes.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #14 on: February 05, 2013, 10:45:12 PM »
@kraze: Sounds like the not attacking with hurry issue? Although maybe it applies to other units too, but I think speeders come out sometimes.
I am with kraze. There is something wrong, the units hardly ever attack from inside the base.

Quote
Out of curiosity, what puts you off shortlisting getting the AI to offer tech trades more?
Yep, I forgot to explain. My experience with MoM AI tells me: trading techs is an exploit. It is a feature with no downsides, in 98% of cases good for all the parties. The genuine question is not "whether" but "how often" should AI trade techs? Every turn, I say, it's that good. - But if I make them trade techs every turn, it will turn into a disaster for you. And you'll have very little room for trading yourself.

 

* User

Welcome, Guest. Please login or register.

Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Without sensibility no object would be given to us, without understanding no object would be thought. Thoughts without content are empty, intuitions without concepts are blind.
~Immanuel Kant 'Critique of Pure Reason'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 41.

[Show Queries]