Logo Platform
logo amplifiers simplified

Bug: Most AI will rarely build even level 1 industry improvements. Screenshots.

Reply
Copied to clipboard!
4 years ago
Aug 30, 2021, 11:04:31 PM
I know the game is old now and the chance for a patch is low, but this seems a major issue.  I will happily release a mod that changes this behavior if someone would point me in the correct direction where the weight is added for each race.   I thought it might be in the PopulationDescription XML but when I deleted Science supervisor gain or tried to Add Industry gain 2, it made no difference.  Perhaps I did it wrong.  I will happily try to mod it if pointed in right direction if a patch is not possible.

  • Summary / Title: Most AI will rarely build any industry improvements until late game.  Sophons will almost never build them at all.  Not even the level 1 industry improvements that should be built 2nd or 3rd on each system.   Cravers will build industry improvements most.  Lumeris and Horatio are ok too.  Almost all of the rest have issues building them until very late in the game (after turn 100) or at all.  Nakalim and Sophons are the worst at building them.

  • Platform - Steam.

  • Description: As stated above.  I presume it has to do with racial weights.  I will happily make a mod to tweak it if someone shows me where it is, but I cannot find it.  I tried to delete the Supervisor Gains from the PopulationDescriptions file but that didnt seem to change the behavior at all.  I also tried changing the level 3 industry buildings Predictive Logistics and AI Labor to cost less than the level 1 version and cost no strategic resource.  AI would still not build them in a timely manner.  So I have to presume its a policy/weight decision and not a cost decision.  This makes the AI anemic and unable to expand in a timely manner.

  • Steps to Reproduce: Play any vanilla game to turn 25, 50, 100, 125.  Open AI empires with modding tools.  Observe their planets.

  • Reproducibility: 4.9/5  Sometimes the AI will randomly build a single building if it is in a war.  But I think usually this is due to them caputring or assimilating a planet that already has it built.

  • Expected Behavior: These buildings should be built by almost all races shortly after Drone Networks.  Not building them loses them thousands of production per game and they will be pumping out cruisers in 8 turns on a system that has 70ish production.  The same is true for the level 3 industry buildings, but the level 1 buildings at least should be a priority.

  • Version: Latest release.  Unmodded.
  • Notes:  Settings, if it matters are Colossal, 12 players, Hard setting, Normal Speed, everything else default.
  • Attachments: Screenshots / Save / Diagnostics / Output logs / DxDiag

2 screens.  Sophons Turn 130.  Empire turn 138.  Zero of 4 industry buildings built.



EDIT:  Bug 2.  Vaulters unique hull plating that takes up tier 2 on the research wheel appears in their inventory correctly.  A player can select it and put it on their ship.  However, AI cannot select it and use it.  AI cant "see" it for some reason.  Since this replaces the level 2 plating, this leaves AI Vaulters without a level 2 hull plating and puts them at a disadvantage.  Screen of AI designed ship below.  Note Unique plating but using level 1 plating instead.  I believe Same is true of most unique items.  Sophon Free Move and Gjallarafire lasers, etc.


Updated 4 years ago.
0Send private message
4 years ago
Aug 31, 2021, 7:50:10 AM

It's in the AI file I showed you a few days ago, the Public/AI/Release .dll file, somewhere in the Brain/Generators. Other than that, I don't know specifically.

0Send private message
4 years ago
Aug 31, 2021, 7:51:00 AM

Also, the vaulters can't see the hull because the family of modules it is listed as isn't something the AI has a way of dealing with. It's happened to me before with modules, I don't know how to fix it so I just have to deal with it.

0Send private message
4 years ago
Aug 31, 2021, 3:40:01 PM

Thank you.  I did find the decision engine and generators and actuators and blackboard.  I have found the decision in the ENFER debugger and can see the decision not being made (for instance I have never seen industry motivation for Sophons higher than science, for example.).


