Author Topic: AI changes accumulated minerals in bases on SE change  (Read 1110 times)

0 Members and 1 Guest are viewing this topic.

AI changes accumulated minerals in bases on SE change
« on: May 21, 2020, 12:30:58 AM »
A weirdest thing I observed today.

Setup

Vanilla GOG version.
Librarian difficulty (to assure that AI has 0 base INDUSTRY).
Started random game and then turned on scenario editor (Ctrl+K).
Ended first turn so AI bases settle.
Gave them technologies for Eudaimonia and Planned.
Started some large production in their base and set their accumulated minerals to 50.

Now the fun part

1. Switch them to Eudaimonia which effectively changed minerals row from 10 to 8.
Number of accumulated minerals in base dropped from 50 to 40!!!
2. Switch them back from Eudaimonia to default which effectively changed minerals row from 8 to 10.
Number of accumulated minerals in base didn't change!!!
3. Repeated step #1.
Number of accumulated minerals in base dropped from 40 to some 32!!! Again!
4. Repeated step #2.
Number of accumulated minerals in base didn't change!!!

That could be repeated indefinitely without ending the turn and number of accumulated minerals with keep disappear.

Even funnier part

1. Switch them to Planned which effectively changed minerals row from 10 to 9.
Number of accumulated minerals in base didn't change. Good so far.
2. Switch them back from Planned to default which effectively changed minerals row from 9 to 10.
Number of accumulated minerals in base increased!!! Don't remember by how much. Probably by ~10%.
3. Repeated step #1.
Number of accumulated minerals in base didn't change.
4. Repeated step #2.
Number of accumulated minerals in base increased!!! Again!

That could be repeated indefinitely without ending the turn and number of accumulated minerals with keep appear.



The above also works when you let AI make turn by itself. However, the chance for them to pick a SE change is random. When they pick Eudaimonia the number of their accumulated minerals dropped as in my above tests.

I tried this multiple times and got consistent results. However, I didn't spend enough time analyzing it. Could be that I missed something. If anyone has a spare time - please verify this. Thank you.
« Last Edit: May 22, 2020, 12:48:22 PM by tnevolin »

Offline Nexii

Re: AI changes accumulated minerals in bases on SE change
« Reply #1 on: May 21, 2020, 02:45:12 AM »
Seems right. Sort of an aside, I've never been able to make the AI 'hold' their new pick the way you described. That is to say, as soon as you set it the AI reverts immediately back to what its preferred SEs are. Not on the following turn but as soon as you leave the SE screen. Could be a version difference

I'm guessing this was semi-intended so the player could always be warned of impending SEs about to be finished. Much like crawler turnin values being affected by INDUSTRY it has weird side effects that probably should be considered bugs

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 changes accumulated minerals in bases on SE change
« Reply #2 on: May 21, 2020, 05:40:02 AM »
A weirdest thing I observed today.

Setup

Vanilla GOG version.
Librarian difficulty (to assure that AI has 0 base INDUSTRY).

Somehow I don't trust that.  The phenom you describe, could be explained by switching back and forth between human player minerals and AI controlled faction minerals.  Do you always just "watch" AI players so that you know your comparisons are absolutely exactly the same?  I think you wouldn't be able to explicitly give them orders in that case.  Your test is inherently flipping back and forth between human and AI control.

You may have revealed a bug that would never arise in a real game.

Offline Nexii

Re: AI changes accumulated minerals in bases on SE change
« Reply #3 on: May 21, 2020, 05:45:24 AM »
I was able to duplicate it. Changing an AI's SE's doesn't require actually taking control of the faction in the scenario editor.

The thing that really needs to be tested is whether this occurs when an AI switches SEs itself. Otherwise it's not a huge deal (in my opinion), since AI's don't seem to hold SE settings, at least for me. I suspect it does because if an AI gains a tech (via scenario editor) it will switch to it without a human having to.

Offline lolada

Re: AI changes accumulated minerals in bases on SE change
« Reply #4 on: May 21, 2020, 09:55:12 AM »
Quote
1. Switch them to Planned which effectively changed minerals row from 10 to 9.
Number of accumulated minerals in base didn't change. Good so far.
2. Switch them back from Planned to default which effectively changed minerals row from 9 to 10.
Number of accumulated minerals in base increased!!! Don't remember by how much. Probably by ~10%.
3. Repeated step #1.
Number of accumulated minerals in base didn't change.
4. Repeated step #2.
Number of accumulated minerals in base increased!!! Again!

So switching back and forth and one can in single turn complete anything - provided you have some initial minerals invested? Cool exploit.

Re: AI changes accumulated minerals in bases on SE change
« Reply #5 on: May 21, 2020, 01:27:27 PM »
Never mind, everybody. I was analysed the code and here is the thing.
When AI sets SE internally the number of minerals adjusted proportionally of new and old mineral row size. Same for nutrients. So AI cannot suddenly get project completed at the end just by increasing INDUSTRY. The proportion of item completion will stay the same.
However, this does not apply when it is done by SE editor.
So we can call it an oversight in scenario editor. You can forcibly set SE for AI through SE editor in scenario more. However, AI will immediately switch it behind the scene to whatever they like. Thus, first step does not adjust minerals in but second one does. That can happen only in scenario editor when you set SE for AI.

