Author Topic: AI improvement  (Read 2803 times)

0 Members and 1 Guest are viewing this topic.

Re: AI improvement
« Reply #15 on: August 12, 2020, 01:27:37 PM »
> I disagree, though, with some rigid simple parameters.

Even if it was predictable it would force the player into dedicating resources into defence and slow his development significantly.
I've only proposed the lowest possible effort version, if you would want to put more work and naunce into it, it's of course only for the better.
The bottom line is, the player shouldn't be allowed to play pure builder game unperturbed, the weakness should be exploited.

Sorry, it sounded too negatively. I didn't mean to reject it completely. Yes, you are right. We can start with something and then keep tuning it.

Re: AI improvement
« Reply #16 on: August 12, 2020, 01:30:02 PM »
Quote
Clean reactor solution is more of a cheat to make existing AI performing better, not AI enhancement by itself. Plausible solution but it doesn't change situation drastically - doesn't make AI smarter.
AI can't deal with SUPPORT. It has cheat-tier INDUSTRY to compensate for it though, but not even churning units 50% faster than a player can help it if it has no minerals to build with. Ultimately, it's a quick hack to enable already existing hacks to work properly.

That is right again. I shouldn't discard it right away.

From the other side, wouldn't it be too much to give AI all clean units? Wouldn't it keep stamping units infinitely then?

Re: AI improvement
« Reply #17 on: August 12, 2020, 01:32:53 PM »
(also, I hate the disband mechanics with a passion... after capturing a base its units are assigned to the nearest bases, which could cause one to lose an army without a fight by losing several bases those units were assigned to. They get reassigned to other bases that can't support them, and then disband at the beginning of the turn, without the player's input)

I thought about home reassignment at the beginning of each turn for AI. Should fix this particular problem. It is not even AI improvement just a fix for mechanics simplification.

Re: AI improvement
« Reply #18 on: August 12, 2020, 01:38:37 PM »
Quote
Interesting. Cannot say anything on that as I didn't observe it myself. Is this for the first citizen only or for any drones in any base size? Does AI completely ignore drone facilities?
This is an illustration. The first citizen could be easily suppressed by a police unit, allowing them to build a more permanent arrangement. They go for building RecCommons on a base that riots half the time instead, and turn its sole worker into a Doctor.

Any use of Police is completely incidental. They never switch to gathering energy on purpose to put into Psych, preferring to brute force the problem with specialists. Most drone control is done via direct suppression facilities (RecCommont, Holo Tanks) and basic specialists for when they are not enough.

So AI doesn't "plan" for police usage. Got it. Thank you for explanation.

Re: AI improvement
« Reply #19 on: August 12, 2020, 01:42:07 PM »
Not research priorities, but resource gathering priorities. I've read the AI prioritizes nutrients in the beginning, minerals towards midgame, and energy in the lategame, though I obviously didn't look at the code to verify that.

Ah, you mean workers placement to specific tiles? As far as I can tell there are two types: one for Discovery where it prefers energy over minerals and one for other governors where it prefers minerals over energy. The energy over minerals type also obviously maximizes nutrients also.

Offline Tayta Malikai

Re: AI improvement
« Reply #20 on: August 12, 2020, 02:07:18 PM »
Quote
Clean reactor solution is more of a cheat to make existing AI performing better, not AI enhancement by itself. Plausible solution but it doesn't change situation drastically - doesn't make AI smarter.
AI can't deal with SUPPORT. It has cheat-tier INDUSTRY to compensate for it though, but not even churning units 50% faster than a player can help it if it has no minerals to build with. Ultimately, it's a quick hack to enable already existing hacks to work properly.

That is right again. I shouldn't discard it right away.

From the other side, wouldn't it be too much to give AI all clean units? Wouldn't it keep stamping units infinitely then?
Is this implying that it would be possible to modify the game to exempt AI factions from support mechanics? It might sound radical, but the AI has serious problems choking itself with units it doesn't know how to use properly, so if that's what it takes to get around this issue...

In any case, the AI already relies on quantity of production to pose a challenge to the player, so I don't see that it would cause any real issues.

