Logo Platform
logo amplifiers simplified

Another batch of AI fixes and improvements.

Copied to clipboard!
a year ago
Nov 14, 2023, 4:09:27 PM

Hello,


I was told these changes could make into the official patch, so lets go.


1. We have a minor change to the decission class on AI creating the Small Invader and Death Star ships. Small Invader is a small support ship design, loaded with manpower modules and slugs, while Death Star is a ship design for a carrier class to load the core craker and destroy planets.


The problem detected was that sometimes the list of ship designs from the analysis data was not fully populated, leading to creating the design templates again. This also happens consistently on the first time the designs are ever created, as a result AI would have two or even more identical ship designs for both Small Invader and Death Star.


2. This is an extension of the logic of the ship designs for the AI. Most of it is based on a helper class to allow/refuse modules based on certain criteria.


- AI will add an additional weapon for carrier, and will slot in any weapon possible left after the defensive and support modules are designed. This fixes a minor bug that lead to Vodyani and Riftborn carriers without the big slot and other ships later with the carrier slot upgrade.


- AI will load if possible, one additional defense slot on support ships, before designing every possible support slot.


- AI leecher role (Volyani Leecher) will not slot in a defensive module, and will slot and engine instead.


- AI scouts will load a second engine when they have four support slots are available.


- AI will not use the same strategic module twice, with some exceptions, like A2S Slugs or strategic fighters and bombers.


- AI will not load ever a second module of the same family of the modules that are usually noted down on the XML config as "one per ship".


- AI will alternate between shields and plates when more than one defensive module will be slotted in, respecting their preference based on past battles and enemy weapons. The original behavior is just to slot either all shields or all plates. Now what would be Shield - Shield - Shield, will be Shield - Plate - Shield instead.


3. Minor tweaks to the heuristic computation for growth and approval on a system, so it uses the default 300 food per pop instead of 200, and the 85 approval instead of 75 as the maximum goal.


As before, 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: ai-code2.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.


Thanks for reading.

Updated a year ago.
0Send private message
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message