Alpha Centauri 2

Sid Meier's Alpha Centauri & Alien Crossfire => Modding => Topic started by: Bearu on April 24, 2020, 08:33:46 pm

Title: An explanation for the AI rarely running Green
Post by: Bearu on April 24, 2020, 08:33:46 pm
The important components of understanding the reasons for the AI's refusal to run Green remains a product of four factors.
The first factor consists of the original Green model in the stock game providing a negative in GROWTH. Explore factions emphasize Growth bonuses and penalties heavily.
The second component for the refusal of the AI to run Green remains the minimal AI emphasis on Planet either until late in the game or never.
The third factor consists of the lack of emphasis for the AI on Efficiency for Explore factions.
The fourth reason remains the removal of the social emphasis factor in the Player file for the stock game. The randomize faction social agenda rule provides the appropriate value for social effects emphasis, but the game without that rule disables the benefit of Social AI Emphasis on the AI. The disabled social emphasis benefit in the player files adds the number of bases a faction controls for the overall effect value for each model calculated.

I would recommend changing the social model penalty for Green to something an EXPLORE AI emphasizes less like INDUSTRY. The Peacekeepers, Gaians, and University receive a .5 modifier for INDUSTRY and no other positive emphasis in INDUSTRY.
With .exe modifying, I changed the initial 4 - PLANET to 2 - PLANET, and the AI runs Green consistently with ECONOMY and INDUSTRY penalties and a RESEARCH bonus.

I discuss the specific variables for the stock Green model below in all the details.
PLANET Variables
Important variables for understanding Planet Calculations:
Sum of the all the Bases under a single Owner:
Base Ecodamage * 4 / 4 - PLANET (Min. 1 and max. of 99)

1. Start with 4 - Sum of PLANET Values for considered social models and inherent faction bonuses.
2. Multiply the difference from Line 1 by sum for all bases the current faction controls of (Base Ecodamage * 4 / (4 - PLANET (Min. 1 and max. of 99)))
3. Multiply the product of step #2 by 4.
4. Add 25% of line 3 to the final value.
5. Check if the faction possesses an inherent faction bonus for Planet. Jump if +1 or higher and add the number of combat units the faction controls to the total value for planet.
6. If the faction does not possess an inherent Planet bonus, then check the strongest weapon the faction discovered in the game against the value of PSI weapons for the faction. If the faction's strongest weapon discovered exceeds the modified PSI value, then jump into the social mandate controls. (Most factions strongest weapon values will exceed the faction's modified psi value)
7. If the above check succeeded, check if the local variable for faction technological check remains equal to or greater than 2. Jump if 1 or less. If 2 or more, then halve the PLANET value.
8. Perform the Mandate checks discussed below:
Non-Conquer and Explore (In this specific order):
Explore and Discover: X 1 (The Peacekeepers)
Explore: X 4 (The Gaians)

Non-Conquer and Non-Explore (In this specific order):
Build: X .5 (The Morganites)
Build and Discover: X.5
Discover: X .5 (The University)

Conquer and any other mandate (In the order below):
Conquer and Explore: X 1 (The Believers)
Conquer and Discover: X .25 (The Spartans)
Conquer and Build: X .25 (The Hive)
Conquer, Discover, and Build: X .25
Conquer, Explore, and Discover: X 1
Conquer, Build, Discover, and Explore: X 1

GROWTH Variables:
Important Constants: Sum the surplus nutrients from each base the current faction controls (between 0-99 per base) in turn upkeep.
1. Insert (EXPLORE mandate value X 2 + 2)
2. Subtract Build Mandate Value: (EXPLORE mandate value X 2 + 2) - BUILD mandate
3. Sum of surplus nutrients from each base owned by the current faction (between 0-99 per base) in turn upkeep + Sum of differences between the faction bases' current population and Population goal (Next Hab facility + POPULATION) * ((EXPLORE mandate value X 2 + 2) - BUILD mandate)
4. Line 3 * Number of units with the Colonization AI plan the current faction controls + 1.
5. Line 4 * GROWTH value (no upper or lower limit) from Social engineering modifiers and faction modifiers
6. Line 5 * 2 / 3
7. Line 6 * 2 if the current faction possesses the most votes in a game with Diplomatic victory enabled and no cooperative victory enabled.
8. Multiply the value * .5 if the faction possesses tightened Habitation restrictions from the Faction bonuses and penalties (POPULATION > 0).
9. Proceed with the Mandate checks. Multiple Line 7 or 8 * 2 for factions with EXPLORE and CONQUER mandates in stock game.

