Logo Platform
logo amplifiers simplified

[Prepatch Preview 1.5.58] More AI fixes

Copied to clipboard!
a year ago
Dec 22, 2023, 6:46:35 PM

I would initially pass on adding all of this, but the first fix is important, and maybe is a big contributor of why AI feels so stale in late game.


ColonizedStarSystemSnapshot.cs


There is a possibility for AI to not queue anymore in systems with infinite buildings (resource conversors). Having 0 industry makes the industry allocator not prioritize anything, thus leaving the 3D Printing or whatever running forever. There are rounding issues so sometimes will not fail.


Importance: 5/5.



QueueImproveHullTechnology.cs


AI will rarely ever improve small/medium ship hulls (and carriers very late game) with 50% interest of the parent. While is not stricly a fix, is important to have competent enemies in late game.


Importance: 3/5



ResourceNeed.cs


Innovative personality adding to dust interest instead of science interest. Not a great deal, but Sophons and Vaulters will not favor Science.


Importance: 2/5



ImportanceScoring.cs


AI will not restrict the assignation of the most important system to their own systems. Affects domestic evaluations later like buyout and wonder building.


Importance: 1/5



LeechSystem.cs


Ship Bound Faction (Volyani) will try and fail to leech systems with closed borders or the Academy.


Importance: 1/5



ComputeWantedSystemCount.cs


AI will not discard special nodes (black holes etc) as colonizable nodes, and will not make adjustments based on game speed.


Importance: 1/5



ProposeTerm.cs


AI will ask for diplomacy things to eliminated players, throwing out a bunch or internal warnings and maybe data overload due to unfinished contracts? Not sure, but less errors, even if handled, is better.


Importance: 1/5



ComputeStrategicTargetStock.cs


AI will not count in properly their available modules with strategics in order to stock more of the strategic resource. Not a big deal, but would make a smoother resource aquisition for the AI.


Importance: 1/5


As always, I provide my edited code, as well as the original disassembled code as reference, you can compare both with a merge/compare tool (IE WinMerge) to see the exact changes, and apply those into the source code.


The code files: new-code-fixes.zip


Lastly, a legal disclaimer in the case it is needed: I give Amplitude and their collaborators full permission to use and modify my code if there's any intellectual property held into it, not covered by the game's terms of service.


Thank you.

0Send private message
a year ago
Dec 31, 2023, 7:44:44 AM
Ninakoru wrote:

LeechSystem.cs


Ship Bound Faction (Volyani) will try and fail to leech systems with closed borders or the Academy.


Importance: 1/5

I think you didn't account that if Ship Bound faction is Religious (as Vodyani often are), they can (and should!) leach in closed borders. 

0Send private message
a year ago
Dec 31, 2023, 7:50:08 AM
Ninakoru wrote:

ComputeWantedSystemCount.cs


AI will not discard special nodes (black holes etc) as colonizable nodes

I'm not sure that matters, because it looks like it checks for nodes with visible planets and special nodes do not have them.

0Send private message
a year ago
Dec 31, 2023, 7:58:07 AM
Ninakoru wrote:

ProposeTerm.cs


AI will ask for diplomacy things to eliminated players, throwing out a bunch or internal warnings and maybe data overload due to unfinished contracts? Not sure, but less errors, even if handled, is better.


Importance: 1/5

I may be mistaken, but it should have higher priority, as this could be the source of desyncs and pending turn behaviour.

0Send private message
a year ago
Dec 31, 2023, 11:00:10 AM
Sublustris wrote:
Ninakoru wrote:

LeechSystem.cs


Ship Bound Faction (Volyani) will try and fail to leech systems with closed borders or the Academy.


Importance: 1/5

I think you didn't account that if Ship Bound faction is Religious (as Vodyani often are), they can (and should!) leach in closed borders. 

Maybe you think is the trait to leech in cold war, that part is working fine. Is a fix based on real examples. In closed borders, usually from a forced truce (you get closed borders automatically during the truce duration), sometimes AI would target a system inside those closed borders, and as they cannot reach the system, leecher fleets would stay idle, until the truce is gone.


Sublustris wrote:
Ninakoru wrote:

ProposeTerm.cs


AI will ask for diplomacy things to eliminated players, throwing out a bunch or internal warnings and maybe data overload due to unfinished contracts? Not sure, but less errors, even if handled, is better.


Importance: 1/5

I may be mistaken, but it should have higher priority, as this could be the source of desyncs and pending turn behaviour.

I wouldn't bet on that, but maybe, anyways, the AI would try to make some diplomacy contract/agreement with the eliminated player, send the info to the core system, and the core system will fail to validate and finally reject the contract. All of this is self-contained and shouldn't affect the other systems, other than a failed blackboard card.

0Send private message
a year ago
Dec 31, 2023, 11:15:26 AM
Sublustris wrote:
Ninakoru wrote:

ComputeWantedSystemCount.cs


AI will not discard special nodes (black holes etc) as colonizable nodes

I'm not sure that matters, because it looks like it checks for nodes with visible planets and special nodes do not have them.

Nope, is seems is the case initially, but in reality that function also approves special nodes (without planets) for whatever reason. I tested it logging the planet count. Think all my fixes are tried and tested, I don't make changes based on suppositions.

0Send private message
a year ago
Jan 3, 2024, 11:45:42 AM

I do not doubt that you do, Ninakoru, I appreciate amazing work that you did, thank you!

I just question, if there are incidental or side effects that were not tested for. Or why did you modify method that evaluates wanted system count and not a faulty method that checks for visible planets?

Sorry for bothering.

Updated a year ago.
0Send private message
a year ago
Jan 3, 2024, 5:52:41 PM
Sublustris wrote:

I do not doubt that you do, Ninakoru, I appreciate amazing work that you did, thank you!

I just question, if there are incidental or side effects that were not tested for. Or why did you modify method that evaluates wanted system count and not a faulty method that checks for visible planets?

Sorry for bothering.

Yeah, that's a good question, if I went that route, I have to check every single instance of that method being used. And sometimes other code logic may be expecting that faulty behavior, also, keep in mind I am not programming normally, I'm working with disassembled code, if it is not 100% clear to me, I prefer to just fix what do I know for certainty.

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message