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

0 Members and 2 Guests are viewing this topic.

Online Buster's Uncle

  • With community service, I
  • Ascend
  • *
  • Posts: 49433
  • €181
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Improving AI - what are the priorities?
« Reply #90 on: April 15, 2014, 10:41:45 PM »
kyrub, is there anything the forum could do to help you that we aren't already?  Your work is valued, and important to the community.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #91 on: April 16, 2014, 12:08:07 AM »
BU, I appreciate the input of the community, it is pretty good. I am probably a complicated person to communicate with about my work. I am too opinionated (I have edited my previous post to make it more neutral.). I still like people with differing opinions, when they argue about them coherently. In fact, the posts written by other people in this thread have contributed massively in work on the patch, so far.

I find that it's good if people try the patch before saying "what the AI should do". Maybe they could find out AI does part of it already? Or it does not - then their feedback is really helpful. To improve AI is usually a long march, with many twists. Without the experience, everything is hypothetical.

Offline TarMinyatur

Re: Improving AI - what are the priorities?
« Reply #92 on: April 16, 2014, 09:38:30 PM »
So how should we play [SMAC(n)] to test it in the most effective way? //paraphrased

Yeah. Kirov is onto something here. To get clearly useful data, it might help if we used common settings. There are thousands of combinations of options in SMAC that can drastically change the performance of the AI factions, such as the size of the map. (In my current game, Morgan has an impressive empire due to 150 years without conflict on his own continent. The Hive is a massive menace on the second continent.)

Anayway, I'll start to test kyrub's patch using the default settings for everything. (Although there is definitely value in testing the patch with custom settings, too.)

I'll look for things that are easily measured: hurried attacks and attacks-from-base.

Online Buster's Uncle

  • With community service, I
  • Ascend
  • *
  • Posts: 49433
  • €181
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Improving AI - what are the priorities?
« Reply #93 on: April 16, 2014, 09:43:05 PM »
I like how you're thinking, o' longest-lived King of Numenor.  The community can always help/encourage our treasured .exe modders in a big way with detailed feedback and careful playtesting.  ;b;

Online Buster's Uncle

  • With community service, I
  • Ascend
  • *
  • Posts: 49433
  • €181
  • View Inventory
  • Send /Gift
  • Because there are times when people just need a cute puppy  Soft kitty, warm kitty, little ball of fur  A WONDERFUL concept, Unity - & a 1-way trip that cost 400 trillion & 40 yrs.  
  • AC2 is my instrument, my heart, as I play my song.
  • Planet tales writer Smilie Artist Custom Faction Modder AC2 Wiki contributor Downloads Contributor
    • View Profile
    • My Custom Factions
    • Awards
Re: Improving AI - what are the priorities?
« Reply #94 on: April 19, 2014, 03:37:49 AM »
kyrub, a thought; would you be willing to cooperate in a news item about you and your patch?  I've already promised the next one to Ford_Prefect and his .cvr mod, but you're definitely working on one of the most interesting SMAC modding projects around.  The way I did it with Yitzi was to just conduct a slow interview by post, and then write it up when we thought we'd covered things.  It's my sneaky way of doing as little of the work as possible, too, depending.

SO - first lame question.  What's the deal with you and your .exe mod? :D

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #95 on: April 21, 2014, 01:54:14 AM »
Have just played some until 2230 with your n patch. Huge map this time, Sparta. I played super sloppy (as I tend to do in single-p), neglecting hurries, failing to check drones, etc., and Sparta is not the best faction for huge maps, but even taking all that into account, I was still pleasantly surprised by what the AI is able to do. Usually playing a lazy game still nets me most Projects (I do use crawlers), this time I managed to grab only PTS and MCC. I've just came first with pop after a short boom and got elected, but still lagging tech-wise behind Morgan, who can be a real powerhouse with his regular Demo/FM/(either Knowledge or Wealth).

Got in a small war in Deirdre. Yep, she did pull out her 5-1-1 unit to kill my recon, you can't safely stop 2 tiles from a base anymore. And she mind controlled one unit, but this does happen anyway. For more info on movement I need to play another game - Deedee got somewhat confused on rocky/fungus with her 5-1-1s and I imagine it can be tough for you to teach her how to negotiate such stuff. But hey, at least she got A5! The AI's research is more and more resembling something decent. I opened the editor to see tree farms and hybrid forests in Morgan's bases! Truly, he thinks he's people.