Nevill's mod made Clean Reactor available from the start with a cost factor of -2 (increases with weapon value), so purely defensive units could equip it for free. I found it to be a very agreeable change: you'd still be obliged to use support minerals to sustain an invasion force, but being able to quickly explore the map and deploy garrisons in the era of 3 minerals per base lets you consolidate quickly and better hedge against worm attacks. Since it still takes an ability slot, and 2 abilities per unit gets delayed to tier 5, you also still have to pay support costs for police and trance units, which is a reasonable tradeoff to make.

The only issue is, as Nevill said, the AI doesn't know to take advantage of this. But that could presumably be fixed, if deemed worth the effort.

MercantileInterest's Binary Dawn doesn't go quite that far, only making the preset Scout Patrols come with Clean Reactors (which players agree not to reverse-engineer for other units). I haven't played it myself, but AFAICT, it has no significant imbalancing effect on the game. Players are not going to rely on scouts for defense in any serious war anyway.

Offline Nevill

Re: AI improvement
« Reply #21 on: August 12, 2020, 02:47:33 PM »
Quote
Is this implying that it would be possible to modify the game to exempt AI factions from support mechanics?
I would add that I experimented with having separate faction files for AIs and humans, and that I gave AIs FREEABIL, Clean, which is essentially this.

It did make them build tons of clean units except for formers and pre-designed units that were not clean, but I found it to be an improvement. At least those synthmetal hordes didn't kill off AI production, and eventually it would amass a force, go to war, and kill off the weaker designs, forcing it to rebuild the army with newer specs.

Miriam would end up with 100+ combat units and devastating everyone except Yang whose AI made him build 200+ combat units. :D

I also experimented with faction aggression and Conquer/Build/Discover/Explore values, but as I didn't have access to the code it was all empirical. Pacifist factions didn't fare well, and that is as much as I remember.

Re: AI improvement
« Reply #22 on: August 12, 2020, 03:49:06 PM »
Yea. Need to ponder how to make is nicely and not overdo it. All clean combat units would certainly favor military factions, though.

Offline lolada

Re: AI improvement
« Reply #23 on: August 31, 2020, 12:46:46 PM »
Regarding difficulty, Trascend is plenty hard in WTP for longest duration so i think thats in good place. Vanilla Transcend is often already useless with Needlejet tech for example.

I like bvanevery approach - identify single large important problem and fix it.

1. SUPPORT - AI killing itself with no minerals - its very important issue and if fixed it would be noticable

Some solutions: for example people reported that AI plays much better if gifted +2 default SUPPORT. That won't fix lategame maddnes, i've seen AIs go 10+ units into minus. One could try to code AI not to go over x amount of minerals in minus or just give extra support for large bases.

2. Terrain improvement - terraforming and fungus - AI used to destroy itself in WTP with fungus. I see that Fungicide formers are now free upgrade - thats great. Maybe, if not already in game, AI should rebuild its formers to always have at least 1 per base. Then ecology fix need to be put in place - I've seen free minerals were increased to 24 thats good. And we have new terraforming AI. This means this problem might be fixed now - but if not, one could iterate over it because its really important

3. Third large issue is production queue / choice - AI does not build some relevant facilities in time or ever. They skip drone quelling facilities, while I as player put great importance to them. Any resource boosting facilities are very important for example. AI tended to ignore Tree farm even with huge eco problems. One thing to note as well - AI should recognize when it lost the facitilies (to worms usually) and rebuild it. I think this happens more often than we think and then late AI can have pathetic bases even if they are large in size.

Re: AI improvement
« Reply #24 on: August 31, 2020, 07:39:46 PM »
1. SUPPORT - AI killing itself with no minerals - its very important issue and if fixed it would be noticable

Some solutions: for example people reported that AI plays much better if gifted +2 default SUPPORT. That won't fix lategame maddnes, i've seen AIs go 10+ units into minus. One could try to code AI not to go over x amount of minerals in minus or just give extra support for large bases.

