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

0 Members and 1 Guest are viewing this topic.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #105 on: April 22, 2014, 09:50:14 AM »
SO - first lame question.  What's the deal with you and your .exe mod? :D

OK. Here we go.
The .exe mod (I called it "SMAC 444" or simply "AI patch") is an attempt to make AI in the Sid Meier's Alpha Centauri game play better and to give us, who love the game (or loved the game back then) more challenge, especially in the single player variant.

The artificial intelligence was the biggest weakness of the original game for me: seeing AIs not spreading quick enough, ignoring the seas until late, seeing endless hosts of artillery or other units and ultimately, seeing opponents invariably sink down at the moment when Air power became dominant, spoiled the strategic aspect and, at the end, turned me away to other titles.

The patch is so far limited to the original game, without the expansion (Alien Crossfire). The .exe mod self imposes to avoid any hard-coded changes to the game rules. You will play the game same as original, only the AI plays better, hopefully. It should be noted that scient's magnificent work (patch fixing the bugs) was incorporated into the SMAC 444 as well.


Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #106 on: April 22, 2014, 02:35:15 PM »
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.
Kirov, I plan to try it anyway (rovers, crawlers, formers, more or less ICS), in the next patch, with the exception of the heavy foresting, as I don't see it as a solution. I can point you easily to the all-forest variant then. Don't expect any improvement in advanced terrraforming, though. - Next patch is near. I have got a small window to finish the first SE attempt, then we will see. Afterwards, there will be a serious lull in progress.

(More info still is welcome, the patch was built on the excellent feedback from people in this thread).

Offline Buster's Uncle

  • With community service, I
  • Ascend
  • *
  • Posts: 49414
  • €135
  • 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 #107 on: April 22, 2014, 05:21:56 PM »
Golden quote material there, k.

How did you get into this .exe modding project?  Was there a learning curve?  Any background in this sort of thing going in?

Offline Geo

