Author Topic: An explanation for the AI's obsession towards MORALE in social engineering.  (Read 840 times)

0 Members and 1 Guest are viewing this topic.

Offline Bearu

The Social AI selection for the MORALE remains a product of the following formula:
You take the Morale from the other social models other than the current value and sum the value. The value range remains -4 to +4. You then double this value and calculate for modifiers. If the morale value is lower than -6, increase the morale value by 1. Do the same if the morale value is -3 or lower. If the value is greater than 6, decrease the morale value by 1. If the value is greater than 3, then decrease by the morale value by 1.

This section appears as the root cause of the AI's obsession for MORALE because the other modifiers work off these values. The other modifiers for MORALE remain a variable constant dependent on military power. Multiply the sum for the # of bases this faction controls currently and the Faction military unit points (+1 for every military unit this faction controls and an additional +1 point for every Combat and Assault AI Plan military unit this faction controls in the current turn) by the number in the second local constant (a value dependent on military unit calculated earlier) +1. Then multiply the product of the previous value by Faction fight + 2.
Next multiply by the modified MORALE value. (-8 to 8)
Now multiple by another local variable I describe below here (min. 1 - max. 3):
Quote
If the faction is not of the weakest two remaining factions in might, then the game checks the faction's number of technologies discovered under a technology point system. If the current faction remains behind by 5 or more techs but less than 10, then multiply the AI's interest in MORALE and INDUSTRY by 2, divide the AI's interest in ECONOMY by 1/2, and add checks for an additional bonus for PLANET (ignored for factions with base PLANET from SOCIAL modifier aka Gaians and Cult of Planet).
If the faction lags by 10 or more tech points, you divide interest in ECONOMY by 3 and multiple interest in MORALE and INDUSTRY by 3. You keep the same PLANET check from the previous modifier.

Now divide the product by 8 and then multiple the value per the following values below:

Quote
Fight 2 or higher (unused in stock game): X 2
Conquer: X 2
Conquer and Discover: X 2 (Spartans)
Conquer and Build: X 1 (Hive)
Conquer and Explore: X 1 (Believers)
Any other combination yields: X 1

Fight =< -1:
Conquer: X 1
Conquer and Explore: X 1
Conquer and Discover: X 1
Conquer and Build: X 1
Build and Explore: X .5 when the faction remains in a war mode
Discover: X.5 when the faction remains in a war mode.
Discover and Explore: X .5 when the faction remains in a war mode.
Discover and Build: X .5 when the faction remains in a war mode.
Explore ONLY: X1 (Gaians)
Conquer, Discover, Explore, and Build: X 1

The major area of concern remains the fact the AI emphasizes MORALE at twice the actual value of the bonus, so the AI exaggerates negative morale modifiers and positive morale modifiers at approximately X2 modifier. The simplest solution I have been looking at remains to treat the MORALE modifiers in terms of the actual values for -4 to +4.
Picture: Beldam
"I am half sick of shadows, said the Lady of Shallot."

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
My tech tree, I rearranged so that Politics and Economics choices are given out at Tier 2.  Secret Projects don't start until Tier 3.  The result is that these early SE choices are readily traded.  There is some delay as to obtaining any specific thing, because my Tier 2 has become quite broad over time.  Since Politics and Economics are "early game choices" in my mod, I do not allow anyone to have any overpowered choices, whether human or AI.  Early MORALE is overpowered.  Having an easy way to get a better weapon at the beginning of the game, is a big deal. 

It also makes the MORALE bonuses of various factions, more meaningful at first.

Offline Nexii

Interesting. I feel like a better algorithm would have been to put a value on aggregate SE rather than incremental

For example 2 ECON is worth 10 points in peace
1 ECON is worth 2 points
instead of saying +1 ECON is worth 5 points. This works at +2 but overrates ECON at +1

etc. Then it would maximize points. The problem I've seen is that linear benefit is assumed when it's not the case. I guess one solution is to try to make the SEs more linear but that would be difficult. For example +5 IND is a bigger increase going from +4 (25%) than going from -3 to -2 (8%)