I guess the problem with AI units is not that bases cannot support required number of units but that units are wandered aimlessly upon building and eating support for nothing. While AI keeps building them over and over. So the real solution would be to teach AI to 1) use unit effectively - throw attack units in battle as soon as possible or disband them at peace time, 2) to no overproduce them if there is no need for them. Easy say than do, though. 😁

Fiddling with support won't help if they keep and keep producing units. They will either suffocate from oversupport or, if we give them all free units, they will grow their armies out of proportion. Although, the latter one is not that bad for AI to be able to defend themselves, though. Could work as an ugly temporary fix.

2. Terrain improvement - terraforming and fungus - AI used to destroy itself in WTP with fungus. I see that Fungicide formers are now free upgrade - thats great. Maybe, if not already in game, AI should rebuild its formers to always have at least 1 per base. Then ecology fix need to be put in place - I've seen free minerals were increased to 24 thats good. And we have new terraforming AI. This means this problem might be fixed now - but if not, one could iterate over it because its really important

You mean fungus pops? They are happening to everybody. Overall, AI is pretty good with terraforming as long as it has decent production to build formers. Every time I struggle with as fast terraforming as possible, they do it even faster and cover their whole territory with mirrors and boreholes. If fungal pop happens to AI at the same frequency as to human, they should not have problem dealing with them and reterraform fungus in time. So, I guess, the question here is again in AI inability to handle ecodamage on all levels which results in overly excessive number of pops overwhelming their terraforming capacity. They should limit their bases mineral output as well as build eco facilities. Again, this is an AI production tuning which I didn't touch yet.

3. Third large issue is production queue / choice - AI does not build some relevant facilities in time or ever. They skip drone quelling facilities, while I as player put great importance to them. Any resource boosting facilities are very important for example. AI tended to ignore Tree farm even with huge eco problems. One thing to note as well - AI should recognize when it lost the facitilies (to worms usually) and rebuild it. I think this happens more often than we think and then late AI can have pathetic bases even if they are large in size.

Exactly! See my response to your point #2.

Summary

All the above require tweaking 1) production priorities, 2) prototyping, 3) units handling. Thinker somehow touched these subjects, which is an improvement to vanilla, but as far as I see, not that deeply. Out of these two the first one is much easier to do - just select from limited list of available production items. Unit handling is a huge work. A lot of coordination between units and there is an easy way to make things worse. I cannot even imagine how to do it incrementally - meaning do just one single aspect without touching others, etc.

AI modification goes beyond WTP scope. I don't absolutely mind doing it. This is fun in general. Unfortunately, it doesn't fit into my free time slots nicely. I can do programming and if someone can help me out with design/algorithms and testing/tuning, that would speed up things quite a lot.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: AI improvement
« Reply #25 on: September 01, 2020, 06:05:45 AM »
I cannot even imagine how to do it incrementally - meaning do just one single aspect without touching others, etc.

Stare hard at OpenSMACX sources for awhile.  See if anything is identifiable as separable.  Talk to Scient about what might be separable.

Trying to go at this straight in the binary, is production suicide.  That's why I've never undertaken it, and keep saying I'll put the effort into writing a brand new 4X game.  Scient has already "committed suicide".  So the important thing, going forwards in the future, is trying to leverage his work.

Re: AI improvement
« Reply #26 on: September 01, 2020, 03:11:16 PM »
I cannot even imagine how to do it incrementally - meaning do just one single aspect without touching others, etc.

Stare hard at OpenSMACX sources for awhile.  See if anything is identifiable as separable.  Talk to Scient about what might be separable.

Trying to go at this straight in the binary, is production suicide.  That's why I've never undertaken it, and keep saying I'll put the effort into writing a brand new 4X game.  Scient has already "committed suicide".  So the important thing, going forwards in the future, is trying to leverage his work.