EFFICIENCY Variables:
Local value used in the entry ranges Efficiency from 0 to 8 with -4 at 0 and +4 at 8.
1. -3 EFFICIENCY combinations: Modified EFFICIENCY value ( 1 ) X 2
2. -4 EFFICIENCY combinations: Modified EFFICIENCY value ( 0 ) X 4
3. Perform the Mandate checks described below:
Build: X 2 (The Morganites and the Drones)
Build and Conquer: X 1 (The Hive)
Build, Explore, and Conquer: X 1
Build, Discover, Explore, and Conquer: X 1
Conquer: X .5
Conquer and Explore: X .5 (The Believers)
Discover: X 2 (The University)
Discover and Conquer: X .5 (The Spartans)
Discover and Explore: X 1 (The Peacekeepers)
Discover and Build: X 2
Explore: X 1 (The Gaians)

Edit: Added the population goal modifier for GROWTH. I forgot to include this variable.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on April 24, 2020, 09:30:35 pm
Interesting and strange logic. Especially the bit about considering PSI attack vs weapons, since it's always 3:2. I know what they were getting at, if your weapons are weak then you'd be more tempted to run PSI units instead, but it's so flawed. The check should be like your weapons and armor vs any factions you're at war with.

Not surprised with the units bit, I'd noticed it too. Games where a faction gets Manifold Nexus and captures a few mind worms, they were more likely to go Green.

Like I said in the other the way they formulated SE choosing is not really how a human goes about it. Green is extremely non-linear in benefit. There is a breakpoint where even Trance barely overcomes PSI, and then there's not much else except artillery. A stronger model would be to put arbitrary weights to each aggregate SE (which each could be modified by faction agenda) and then maximize total points. But I'm not sure how workable that would be.

And as much as psi unit count and weapons matter, they rank way below things like whether you have Dream Twister, Neural Amplifier, or faction PSI
Title: Re: An explanation for the AI rarely running Green
Post by: Bearu on April 25, 2020, 03:23:56 am
I believe if someone rewrites  most of the original code in the section, then it might remain possible to fit your changes in the logic for the AI selection. The developers already added modifiers for SUPPORT, EFFIC, MORALE, and ECONOMY.
I find most interesting the game's internal logic illustrates the eco-damage reduction and increase portion of PLANET bonuses and penalties remained the core of the mechanic. The PSI bonus and penalties, capture mind worms, and fungus penalties appear as later additions.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on April 25, 2020, 02:07:33 pm
Yea it is curious. Especially where the AI ended up getting a massive ecodamage reduction compared to the human player. Somewhere around 1/8th so it rarely shows up. That was a lot of the reason I sort of gave up on modding ecodamage to be the primary consideration for PLANET. Ecodamage became secondary to PSI combat benefits. Because by the time the AI suffers any ecodamage at all, the human player would be overwhelmed by it.

Maybe they did this because it interfered with clean minerals or the worm pop progression I'm not sure... I think the intent really was to have ecodamage be an equal consideration to PSI benefits. I'd also have to check whether the AI considers the ecodamage facilities when under high ecodamage... my feeling is there isn't any logic there. Much like how they missed things like factions not rebuilding their HQ, or considering Punishment Spheres situationally
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on April 25, 2020, 11:50:07 pm
I said score when what I envisioned was more like a value that would represent the estimated power increase in percent. Then from 100% the total benefit would be all the SE scores multiplied together. I imagine right now the AI only picks the best total value in each category independently... at least the way it's described in your analysis. I've kind of noticed this... overpicking SEs that don't really 'go together' as a result. And underpicking ones that do.