Re: AI changes accumulated minerals in bases on SE change
« Reply #6 on: May 21, 2020, 01:29:25 PM »
This is funny as I was trying to introduce this functionality to avoid INDUSTRY juggling for sudden project completion exploit. I planned to introduce it for both human and AI ans was not aware AI already has it! This is jut human who purposefully was left with this exploit by designers.
🤣

Offline lolada

Re: AI changes accumulated minerals in bases on SE change
« Reply #7 on: May 21, 2020, 01:46:40 PM »
This is funny as I was trying to introduce this functionality to avoid INDUSTRY juggling for sudden project completion exploit. I planned to introduce it for both human and AI ans was not aware AI already has it! This is jut human who purposefully was left with this exploit by designers.
🤣

Ah i feel conflicted on this ^^ switching to high industry is so helpful but its kind of exploity. Would it be possible then to make secret project cost constant somehow regardless of industry? Thats a nerf to Industry stat ofcourse, but its maybe the most overpowered one anyway.

Offline Nexii

Re: AI changes accumulated minerals in bases on SE change
« Reply #8 on: May 21, 2020, 02:17:02 PM »
Making the % completed remain the same on industry changes would also fix the crawler industry exploit.

Re: AI changes accumulated minerals in bases on SE change
« Reply #9 on: May 21, 2020, 02:48:12 PM »
Making the % completed remain the same on industry changes would also fix the crawler industry exploit.

Unfortunately, the opposite is true as the crawler is worth the actual minerals spent on it.
😉

Set industry to +5. Almost build crawler one turn short. Set industry to -5. The % stays the same but total minerals in production box increases. Finish it the last building turn. Now you've built crawler for cheap on +5 industry and actually spent 120 * 0.5 = 60 minerals but it is worth 120 * 1.5 = 180 minerals now. Now start building project on high industry and get 180 from this crawler when you add it to the project.

However, this is so cumbersome and requires to switch industry back and forth for each crawler you've built so nobody would do this.

Offline Nexii

Re: AI changes accumulated minerals in bases on SE change
« Reply #10 on: May 21, 2020, 04:10:42 PM »
Well you wouldn't do it for an individual crawler but for a bunch at once to rush out an SP. Also you can only tank INDUSTRY down to -3 (maybe even less depending on your SE set) but that's a minor detail. You can still double or more the crawler value, in essense rushing at 260% efficiency. I don't know if many people use this exploit or not or know about it.

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 changes accumulated minerals in bases on SE change
« Reply #11 on: May 22, 2020, 12:20:10 AM »
Ah i feel conflicted on this ^^ switching to high industry is so helpful but its kind of exploity.

I took INDUSTRY out of the SE table for the longest time, because it is overpowered.  No penalties either.  This saved me the grief / stress of feeling a need to switch my govt. form just to complete my SPs faster.  Among my factions, the Free Drones get +1 INDUSTRY, that's it.  So they don't have to stress either, their production rate is a constant.

In my version 1.43 I am experimenting with making Thought Control actually worthwhile by giving it +1 INDUSTRY.  It can totally make sense, you could mind control workers to work harder.  However the AI factions may like it way too much, so I'm not sure if I'm going to stick with it.  Currently playtesting.

INDUSTRY is so powerful that I would not consider giving it for anything other than a Future Society.

Offline lolada

Re: AI changes accumulated minerals in bases on SE change
« Reply #12 on: May 22, 2020, 08:57:08 AM »
I don't really see the need to obsess over stopping crawler exploits if it is hard and complicated - maybe for multiplayer? Does anyone play it? There are many ways to cheat/exploit mechanics if one is determined there's not much you can do.

The issue i had with WTP mod and crawlers is that you have to use them for expensive projects - and AI was not good with it. Thinker AI seems to use crawler just fine.. i don't know if vanilla could be forced to build them more - but player can restrain from it and have a good game.

Quote
INDUSTRY is so powerful that I would not consider giving it for anything other than a Future Society.
Yes its strong/est stat. Thats one way of dealing with it. Then one can balance it with SE as well coupling it with strong minuses. That seems to work well also and its maybe more flavor.

Quote
In my version 1.43 I am experimenting with making Thought Control actually worthwhile by giving it +1 INDUSTRY.

I tend to really like WTP fundamentalism because it has +1 Ind, Wealth the same. Research penalty is often not that important. Btw WTP has Thought Control at +2 Pol +2 Mor +2 Prob -3 Support. Its actually very interesting for war time as Eudaimonia kills morale completely and that mod really tries hard to make morale more important. - Support can be tanked due to other SE or Living Refinery. I like that approach - to make these SE values important one can make them matter more in general. Thinker AI spams tons of probes - so probe matters, police is nice to have and morale really matters. If for example Eudaimonia and Cybernetic have  -3Morale, -2Morale.. then Thought Control is +2.. this is difference of 4/5 morale. thats huge and worth picking. When AI Thought Control Hive comes knocking with Command/Elite you really don't want to be with very green units.
One could try similar approach.

Re: AI changes accumulated minerals in bases on SE change
« Reply #13 on: May 22, 2020, 12:47:58 PM »
Thank you everybody. I have figured out the initial problem. Now closing the thread.
Use the main mod thread instead.

 

* 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

The popular stereotype of the researcher is that of a skeptic and a pessimist. Nothing could be further from the truth! Scientists must be optimists at heart, in order to block out the incessant chorus of those who say: It cannot be done.
~Academician Prokhor Zakharov @ University Commencement

* 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]