Again - I am not a fantastic code reader - but from my review of it, the section you showed me is the engine.  The "fuel" (initial starting weight) for the engine is not there and I believe it is in the xml files.  Either the PopulationDefinitions file or perhaps the weight is infulenced by the type of building it is or base traits.  I can show you what I found and what I tried to change.  I just cant tell if the changes I made are actually being used because the initial xml file that tells what files to mod still confuses me.


For example here is the relevant part of the base PopulationDefintions file for sophons:


    <!-- ####################################### -->

    <!--                SOPHONS                  -->

    <!-- ####################################### -->


    <PopulationDefinition AffinityName="AffinitySophons" Standard="true">

        <SupervisorGain Name="Science" Weight="3">

            <Tags>PlanetGameplayTypeCold</Tags>

        </SupervisorGain>


I have tried deleting that or changing it to Industry weight 3.  However I am not sure if game is seeing it.  Here is what I put in the enabling XML for the game to see the mod.


            <!-- Population Fix -->

            <DatabasePlugin DataType="PopulationDefinition, Assembly-CSharp">

                <FilePath>Simulation/PopulationDefinitions.xml</FilePath>

                <FilePath>Simulation/PopulationDefinitions[*].xml</FilePath>

            </DatabasePlugin>


So either I have done the enabler wrong, or I have done it right and the weight I am changing is not the one I need to change.


I also tried to change industry to 4 in the bottom entry which is labled as AI Balanced in the SystemSupervisorDefinitions file and enabled it this way.


            <!-- System supervisors -->

            <DatabasePlugin DataType="SystemSupervisorDefinition, Assembly-CSharp">

                <FilePath>Simulation/SystemSupervisorDefinitions.xml</FilePath>

            </DatabasePlugin>    


Thank you for the help.  Id love any suggestions you have.


I think I have figured out a way to trick the AI to build them if I cant fix it honest-like.  I can just add the stats of industry 1 and 2 to the two starter buildings, which the AI always builds.

Updated 4 years ago.
0Send private message
4 years ago
Sep 1, 2021, 12:29:50 AM

Nothing AI related is in the xml, except for that thing in the module / battle tactics section. What you are looking at are the system auto-management settings. Supervisor Gain tells the system how effective an item is, and what situation it works in. It doesn't affect the AI in any way.

Updated 4 years ago.
0Send private message
4 years ago
Sep 1, 2021, 8:14:11 AM
CaptainCobbs wrote:

Nothing AI related is in the xml, except for that thing in the module / battle tactics section. What you are looking at are the system auto-management settings. Supervisor Gain tells the system how effective an item is, and what situation it works in. It doesn't affect the AI in any way.

No it doesnt effect the AI engine itself.  But it tells then engine the base weights/gain for an item so the AI can decide when it needs to build it.  At least I think that is what it does. 


And at least according to the commenting, the last entry in the SystemSupervisor is for the AI.    


Industry is basically always useful for all races at all times.  At least the starting buildings.  Industry should be weighted heavier so the AI builds it more and I believe that can be done in the xml files (although its entirely possible I am wrong).


Regardless, when knowledge and wit fail, brute force can be used.  I have now made it so the AI builds the starting industry buildings - by calling them something else.  :)  Its brutish and inelegant, but lacking any better knowledge of how to do it, it works just fine.  The AI rarely now pumps out cruisers on a 50 industry system. Except for the Nakalim,  The Nakalim just relish their tech advantage and just build ships from turn 1 and rarely stop to build anything else.  Not sure how to fix that behavior without more knowledge of how the decision tree is started.


Baby steps, I guess.



0Send private message
4 years ago
Sep 2, 2021, 12:36:40 AM

AI Gain only affects the System Supervisor, not the faction AI. I will repeat, there is nothing in the XML except for the AIBattleSituations that directly controls the AI. The System Supervisor is a tool the player can use to automatically have their systems managed, it's generally regarded as terrible.


ALL of the AI weights are located within the .dll, I know this because one of the developers who worked on the AI told me.

0Send private message
4 years ago
Sep 2, 2021, 2:24:24 AM

Ok thank you.


Then I will look again.  But for me its trying to read hieroglyphics.  Ill see what I can find.

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message