So like maximize 1.00 * (1 + ECONOMY %) * (1 + GROWTH %) ... etc for all SEs.

The ECONOMY % value would be negative if below 0. The base values could still be modified by faction agenda or other factors like SPs or whether at war (fight). This assumes all the SEs are independent, which they aren't entirely. Such as ECONOMY, RESEARCH, EFFIC being positively correlated, PROBE and RESEARCH might be the best example of negatively correlated
Title: Re: An explanation for the AI rarely running Green
Post by: Bearu on April 26, 2020, 01:56:29 am
From my understanding of the code, the AI sums the total of all the Social modifiers for the social models the faction has discovered and can run in the game (ie. ignores the player file aversion). The AI considers IMPUNITY, PENALTY,  Cloning Vat's impunity for Power and Thought Control, Network Backbone's impunity for cybernetic in the calculation of each social model's social effect values. Then the code modifies the sum of values with the Living Refinery's +2 SUPPORT, Ascetic Virtue's +1 POLICE, Manifold Nexus benefits for humans and Aliens, Faction SOCIAL benefits and penalties, ROBUST for the appropriate social effect (1/2 negative value), and Immunity for the appropriate Social effect (set to zero for appropriate negative value).  You then proceed and modify the values in the code laid out by the section and add or subtract values from the sum in local 1 dependent on the specific effect. The AI chooses the social models providing the best overall point benefit from the different modifiers. The maximum point value remains 256 points for combined sum of all the different values.

I split the different social effects because the social effect modifiers favor specific factions and provide more insight into why certain factions run certain social models. This explains unusual AI social model selection before the discovery of more social models. The process also includes changes in the game state relevant to the modified values where one value exceeds another value at some point.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on April 26, 2020, 03:28:13 am
Ah so it is better than I thought. I suppose the AI can't consider 'every' SE super important but here's my feelings on priority:

ECONOMY - underrates it strongly
EFFIC - about right (underrated for expansive empires)
SUPPORT - about right (overrated if it made clean units more as it should)
MORALE - overrates it
POLICE - about right (underrated if it made police units more as it should)
GROWTH - about right (though underrates stacking it to high amounts)
PLANET - about right (underrated strongly for factions with PSI or SPs that give PSI)
PROBE - about right
INDUSTRY - about right (though underrates stacking it to high amounts)
RESEARCH - about right

Others may have differing opinions. That feels like more underrated than over...but I guess its relative to those in the middle.
Title: Re: An explanation for the AI rarely running Green
Post by: Induktio on April 27, 2020, 06:36:41 pm
I believe if someone rewrites  most of the original code in the section, then it might remain possible to fit your changes in the logic for the AI selection. The developers already added modifiers for SUPPORT, EFFIC, MORALE, and ECONOMY.

That has been done already if you refer to the social engineering model selection here. I rewrote all of that logic in Thinker Mod so that the AI would be able to consider the cumulative benefits of various social models and switch them based on the need to pop boom, for example. The config option is called "social_ai" in thinker.ini. The original code looked like such a mess I didn't see any point in patching it. It was very difficult to see any kind of clear logic in it, but I had only the raw disassembled form to work with.

As with most of the decision making in Thinker, the AI now iterates through all possible SE model changes each turn, calculates a score for each of them (plus some randomness), and then switches the SE model if necessary. Now the choices are much more like what a human player would do given a particular faction, but the AI still tries to maintain the flavor related to each faction.
Title: Re: An explanation for the AI rarely running Green
Post by: bvanevery on April 28, 2020, 02:42:54 am
Because by the time the AI suffers any ecodamage at all, the human player would be overwhelmed by it.

Which is the huge problem of Thinker Mod IMO.  It goes to town on this huge differential in ecodamage, building just silly numbers of Condensers and Boreholes that would put a human player 4000 meters underwater.  The original devs didn't do that.  They probably realized that 1/8th eco-damage was a hack to solve some other problem they were having.  Wasn't their plan to make that the way for the AI to curb stomp a human.