What else? I see some forest, usually 1-tile, sometimes more, but it could be even more - I think it's tough to overdo foresting before advanced terraforming. Could you tell us something about it in the case of AI? Like, will AI replace its own improvement when a tech for something better comes? Is it possible at all to teach it to start with 'forest & forget', then gradually move to boreholes interspersed among condensors?

There are some bases with high unit maintenance, but all in all I think the AI is less clogged with support. And even if it wasn't, better tech means more useful units in the field, so maybe this will stop being a problem even for the Hive and Miriam.

Crawlers - not more than 2 per faction, some have 0. Some crawl terraformed terrain, but in two cases it's an unterraformed rocky square mined for 1 mineral just outside the base radius. Any idea how this results from your changes?

That's it for now, I need to play a longer and more serious game to see more. My main request would be just to keep doing what you do, the changes are all in good directions. I used to think that in SMAX I could win literally any single-p game under any circumstances, even in drunken stupor. This game I've just played looks like I would actually need to get a grip to pull it off! And any time I see an AI's crawler mining a tile, even undeveloped, something inside me cries a little. It's like watching a butterfly. I feel like that guy in "Alien:Resurrection" who admires the birth of the alien hybrid. :)

So it used to be insect evolution, now it's more like Intelligent Design.  ;b; Thanks for the experience and don't stop! I'll try to play more soon.

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #96 on: April 21, 2014, 11:54:57 PM »
This time as Miriam, large map. The beginning was super hard due to my proximity to Zak, who was always several steps ahead of me with combat techs. He managed to bring me some losses, but I overflowed him with cheaper units. I have this impression that the AI will never properly use infantry units - this really requires bringing some defence units, using terrain for bonuses, etc. The same goes for artillery - although it sure has its uses, the AI fails to see and exploit any. In some extremely rare situations batteries can be mildly annoying at best. Is it possible to simply switch off certain types of units? How does the selection work?

Although my start was tough and it took me some considerable time to make it to the top (2208), I feel that the AI underperformed in this game, mainly due the lack of bases. Hive and Dee could be a competition in the air power era, but they've got only a handful of bases spread over vast areas. Morgan built 2 (!), not for the lack of room.

Interesting stuff with Santiago - I killed her easily mainly because she got the Jungle and grew so quickly upwards that she was too busy building hospitals when I came to her. Again, I took some losses as she wisely used ECM garrison (do you have anything to do with it, kyrub?), but I stayed at a safe distance and managed to pick her bases one by one.

Maybe stronger focus on rovers would be useful? Infantry is no match to your best attack bikes, especially if you don't exploit terrain defence bonuses, which I guess is a long way for the AI.
 
***

Other quirks - my subdued Zak decided to help me with one former, which made it all the way from his territory to the Spartans'. I have no idea what he was up to.  :dunno: Hive and Dee built one crawler each, the former mined 2 energy (good Yang, have a peanut!), the latter rambled its way around in a very confused manner (I was watching it in the editor), then stumbled into a worm and promptly died.

I'm not sure if this is a bug, but I saw it for the first time - after I captured Sparta Command, it was in the production order before everything else, i.e. even before the Projects. Usually when you build a Project, it is your first construction that turn and you can safely take it into account one turn earlier. This time Sparta Command was ahead of the rest. I can't recall anything like that.

Sorry I didn't make it to the air warfare, but the industry discrepancy was way too high at this moment for the AI to remain significant. And I didn't want to spend the rest of the evening microing formers.

Oh, one more thing - what do you think and how viable are changes to probe teams? I don't mean any too smart moves, just basic stuff like probing from the maximum distance and above all, using infrantry chassis defenders (which stay in bases). Your AI is doing great in terms of research and it takes a longer while for me to achieve the best lab turnover - the only problem is, the AI likes to give free techs to every probe team which asks politely.

Miriam 2168 is after I pacified Zak, 2225 is when I gave up.

PS. Now I noticed that Dee built some bunkers. Again, is it possible to switch some terraforming options completely? Bunkers are probably the least useful improvements of them all.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #97 on: April 21, 2014, 11:56:32 PM »

Quote
Got in a small war in Deirdre. Yep, she did pull out her 5-1-1 unit to kill my recon, you can't safely stop 2 tiles from a base anymore.

That is simply great to hear. Attacking from the base plus the hurry-attack (it is in the same place, in fact) is one of the least sure changes, it was basically a "leap of faith" into the darkness, following hours of study. I hope we see more of this and it can be confirmed.