Re: Improving AI - what are the priorities?
« Reply #108 on: April 22, 2014, 05:44:28 PM »
A mid-term report on a game with me playing as the Gaians. MY is now 2285 (I have 5 saves if you're interested in them, Kyrub). Settings were large map I think (maybe normal), predominant land, low erosion, rainy, and rampant native life. Oh, and unable to choose what to research.

Except for Morgan and the University, all factions made a fairly good to splendid effort at expansion, especially Miri who started a bit more isolated from the Monsoon area then Morgan but managed to colonize it completely.

War has been rampant between factions sofar, and perhaps as a result, not a single crawler was build by the AI. Both the Believers and Spartans went at length to get to their war target(s) over 20 tiles away with lots of fungus inbetween. Miri took a (recently settled) base of mine near my capital by surprise, and the follow up column of units was larger then I thought it would be, but less then 10 I think. I wonder how many she lost on the way to that base. Mostly infantry units though, and no artillery. Eventually I conquered all her Monsoon bases and depopulated them. By the end she had two bases left from which the nearby Hive took New Jerusalem (HQ). Also, by then air units came into play. Hive had declared war on me too, but didn't tried to use his needles over the small sea that separated the Monsoon area from his nearby snaky island area (more or less a phoney war). At some point he assembled quite a garrison on the closest harbor to Morgan (my pact partner), but after a few of my needles took out a couple foils he didn't pursue that way. He then took New Jerusalem where I sent a few assault infantry to, to take it after emptied by my needles. He then used his needles to devastating effect, forcing me to sent a second force which was at each stopping point covered by a tactical needle. Truce came shortly after I took New Jerusalem from him.

Santiago OTOH (which just declared war on me for the second time) has two land connections to me but fails to sent troops through the easiest one (massive land bridge). She builds alot more rovers (and uses them to some effect on my troops blocking one land approach), and regularly upgrades them on a nearby monolith to Sparta Command. She hasn't flight yet so nothing to tell there. She has nicely expanded lands.

Morgan was stumped for a long time (only 3 bases, perhaps because he had a long standing feud with Lal), but once we were committed on the Believers he managed to mind control the two nearest Believer bases and was keen to settle the colony pod I gifted him on the nearest available Monsoon area. He's starting to do fine now I think. Oh, and in the earlier game he infiltrated me. A "WTH" moment because why does the AI needs that? ;lol

Zakharov only founded 3 bases despite having plenty of space for more. Drone problems I think. Anyway, the surprise there is he got to orbital spaceflight and build two missiles and is in the progress of one planet buster. He won't be able to finish it though since he declared on me because due to my Power SE and my refusal to bribe him techs if he's not willing to trade Orbital Spaceflight. Also, he and Lal (his buddy) are sofar the only ones with missiles. I saw a couple bunkers on the edge of his bases field of view towards my border and enough sensor coverage to spot any unit I sent his way. Say 1 bunker and two sensors for each base. Too few units though to make a decent defense, about half on rovers and infantry. He build one or two chaos needles sofar. Haven't seen any other faction use bunkers, but the others (besides Morgan) don't have long shared borders with other factions.

Haven't kept an eye on Lal since he's pretty far south from me, but he's an on-an-off antagonist this game.

The thing that most disappointed me sofar in this game is that Santi doesn't build a naval force to harass me on our shared sea. At least 3 of her bases (including Sparta Command) are harbor bases on this sea, but not even a seaformer sofar.

Also, haven't spotted undefended bases in this game.

Offline Dio

Re: Improving AI - what are the priorities?
« Reply #109 on: April 22, 2014, 06:09:53 PM »
A mid-term report on a game with me playing as the Gaians. MY is now 2285 (I have 5 saves if you're interested in them, Kyrub). Settings were large map I think (maybe normal), predominant land, low erosion, rainy, and rampant native life. Oh, and unable to choose what to research.

Except for Morgan and the University, all factions made a fairly good to splendid effort at expansion, especially Miri who started a bit more isolated from the Monsoon area then Morgan but managed to colonize it completely.

War has been rampant between factions sofar, and perhaps as a result, not a single crawler was build by the AI. Both the Believers and Spartans went at length to get to their war target(s) over 20 tiles away with lots of fungus inbetween. Miri took a (recently settled) base of mine near my capital by surprise, and the follow up column of units was larger then I thought it would be, but less then 10 I think. I wonder how many she lost on the way to that base. Mostly infantry units though, and no artillery. Eventually I conquered all her Monsoon bases and depopulated them. By the end she had two bases left from which the nearby Hive took New Jerusalem (HQ). Also, by then air units came into play. Hive had declared war on me too, but didn't tried to use his needles over the small sea that separated the Monsoon area from his nearby snaky island area (more or less a phoney war). At some point he assembled quite a garrison on the closest harbor to Morgan (my pact partner), but after a few of my needles took out a couple foils he didn't pursue that way. He then took New Jerusalem where I sent a few assault infantry to, to take it after emptied by my needles. He then used his needles to devastating effect, forcing me to sent a second force which was at each stopping point covered by a tactical needle. Truce came shortly after I took New Jerusalem from him.

Santiago OTOH (which just declared war on me for the second time) has two land connections to me but fails to sent troops through the easiest one (massive land bridge). She builds alot more rovers (and uses them to some effect on my troops blocking one land approach), and regularly upgrades them on a nearby monolith to Sparta Command. She hasn't flight yet so nothing to tell there. She has nicely expanded lands.

Morgan was stumped for a long time (only 3 bases, perhaps because he had a long standing feud with Lal), but once we were committed on the Believers he managed to mind control the two nearest Believer bases and was keen to settle the colony pod I gifted him on the nearest available Monsoon area. He's starting to do fine now I think. Oh, and in the earlier game he infiltrated me. A "WTH" moment because why does the AI needs that? ;lol

Zakharov only founded 3 bases despite having plenty of space for more. Drone problems I think. Anyway, the surprise there is he got to orbital spaceflight and build two missiles and is in the progress of one planet buster. He won't be able to finish it though since he declared on me because due to my Power SE and my refusal to bribe him techs if he's not willing to trade Orbital Spaceflight. Also, he and Lal (his buddy) are sofar the only ones with missiles. I saw a couple bunkers on the edge of his bases field of view towards my border and enough sensor coverage to spot any unit I sent his way. Say 1 bunker and two sensors for each base. Too few units though to make a decent defense, about half on rovers and infantry. He build one or two chaos needles sofar. Haven't seen any other faction use bunkers, but the others (besides Morgan) don't have long shared borders with other factions.

Haven't kept an eye on Lal since he's pretty far south from me, but he's an on-an-off antagonist this game.

The thing that most disappointed me sofar in this game is that Santi doesn't build a naval force to harass me on our shared sea. At least 3 of her bases (including Sparta Command) are harbor bases on this sea, but not even a seaformer sofar.

Also, haven't spotted undefended bases in this game.

Perhaps Santiago has not built any sea forces because her stock AI interests do not include EXPLORE...

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #110 on: April 22, 2014, 08:32:22 PM »
How did you get into this .exe modding project?  Was there a learning curve? 

This is my 4th project of this type. I got into .exe modding about 4 years ago, while replaying my favourite oldie, Master of Orion 1. At that time, I stumbled upon the work of a certain "Seb76", the grandmaster, who made an omnipotent patch for X-COM, with some magic program he called IDA. Wow, I said to myself, is this even possible? 3 months later I had the first patch to MoO ready.  - Then I focused on the few other games I used to love: Master of Magic, X-COM and - SMAC. I fixed the bugs first, then moved to AI, the creme de la creme of strategic games.

The problem of dissassembling (.exe modding) is that you analyze the program on very low level, but you try to understand very complicated structures (esp. with AI). It's like trying to understand that your partner is making her morning tea because she feels ill, by analyzing what every molecule of water does. On the other hand, disassemling is very fun and addictive.

As far as AI work goes, SMAC is by far the hardest I have seen so far, I gave up several times. My 2 cents are that the AI was derived from the Civ 2 engine and reworked. Sadly, complicated AI does not equal efficient one.
(I can talk about the structure later if you wish to read more non-coherent babble.)

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #111 on: April 22, 2014, 08:41:46 PM »
He then used his needles to devastating effect, forcing me to sent a second force which was at each stopping point covered by a tactical needle.
Tactical needle? What do you mean by that?
Otherwise, nice to hear!

Quote
Santiago OTOH (which just declared war on me for the second time) has two land connections to me but fails to sent troops through the easiest one (massive land bridge).
Valuable info, AI failings are almost always interesting. Do you have a save with the situation? (Fixing AI pathfinding is less probable, but one may always try, especially with a good save.)

Quote
Anyway, the surprise there is he got to orbital spaceflight and build two missiles and is in the progress of one planet buster.
I think the ruthless tech exchanging plays here. He still had to offer something in return, though. Interesting.

Quote
Santi doesn't build a naval force to harass me on our shared sea. At least 3 of her bases (including Sparta Command) are harbor bases on this sea, but not even a seaformer sofar.
Great, valuable info. I think I saw that too. - Thanks!

Offline Geo

Re: Improving AI - what are the priorities?
« Reply #112 on: April 22, 2014, 08:53:25 PM »
Tactical needle? What do you mean by that?

I had to move infantry units two turns in a row over a road to reach New Jerusalem. On each turn I moved a 5/1/9 Tactical Needlejet (attacks air units ability) over the land units' position to protect them from a possible Hive needlejet attack.

Quote
Valuable info, AI failings are almost always interesting. Do you have a save with the situation? (Fixing AI pathfinding is less probable, but one may always try, especially with a good save.)

I have attached all saves I made this game. Roughly the last century of gameplay. Don't know if they will be of use for you.

Offline Buster's Uncle

  • With community service, I
  • Ascend
  • *
  • Posts: 49414
  • €135
  • 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 #113 on: April 22, 2014, 09:17:37 PM »
Anything to relate about (AI?) structure?  A line or two of hard-tech talk won't hurt and might attract the tech hardcore...  English for the rest of us is also good.

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #114 on: April 22, 2014, 10:25:07 PM »
I just got out of a One City Challenge as Sparta, Huge map. The AI did extremely well and at one moment I actually had to go back a few dozen turns or die. However, I must say I have a problem telling apart which parts of the AI growth come from better unit management and which from better macroeconomy. I saw a lot of nice terraforming and probably tech sharing - even in a normal game with your patch (i.e. no self-imposed rules) some AI would still have a lot to offer to the player (they take the path to EnvEcon and to D:AP very quickly, although the one to AMA, PSA and Fusion is still popular).

My neighbour Lal definitely overdid probe teams (I have like 60 kills under my belt) and it's not the first time I see AI in your patch producing way too many spies. If those minerals went into regular, even if cheap units, I could as well be dead. And although he did manage to do some damage with them (there were moments when the frontline was very close to my base), all in all the AI just can't use them properly. The best it can do is buy back its bases (which happened to me when I forgot to bring my own PT, duh  :doh). Oh yeah, this reminds me - I saw much more mind controlling bases, some changed hands several times.

I got to the air power era, but can't say I noticed any groundbreaking changes - Lal went for my crawlers as usual and as usual got killed by SAM. At least I had to protect my land units with air cover, I think in vanilla SMAX you need to have a bad luck to lose anything except for occasional formers/crawlers. Lal did some 1-4-1 AAA garrison, but it could be much better. If he replaced most of his units with AAA, I'd have no other option than to put nerve gas on (as it was, Sparta+AeroComplex+Power proved enough).

Crawlers, again - I noticed two, both crawling undeveloped minerals outside of the base radius.

The AI helped me a lot with techs, both willingly and unwillingly. I think I'd like to talk with Yitzi to have an optional rule to implement those 'security interlocks' for the AI bases, making them harder to probe.

You guys mentioned pathfinding - how does it look and what do you think about teaching the AI proper landing techniques? The Hive did disembark some two of his units, but it was as relevant as it sounds. Is it possible to prepare at least a decent invasion and to force the HP to actually spare resources to patrol nearby waters? A must-do in multi-player, a complete waste of time in single.

Cherry on top, I'm happy to share this image. It's the Great Dunes terraformed by the Hivers. Before, I would never believe you this was done by the AI.  :o It's really, and I mean really awesome. Notice the cute crawler! All in all, several factions in this game fare actually pretty well.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #115 on: April 22, 2014, 11:14:23 PM »
Anything to relate about (AI?) structure?  A line or two of hard-tech talk won't hurt and might attract the tech hardcore...  English for the rest of us is also good.
Thanks, for the English part. Please correct whatever is necessary.

(OK, next lines are obviously full of speculations. It is not technical info. I posted bits of this info here and there in the threads on ac2.)
The structure of AI in SMAC is quite unique, in both the good and the bad way. In trying to strengthen the role-playing aspect, the creators went very far. They let AI play a specific role in the story, weekening its reasoning in the process. We can easily see the fruits of this approach in AI diplomacy and SE agendas, as AI pursues those who contradict its likings and strictly follows preferred agendas, even if it hurts.

The second step is less obvious. Not only did the programmers made the AI specific for every faction (in 1999, which is now slowly becoming a modern standard), they made it customizable from the faction .txt files. Vast majority of AI processes are decided with strong contribution of 5 numbers, namely those called
Quote
ai-fight, ai-power, ai-tech, ai-wealth, ai-growth
From these numbers, ai-fight is by far the most influential [-1,0,1]. We could compare its meaning to the famous Builder/Hybrid/Warlord distinction from Vel's guide. A few number combinations give very feeble performances of the AI (Morgan, Zak, Santi), while another one (Hive) is really succesful (11010). Simple overwriting of all values to Hive's ones should result in slightly better performance.

The dilemma of the SMAC 444 project is: to create a competitive AI, it is necessary to minimize this customization feature. The AI should react based on situation and its factors, and not according to its "nature", since this makes it predictable and mostly stupid. Also, the factions should be more free to divert from their preferred settings, like human player does. I tried to conserve the variation, but the results (for Morgan etc.) remain feeble. So, reluctantly, the AI patch will change this RPG and AI-customization feature of the game.

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #116 on: April 23, 2014, 12:01:21 AM »
Yeah, it came to me that by encouraging tech sharing you probably made them do so indiscriminately, i.e. Miri trades with Zak, etc. Well, I will kinda miss their stupid bigotry, but definitely not if they improve their play. One thing comes to my mind - I'm quite sure I read somewhere that there are traditional pairs of factions bound only by mutual hate - Miriam hates Zak and vice versa even before the relevant SE is a factor, the same goes for Deedee with Morgan and Hive with Lal. I guess Santi hates everybody's guts equally. Can you confirm this info somehow? I have no idea now where I read it.

I can further confirm that the AI does leave bases with Infrantry to attack, however I fail to see anything new in their air force behaviour. They do build some air units, Aero-C and AAA, but nothing to write home about.

Still, I've just had a great game!  ;b; As is tradition, the Hive was coming top.

Offline kyrub

Re: Improving AI - what are the priorities?
« Reply #117 on: April 24, 2014, 09:15:17 AM »
My neighbour Lal definitely overdid probe teams (I have like 60 kills under my belt) and it's not the first time I see AI in your patch producing way too many spies.
The overprobing is a side effect of strengthening the rovers. Funnily enough, AIs still don't build rovers but they produce more probes on rover chassis. The other factor may be the fact that the AIs use a lot of Fundamentalism, for now.

Quote
I got to the air power era, but can't say I noticed any groundbreaking changes - Lal went for my crawlers as usual
There are changes to air power, maybe your special style of OCC (sitting back?) made you less aware of them. I will  look into ignoring crawlers again, I think I left that one out, since I avoid crawlers anyway. AAAs should be more frequent, this can be done, although I am always weighing between ECM, AAA or trance, and I simply cannot choose just one. That is bad design per definitionem.

Quote
how does it look and what do you think about teaching the AI proper landing techniques? The Hive did disembark some two of his units, but it was as relevant as it sounds. Is it possible to prepare at least a decent invasion and to force the HP to actually spare resources to patrol nearby waters? A must-do in multi-player, a complete waste of time in single.
That is pretty hard (too hard I am afraid), but it would really improve the game, I agree. My idea was at least: to force AI to use heavy transports. That would get +50% invasion troops, still not much, but occasionnally they can pull a surprise. On the larger chassis, that could be a small invasion force already.

Quote
Cherry on top, I'm happy to share this image.
Nice that you enjoy it. I am a borehole away from being happy as well.

Quote
Miriam hates Zak and vice versa even before the relevant SE is a factor, the same goes for Deedee with Morgan and Hive with Lal. I guess Santi hates everybody's guts equally. Can you confirm this info somehow?
Sorry. My knowledge of AI-AI diplomacy is limited. There are several places in Diplo code where specific factions are treated differently, regardless of "ai constants", that I can confirm.

Offline Kirov

Re: Improving AI - what are the priorities?
« Reply #118 on: April 24, 2014, 01:50:29 PM »
Well, I took it to the AI's turf, taking their bases and starving them down just to serve as outposts, in spirit of OCC. It's true that AI had 1, sometimes 2 AAA garrison units, quite often one ECM. Very nice, but I remember such scenarios in vanilla SMAX and this is still not nearly enough to stop the HP. Can you dabble with specific infrastructure choices? What's really annoying and has the potential to slow down my advances is AAA combined with A-Complexes. Works best with sensors under the base tile (I do take time to bombard these), but that's probably asking for too much.

I'm not sure if I would recommend Trance as on par with AAA and ECM, though. The order I'd pick is AAA, ECM, then maybe some Trance.

I noticed an interesting thing in this game - my Elite 8-1-10 jets against Lal's 1-4-1 AAA had combat odds at 24:25  but I swear I won more than 75% such fights. I understand that there sure is probability for that, it just made me think if the odds take the chances directly from the combat engine or are calculated separately and can be off if the rules change. I know for sure there is at least one error in calculating the odds - when fighting mind worms, your reactors better than fission actually do not work and are treated as fission, but the odds still are improved (e.g. your fusion infantry actually still has the 3:2 chance against a worm, but the game will say 6:2).

Can't agree more with that borehole thing.

As for diplomacy, I'd love to know more details about how it works, let me know if you ever want to check it out. I understand that the basics are simple - there is a scale of friendliness and you score on it depends on the actions. However, there are some quirks that always threw me off. The AI offers you a tech trade, but when you refuse and immediately offer the same deal, you are met with 'go to hell'. SE choices sometimes look like they change everything (a loyal ally can break a pact just because of that) and sometimes like they mean jack s*. And so on. And of course, I'd like to have a detailed table about the points awarded for each interaction - trades, tech gifts, base gifts, SE etc.

Offline Kilkakon

  • Likes cute things but is
  • Mostly Harmless
  • *
  • Posts: 1155
  • €695
  • View Inventory
  • Send /Gift
  • It does something (It's free and yet priceless)  
  • Creator of Lost Eden and C&C: Dawn of Tomorrow
  • Scenario Creator Custom Faction Modder AC2 Hall Of Fame AC2 Wiki contributor Downloads Contributor Author of at least one AAR Planet tales writer author of the Lost Eden mod for Alien Crossfire
    • View Profile
    • My website!
    • Awards
Re: Improving AI - what are the priorities?
« Reply #119 on: April 25, 2014, 04:28:02 AM »
Just a quick note, I have managed to bump into your work elsewhere Kyrub, like your X-COM stuff. :D Good on you, you're doing good work for everybody. :D

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


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

What do I care for your suffering? Pain, even agony, is no more than information before the senses, data fed to the computer of the mind. The lesson is simple: you have received the information, now act on it. Take control of the input and you shall become master of the output.
~Chairman Sheng-ji Yang 'Essays on Mind and Matter'

* 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: 47 - 1280KB. (show)
Queries used: 45.

[Show Queries]