As for penalizing Green, although I might theoretically be interested in trying the INDUSTRY penalty idea, in practice I like everyone having an absolutely uniform amount of INDUSTRY.  When you aren't worrying about whether you can complete a Secret Project a little bit faster, it saves a lot of stress about switching back and forth between SE choices.  I don't miss having INDUSTRY as a tweak at all.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on May 03, 2020, 12:49:09 am
To add on this, the AI still doesn't really like Green all that much with penalties removed. AI seems to calculate a zero benefit for PLANET or EFFIC. Situationally it's taken still.

As far as the social emphasis, I have noticed that factions very rarely pick SEs outside their agenda. They'll often take Frontier/Simple/Survival if they don't like the benefits of their agenda. Which is nonsensical when their agenda has no downside

I suppose I can give Green a tertiery benefit, maybe GROWTH or RESEARCH, representing well-being or the knowledge that comes out of preserving planet. AI also seems to ignore TALENT which I think was mentioned before
Title: Re: An explanation for the AI rarely running Green
Post by: Bearu on May 03, 2020, 04:07:37 am
To add on this, the AI still doesn't really like Green all that much with penalties removed. AI seems to calculate a zero benefit for PLANET or EFFIC. Situationally it's taken still.

As far as the social emphasis, I have noticed that factions very rarely pick SEs outside their agenda. They'll often take Frontier/Simple/Survival if they don't like the benefits of their agenda. Which is nonsensical when their agenda has no downside

I suppose I can give Green a tertiery benefit, maybe GROWTH or RESEARCH, representing well-being or the knowledge that comes out of preserving planet. AI also seems to ignore TALENT which I think was mentioned before
I noticed the same behavior in the stock game. I cannot recommend much to fix the problem with the stock AI because the game's selection of the PLANET score remains very skewed. The AI needs a high sum of eco-damage for any significant positive values in PLANET, yet Eco-damage mostly originates from terraforming improvements and atrocities. These causes of eco-damage remain rare occurrences for the AI.
The AI does not explicitly ignore the TALENT value. The AI instead combines the TALENT score with a second round of POLICE modifiers in the code. I specifically targeted the area for a revision because the original code mixes the POLICE values twice in two separate calculations after the location developers clearly intended the original code for TALENT. In other words, the stock game confounds the variables.

More Details:
In the stock game, POLICE calculates POLICE values for 0 to -4 in one section and POLICE scores -5 to + 3 becomes modified into 0 to 8 for a second section of calculations with TALENT. The TALENT score from -4 to +3 as 0 to 7 gets added into the modified POLICE value in the second section.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on May 03, 2020, 05:01:38 am
Ah, interesting. Yes and also the AI gets a massive ecodamage reduction somewhere around 1/5th to 1/8th of a human player. So they need really low PLANET to care about PLANET. Which is a catch-22, of course. I'm guessing they had ecodamage as a primary consideration then realised the AI couldn't deal with it well, or it was causing global worm pop progression to get out of hand. Probably it wouldn't be too fun to the human player if every game had massive flooding because of AI terraforming. Ecodamage is very tough to balance I found even with all Yitzi's features added in for it. Personally I'm pretty okay with ecodamage being the secondary consideration, and PSI power being the primary. It's much harder to fight off boosted alien life with bad PLANET.

Seems you're right that +TALENT will entice Green agenda factions to consistenly pick it (at least Gaia, Cult is a bit less liking of it). As will +RESEARCH and +GROWTH. So there's a few thematic options to fix it.
Title: Re: An explanation for the AI rarely running Green
Post by: bvanevery on May 03, 2020, 07:24:36 pm
To add on this, the AI still doesn't really like Green all that much with penalties removed. AI seems to calculate a zero benefit for PLANET or EFFIC. Situationally it's taken still.