Quote
The AI's research is more and more resembling something decent.
I actually did not much here, on the contrary - besides clearing the useless stuff and recommanding former prereq. We may talk about beelining further, in another thread, I certainly need some input and opinions on some simple ways and possibilities to focus the AI. Deirdre is still too mad about any Ecology techs, as far as I remember.

Quote
I opened the editor to see tree farms and hybrid forests in Morgan's bases!
There is a lot more here. For instance, building VW should now make AI hungry to build NNs all around his bases. AI is a bit more keen to protect its bases with PDs, it thinks the banks are pretty cool, aerospace complexes and other stuff.

Quote
What else? I see some forest, usually 1-tile, sometimes more, but it could be even more - I think it's tough to overdo foresting before advanced terraforming. Could you tell us something about it in the case of AI? Like, will AI replace its own improvement when a tech for something better comes?
There are exceptions and I may look into them. It requires further study, but I know where to look (I saw the thing), so 50% is done already.

Quote
Is it possible at all to teach it to start with 'forest & forget', then gradually move to boreholes interspersed among condensors?
This is the thing: I have done a lot of testing with boreholes only, made numerous hits and changes. And I cannot bring AI to do a lot of them, I see 4-5 every testgame, hmm. There is some mystery behind it.

AIs are doing a lot of push ups of terrain, which I don't understand why and (most importantly) how and where exactly it is decided. I'd like to cut off this behavior until later in the game and give it some meaning. My hypothese is that this (or something else) hampers the other desirable variants, condensors, boreholes etc.


Quote
There are some bases with high unit maintenance, but all in all I think the AI is less clogged with support.
Yep, this should be. We will do more "clean reactors" next.

Quote
Crawlers - not more than 2 per faction, some have 0. Some crawl terraformed terrain, but in two cases it's an unterraformed rocky square mined for 1 mineral just outside the base radius. Any idea how this results from your changes?
I have no input on where it crawls, 1 mineral variant is what I see a lot, sadly. I may think about formers "seeing" crawler terrain as desirable to improve. I may try to study crawler behaviour (too much time right now). I can certainly make AI churn crawlers like chickens.

Quote
Thanks for the experience and don't stop! I'll try to play more soon.
;b;

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #98 on: April 21, 2014, 11:59:23 PM »
Re: Miriam

Do you have the earliest save as well?
(I like to do the spectator thing, give up immediately and watch AIs perform on their own... but there's some important difference when the AI does *not* have a strong human competitor in the game... so I'd like to see the result)

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #99 on: April 22, 2014, 12:05:04 AM »
This is the earliest I had, I'll keep it more in order in the future.

I tried to stay away from the 'hurry' attacks, knowing they can happen. The next time I'll try to lure AI and confirm.

I'm going to play without crawlers to see what the AI does with the Projects. In this game, the AI was very slow to start the Projects - the constans I see is Dedee going for the EG. :)

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #100 on: April 22, 2014, 12:15:04 AM »
One thing I like about this patch is that it renders what used to be my favourite challenge, 'switching sides', next to impossible. I remember I could bring a faction to Unsurpassed, switch to the worst one and repeat this process three or maybe even four times per game. No longer so if the first time takes 100+turns. So I'm positive we're getting somewhere here.  ;b;

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #101 on: April 22, 2014, 12:16:07 AM »
I have this impression that the AI will never properly use infantry units - this really requires bringing some defence units, using terrain for bonuses, etc.
There is absolutely nothing I can do about this. That is the architecture of the AI movement, too complex a change. The only proper way, to me, is to let AI do rovers in bigger quantities. Like 2 rovers per 1 infantry, that would seem about right, and probably dangerous. This is certainly doable, although it is hard to find the balance.

Quote
The same goes for artillery - although it sure has its uses, the AI fails to see and exploit any. In some extremely rare situations batteries can be mildly annoying at best. Is it possible to simply switch off certain types of units? How does the selection work?
I agree, I hate AI artilleries and it builds them in wagons. There is a stupid switch in the code, when the AI makes *more* artilleries when it has a HP on its continent. The patch for this insanity is ready, we'll have a lot less of them. I thought about allowing only rover-batteries, as I find them more dangerous in the hands of AI, what do you think?

Quote
Although my start was tough and it took me some considerable time to make it to the top (2208), I feel that the AI underperformed in this game, mainly due the lack of bases.

Strange. I will study the map.