Something to consider I guess. Even with MORALE you can say it gets stronger at +3 due to Elite units. And tanking MORALE down to -4 isn't that much worse than -1 when you can hole up in bases with Creches.

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
Devs don't write great AI in real game production.  Not shocked.  Probably was dealing with a whole pile of moving targets and production pressures at the same time.  Some problems in game production are basically managerial.  For instance, the pressure to produce more art assets and narrative tidbits, causes more game mechanical gewgaws to be introduced.  These exponentially explode the cases an AI must contend with.  The poor sap AI programmer cannot possibly cover it all.  They play catch-up, and after the game's been out for a few years, their attempts at catch-up cease entirely.

Allowing us something to do, 20 years after the fact.  Having learned my lessons, I will go write a commercial game that does not make the same mistake.

Offline Nexii

It might be the units thing skewing MORALE much more than it should be. I think it's a factor much higher than 2x. I tried 1 MORALE against 4 GROWTH, 4 INDUSTRY and the AI still tended to prefer getting 1 MORALE. And INDUSTRY as you noted is increased in importance during war (I've observed this too). Though in peace it will eat negative MORALE just to get +2 ECONOMY. It shifts greatly in importance but only compared to +2 ECONOMY, everything else is (nearly) irrelevant. I suspect +2 ECONOMY might have a similar thing going on.

So it's kind of like:
In war: MORALE >> INDUSTRY >> everything else
In peace: +2 ECON >> MORALE >> everything else

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
I've been testing an INDUSTRY bonus for Thought Control in version 1.43 of my mod.  The early returns are that the AIs are absolutely obsessed with it.  Not good.  Well at least I can change it back to being fairly useless, if need be.

Offline lolada

Devs don't write great AI in real game production.  Not shocked.  Probably was dealing with a whole pile of moving targets and production pressures at the same time.  Some problems in game production are basically managerial.  For instance, the pressure to produce more art assets and narrative tidbits, causes more game mechanical gewgaws to be introduced.  These exponentially explode the cases an AI must contend with.  The poor sap AI programmer cannot possibly cover it all.  They play catch-up, and after the game's been out for a few years, their attempts at catch-up cease entirely.

Allowing us something to do, 20 years after the fact.  Having learned my lessons, I will go write a commercial game that does not make the same mistake.

From what i observed so far in gaming industry poor AI guy may be the smartest programmer in a team, but he's also last to work on a feature and usually have little time to do the job. Then other guys, designer for example decides to add new feature, team changes mechanics - they ofcourse all intertwine and AI gets broken in 12 different places and release date for that version/dlc or whatever is 7 days ahead. Because feature took longer to implement - and AI guy has to scramble and do his thing in what time he has. So the guy fixes what he can and game is out. And people complain AI is not as good as it should be.. or sometimes total fail.

Also designers sometimes tend to design stupid complex or ambigious features that are not practical for AI - but human may like them. This means that human can use the feature and gets  huge advantage over AI - and in turn AI looks dumb.
Being AI programmer in team is in my estimation quite ungrateful job - i hope they are well paid.

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
Yep!  Totally impossible situation, outdone only by being the writing guy.  This is a basis for indie competition.  I am capable of designing, AI-ing, and writing all at once, giving priority to these concerns above all others.  When I dream in 4X, my dreams are often austere, and look a lot like a Diplomacy board.  The battleships that are killing each other have rather ornate silhouettes though.

diplomacy02
diplomacy02

 

* 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

And the Lord God said, 'Behold, the people is one, and they have all one language, and this they begin to do: and now nothing will be restrained from them, which they have imagined to do. Go to, let us go down, and there confound their language, that they may not understand one another's speech'.
~The Conclave Bible

* 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: 5: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default), Aeva.english (default).
Style sheets: 0: .
Files included: 50 - 1568KB. (show)
Queries used: 39.

[Show Queries]