Whether the AI will take it, depends on what else is available in the same row instead, and what the faction's restrictions are.  For instance I went through periods where my Planned / Socialist was obviously way too beneficial of a choice, and all the AIs obsessed about it.  So I removed benefits from that choice, until the AI factions weren't going nuts with it anymore.  Also my Deirdre has never been allowed to choose Free Market / Capitalist, just like the stock game.  Getting her to pick Green, was the whole point of my bug workaround exercise.  Green is her compulsion, she shouldn't be balking at it.  It is far less important if anyone else chooses Green.

The broad point is you can solve some of these problems with hand tuning.

Quote
I suppose I can give Green a tertiery benefit, maybe GROWTH

That's totally anti-narrative.

Quote
or RESEARCH,

Bad idea.  It means that selecting Knowledge really isn't a decision or tradeoff the player will have to make, because you're just going to sprinkle benefits and rewards no matter what they do.  Categories should mostly provide distinct tradeoffs that a human player has to decide between.

A corollary is that you'll run out of play mechanics to compare and contrast.  There are only so many, and in my experience there aren't enough to meaningfully flesh out the table, and keep things sanely balanced.

A corollary to the corollary, is some player will complain about the choices put in front of them, because some choices seem useless or not juicy enough.  Trying to explain "this is what the AI needs to function best" takes lots and lots of repetition, if the message gets through at all.

A corollary to the corollary to the corollary, is that redesigning the play mechanics is in order.  Whether at the binary level, or in a completely new commercial game.
Title: Re: An explanation for the AI rarely running Green
Post by: bvanevery on May 03, 2020, 07:33:02 pm
I'm guessing they had ecodamage as a primary consideration then realised the AI couldn't deal with it well, or it was causing global worm pop progression to get out of hand. Probably it wouldn't be too fun to the human player if every game had massive flooding because of AI terraforming.


Indeed, and IIRC, there might have never been anything to guess at, at all.  I think the "stupid AI ruins the world with eco-damage" problem is readily observable in Civ II: Test of Time.  Can't use AI city automation because it won't build the recycling facilities and mass transit systems to mitigate the pollution problems.  Although, I could be misremembering, and it could have been Civ III.  Which would mean that nobody learned the lessons of SMAC.

Quote
It's much harder to fight off boosted alien life with bad PLANET.