1. I don't have a lot of "awiles" to go about. 😁😟
2. Scent disassembled original game. He didn't modified it. I am in a constant contact with him as needed and used his findings quite a lot. Still takes some work to do it even with his help.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: AI improvement
« Reply #27 on: September 01, 2020, 07:04:15 PM »
Of course it takes piles of work.  That's why I don't do it!  I'm going to put that kind of time into a new 4X game that can make me money.  My hope is that Scient's disassembly and presumed C-ification (? I've never looked at his code) provides a basis for modding.  Elbow grease of actually modding is left as an exercise to the reader.

I don't expect Induktio's codebase to be suited to the task of pulling out and dealing with these most thorny AI issues, because as you said, he didn't address the things you want to address.  That leads me to believe it isn't easy to get to square one with such things.  But I've never stared at Thinker Mod code for longer than 3 seconds, so YMMV.

I am guessing that Scient is pursuing the long-term sustainable project and Induktio isn't.  From a strategic open source standpoint, it would make more sense if Induktio started migrating his work to OpenSMACX.  I mean if everyone has to be "Induktio smart and motivated" to do AI mods, nobody but Induktio is ever going to make progress banging on the AI.  There has to be a code base where people aren't dinking around with disassembly to get at the AI.

Re: AI improvement
« Reply #28 on: September 01, 2020, 09:49:30 PM »
I am guessing that Scient is pursuing the long-term sustainable project and Induktio isn't.  From a strategic open source standpoint, it would make more sense if Induktio started migrating his work to OpenSMACX.

OpenSMACX is not operational.

I mean if everyone has to be "Induktio smart and motivated" to do AI mods, nobody but Induktio is ever going to make progress banging on the AI.  There has to be a code base where people aren't dinking around with disassembly to get at the AI.

I don't think it is that specific. Most of the people just don't bother with exe modding at all. I think I've seen and heard about 50 different text mods and only 3 exe (two of which are actually just patches). That's all there is.

And AI improvement is a completely different beast than patching stuff. Aside from disassembling one also need to introduce some new exceptionally convoluted algorithms which is about 100 times more difficult than any disassembling.
That is why I am calling for help as it seems to be exceptionally heavy burden just for single person fun project.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: AI improvement
« Reply #29 on: September 02, 2020, 03:57:15 AM »
I'm playing right now with something called terranx_opensmacx_debug.exe, so something is operational.  Scient cooked this up at least for me, maybe for more purpose than that, I'm a little unclear.  Not sure how much OpenSMACX it is, but it's some kind of code injection.  What I actually get out of it, is saved games every 10 turns forever, and the 1st turn saved automatically without getting munged.  The hope is that having provided this "tripwire" system, one of these days I'm going to stumble on one of these "rarely surfacing" bugs and be able to report back what happened, for tracing and conquest.

Quote
I think I've seen and heard about 50 different text mods and only 3 exe

Well how many games need .exe mods?  And how many games are old enough, and need .exe mods, and are substantial enough games that have withstood the test of time, to be worth modding?  And have someone skilled enough in their communities, to have poured blood on the table to do it?

Quote
And AI improvement is a completely different beast than patching stuff.

Not completely different.  For instance, there's probably some simple formula somewhere that regulates SUPPORT decisions.  Or not-so-simple, but tractable as 1 routine that Scient may have pulled his hair out deconstructing.  Or could.  When those single points of control are identified, their formulae can be fixed.  These can have huge impacts on the game.  I mean my Clean Reactors hack demonstrates the power of such approaches without any programming at all, just changing the resource basis of a game.  Much can be done with adjusting formulas.

For all we know, forensically "combat stupidity" when attacking a city might be some bad weight somewhere.  Or sending all these units to mill in the hinterland.  It's possible to tell the AI to "Go fight this city!" in the diplomatic dialogues, a feature I haven't used since the stone ages.  Well what if there are intelligible function entry points for controlling that?

It's like, what's under the damn car's hood?  Maybe there's some doo dad sticking up (that's a technical term) and maybe there's gunk all over it.  You don't have to redesign a car to make it run better.

 

* 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

We welcome you, earthdeidre and earthwheat and earthtree as
honored guests, for you add great power to our ancient song?
planetfungus and planetworm and planetmind sing and play
here, and you are welcome among us.
~Lady Deidre Skye 'Conversation with Planet'

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

[Show Queries]