Quote
Morgan built 2 (!), not for the lack of room.
AI has problems with worms + Morgan lacks morale, to ammend for his faults.
(I still thought that Morgan required more specific effort in the code. He should ICS instead of careful spreading, no? Right now, he does the latter, although I improved him by cca 100%)


Quote
Interesting stuff with Santiago - I killed her easily mainly because she got the Jungle and grew so quickly upwards that she was too busy building hospitals when I came to her. Again, I took some losses as she wisely used ECM garrison (do you have anything to do with it, kyrub?)
Oh yes. Hospitals making Santiago vulnerable is not exactly good news, though. That is my work too.
 
***

Quote
I'm not sure if this is a bug, but I saw it for the first time - after I captured Sparta Command, it was in the production order before everything else, i.e. even before the Projects. Usually when you build a Project, it is your first construction that turn and you can safely take it into account one turn earlier. This time Sparta Command was ahead of the rest. I can't recall anything like that.
Not sure, what you mean. Was kind of problem? I think I did nothing with this.

Quote
Oh, one more thing - what do you think and how viable are changes to probe teams? I don't mean any too smart moves, just basic stuff like probing from the maximum distance and above all, using infrantry chassis defenders (which stay in bases).
This one is hard. I even thought about suggesting a Yitzi-like change of type: The encrypted defenders can defend against probes. That would work for the AI, but it is a mod, which I tend to avoid. - Otherwise, AIs don't see the infowar units as defenders or combattants and treat them separately. It is hard to explain there are two kinds of them, too many instances in the code. Not sure.

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #102 on: April 22, 2014, 12:29:05 AM »
Yeah, I understand with the infantry movement, I can't imagine the kind of effort needed for the AI to start move around like a reasonable, even if slightly drunk, man.

What is a HP?

The problem with rover batteries is their cost. And I think the AI will never handle the battery well in the offensive. Conversely, I do see some uses for stationary arty to soften up invaders. Still, it's crucial not to clog the support.

Morgan definitely thrives with many tight-packed bases, as should most factions, for that matter. I'll give another game a try now and see.

Santiago was actually doing quite fine, but she had the bad luck to end up close to my Miriam. Maybe if she had the time for air power... I think your AI can do much better on larger maps with delayed fight. Is it your impression as well?

The bug I mention is just a side note - Sparta Command is calculated before any Projects are built, which I noticed since it rioted with NN on the same turn I got VW. Probably nothing.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #103 on: April 22, 2014, 01:55:43 AM »
What is a HP?
Human player.

Quote
The problem with rover batteries is their cost. And I think the AI will never handle the battery well in the offensive.
It still has some limited use, as I have seen AIs destroy my sensors with help of arty a lot. Also, if possible, I try to conserve the diversity in AI units. It makes them less predictable and it keeps the game being fun. Surely, we could let AI build only rovers, but, ehm... it somehow does not seem right.

Quote
Santiago was actually doing quite fine, but she had the bad luck to end up close to my Miriam. Maybe if she had the time for air power... I think your AI can do much better on larger maps with delayed fight. Is it your impression as well?
I certainly made the AI more "builder", so larger maps are the way to go. I play always on larger maps, maybe that's why? It could be done more carefully, I guess, make the map scale a factor, if necessary. But then I am pretty lazy, hmm.

Quote
The bug I mention is just a side note - Sparta Command is calculated before any Projects are built, which I noticed since it rioted with NN on the same turn I got VW. Probably nothing.
If you could re-run that bit with the old exe and see what happens, I'd be a bit calmer. Every instability smells of data corruption, which is our arch-enemy.

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #104 on: April 22, 2014, 02:51:41 AM »
Played some more with some self-imposed rules (only 6 bases, no crawlers) and will reply to your post soon. Meanwhile I had a thought - maybe you could post here your patch with some over-the-top yet still sane values, just for a few of us to check it out? I have in mind much more best attack rovers, crawlers, formers (still far from enough) and heavy foresting. I don't know if it's a standard and/or useful practice in design work, but maybe we'd have some food for thought afterwards (although I don't know when I will be able to spare an evening for AC next time... :) ).

 

* 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

The sea... vast, mysterious... and full of wealth! And the nations of Planet send their trade across it without a thought. Well, the sea doesn't care about them, so it lets them pass. But we can give the sea a little hand in teaching the landlubbers a lesson in humility.
~Captain Ulrik Svensgaard 'The Ripple and the Wave'

* 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: 39.

[Show Queries]