Except that, in my current AAR (http://alphacentauri2.info/index.php?topic=21431.msg124501#msg124501) I've come to realize there's this killer app attribute called "Empath Song".   :D  It merely gives you the equivalent Psi attack power of the Dream Twister.  I tend to forget that I can add this.  I'm wondering if I should tone it down.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on May 03, 2020, 08:34:08 pm
I think you missed my point. I was saying that Green isn't consistently picked by the AI even if it gives +2 PLANET, +2 EFFIC with no downsides. Maybe a quarter of the time or half at best. It was preferring to say in Simple Economics the rest of the time because AI's don't like to pick choices against their Agenda. It has nothing to do with other choices in the category. And it would be the same case in your mod with +1 PLANET, +1 EFFIC.

So the question was what can Green have so the AI will always pick it? What is thematic? I went with +2 PLANET, +1 EFFIC, +1 RESEARCH instead. RESEARCH works to get Green agenda AIs to select it all the time. The concept would be that by preserving Planet, you learn about its ecosystems and therefore gain knowledge. Or just the need of having ecological researchers to properly preserve an economy.

Empath at 50% might be a bit strong. At -3 PLANET it's like going back to +0.5. At 0 PLANET it's like going to +5. And at +3 PLANET it's like having +9.5. I found that delaying dual ability units helped a lot, then you can't have the ultimate Trance+Empath native killers. Though I could see the case for decreasing Empath to around 25%. Especially with resonance weapons and armor being a thing.
Title: Re: An explanation for the AI rarely running Green
Post by: bvanevery on May 03, 2020, 08:58:34 pm
Basically I said your Planned is your problem.  You may have missed my point.

My Deirdre chooses Green.  No problem seen in my mod lately.

Think my Cha Dawn is also choosing Green lately, but haven't paid great attention, because their primary compulsion is Extremist (my Fundamentalist).  Increasing PLANET rating is merely a secondary compulsion for them.  "Nice to have".

Caretakers are compulsively Planned / Socialist.  The issue isn't relevant.

Morganites are compulsively Free Market / Capitalist.  The issue isn't relevant.

I have anecdotally seen other factions take Green on many occasions in my mod.  They often combine it with Police State.

I think the thesis that "you can't make stock AI pick Green" is wrong.  I did it.  The rest of the SE table had to bend to make it happen.  Lot of hand tuning to get real world results.

You might have other rows in the SE table, that are so beneficial, precipitating 1 clearly better choice, that this choice then affects what Economics choice is made to complement it.  Once upon a time, I felt my Fundamentalist and Planned choices were dominating in that way.  I adjusted them until they were no longer dominant to the AI.  For Fundamentalist, had to ditch MORALE, because AI loves it too much.  For Planned, had to ditch GROWTH.  Only +1 GROWTH given now.  GROWTH is seriously on a diet in my mod.

Another thing I've done, is a fair number of my factions don't have secondary compulsions.  I think sometimes this makes the AI less constrained.  I've noticed the AI will ignore secondary compulsions just fine in a number of cases though.  I'm supposing this ends up being an area of influence, not guarantee.

Delaying dual use is not an option in my mod.  I think I've made it come somewhat earlier.  I mainly want Deep Radar available to Cruisers.  I think the play mechanic of having to futz with non-Radar Cruisers is dumb.  I used to have other intended uses, particularly with various Police predefined units, but those went by the wayside in favor of single ability predefined units.  Nowadays, the relationships between my techs are pretty mature, and things are "where they should be".  It's typically a lot of work to reshuffle a tech now.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on May 03, 2020, 10:00:08 pm
After running more trial games, I found something. All AIs will consistently pick Green when the other choices have zero benefit or penalty. Except those that have FM/Planned agenda, they'll pick that even if there's no benefit. Which means the logical break isn't in not seeing that Green is better than Simple Economics. I think what's going on is that for Green agenda factions, if Free Market or Planned are strongly preferred, they stick in Simple rather than noticing that Green is the next best thing. Maybe Bearu can find something... I believe this is the bug though.

I think you got around it because at a breakpoint, a nerfed down Planned (or FM) wouldn't be considered 'strongly' better than Green. It's probably some amount of differential, since on the flip side Morgan was taking Free Market (with no benefit/penalty) over Simple and Green even when Green gave +2 PLANET, +2 EFFIC.

Seems that putting Planned to -2 ECONOMY hits that breakpoint. Gaia and Cult consistently pick Green from Simple now, with it giving just +2 PLANET, +2 EFFIC.
Title: Re: An explanation for the AI rarely running Green
Post by: bvanevery on May 04, 2020, 03:47:48 am
In the stock binary, an AI faction cannot pick something other than either their primary compulsion or the default / no choice option.  So Morgan for instance will pick Simple economy or Free Market, nothing else.  If the SE table is weighted such that he thinks Free Market is unattractive and instead takes Simple, then IMO it's a failure of the SE table design.

In some other binary modded code, it depends on what someone did to all that AI selection logic.

If an AI faction doesn't have a primary compulsion in a category, then it can pick anything that isn't an aversion.  It may take secondary compulsion hints into consideration, i.e. increase PROBE, but my experience is those hints will guarantee nothing.  Which is why I'm calling them hints.

To control what the AI chooses in the real world, I have made my SE choices "non-juicy", both for AIs and for humans.  They give mild benefits, and you'll need contributions from several categories to get significant benefits.  I call this a "mix and match" system.

In the specific case of Fundamentalist / Extremist, I specifically made the choice nearly useless to repellent.  I do not want the AIs to choose -2 RESEARCH.

To concretize exactly what I mean, about "non-juiciness" and limited dynamic range, here's a reminder if it's needed:
social engineering choices in version 1.42
social engineering choices in version 1.42

Note that this doesn't match my forum icon anymore.   :D  At one time I was a bit heavy handed on the ECONOMY penalties.

Note in particular the paucity of benefits in the Politics and Economics categories.  This is partly because these choices are easily obtained in Tier 2 of my tech tree, without any Secret Projects blocking their attainment.  This mechanic is quite deliberate.  I don't want anyone blowing the lid off the dynamic range in the early part of the game, and I want it to be easy to make some faction customizations at the beginning.

Extremist is deliberately not worth having, unless you are the Cult of Planet.  The play mechanic is between Democratic and Police State.  A fair number of factions have compulsions or aversions to these.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on May 04, 2020, 06:01:14 am
To rephrase, using Morgan as an example. If Green in your set gave very powerful bonuses, then Morgan wouldn't pick Free Market at all. He would stay in Simple Economics even if Free Market was better than Simple. That's the bug. It only affects factions with an agenda when deciding to pick their agenda or not.
Title: Re: An explanation for the AI rarely running Green
Post by: bvanevery on May 04, 2020, 07:05:20 am
I can't confirm or deny that, because all I ever did was remove things the AI liked, until the AI obeyed me.  The clear attractants were MORALE and GROWTH.  It may be that I never specifically solved a problem with the Morganites, because I had a problem with all factions.  It's pretty obvious when everyone's picking Planned / Socialist, that the AI is obsessed about GROWTH.  Reduce to +1 GROWTH, they don't get so excited anymore.
Title: Re: An explanation for the AI rarely running Green
Post by: Bearu on May 04, 2020, 05:29:27 pm
After running more trial games, I found something. All AIs will consistently pick Green when the other choices have zero benefit or penalty. Except those that have FM/Planned agenda, they'll pick that even if there's no benefit. Which means the logical break isn't in not seeing that Green is better than Simple Economics. I think what's going on is that for Green agenda factions, if Free Market or Planned are strongly preferred, they stick in Simple rather than noticing that Green is the next best thing. Maybe Bearu can find something... I believe this is the bug though.

I think you got around it because at a breakpoint, a nerfed down Planned (or FM) wouldn't be considered 'strongly' better than Green. It's probably some amount of differential, since on the flip side Morgan was taking Free Market (with no benefit/penalty) over Simple and Green even when Green gave +2 PLANET, +2 EFFIC.

Seems that putting Planned to -2 ECONOMY hits that breakpoint. Gaia and Cult consistently pick Green from Simple now, with it giving just +2 PLANET, +2 EFFIC.
I cannot answer the question definitely, but I can provide a few pointers. A few different factors connect in the consideration of the AI's selection of Green:
1. The AI receives a benefit in points for the preferred social model equal to the number of bases the faction controls. This means the AI receives a bonus for the preferred model above other models calculated on the same line.
2. The function subtracts points from the calculations for SUPPORT, EFFICIENCY, and PLANET. The rest of the AI Social effects add values. I cannot say exactly what this means in the greater context of the function.
3. The function adds the TALENT output, then subtracts the PLANET total, and finally adds RESEARCH output before moving the final product back into the local register. This means the function combines the sums of TALENT/POLICE, PLANET, and RESEARCH into a single combined value for the final sum.
I suspect the subtraction of PLANET and EFFIC from the positive values of the total point sum after the faction modifier for the preferred social model may have something to do with the AI's weird switch between the Green and Simple.
Title: Re: An explanation for the AI rarely running Green
Post by: Nexii on May 04, 2020, 06:28:43 pm
It's a very strange bug. I couldn't replicate it on Morgan with Free Market or Miriam with Fundamentalist. Have to test more. It seems to be very specific to agenda'd factions when deciding whether to pick PLANET and EFFIC bonuses in their agenda. Non-agenda'd factions clearly like Green when the other options are not as beneficial, so it's not zeroing out in the general case.
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 5: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default), Aeva.english (default).
Style sheets: 0: .
Files included: 36 - 1181KB. (show)
Queries used: 15.

[Show Queries]