Logo Platform
logo amplifiers simplified

Possible AI fixes in Amplitude AI Core dll

Copied to clipboard!
a year ago
Nov 14, 2023, 12:58:29 PM

Hello,


I've been editing the AI core dynamic library for a while. While my intention was to greatly enhance AI capabilities fine-tuning their decisions, I ended just fixing some big things not working.


Many features are already coded, and I mean, hundreds of hours of coding done by Amplitude devs with analysis, computations, and all the blackboard stuff, all of those was already there, but a single point of failure disabled full AI features.


I will cover and provide the code to fix it for:


1. AI non-military behemoths sitting idle.


2. AI not being able to support their invasion attempts with their "invader" small support ships, loaded with slugs and manpower modules.


3. AI not being able to search curiosities on their own systems.



1. The problem lies in how the behavior tree is built. Before moving to destination or doing the action, goes into a behavior subtree to try to attack things, and then guard. As a result, (non-military) behemoth will guard and ignore their destination and their actions.


DoFleetActionAtPosition.cs just reverses the order "move > do action > then all the on the node stuff".

GuardOneSystem.cs and AcademyDefensive.cs forces a fail on the action part, so it goes to the node stuff and finally guard, when they are already at the target node.


2. On AssistInvade.cs The problem is that the generator part responsible to find all front mission tasks (FindAllFrontMissionTasks method) is not working, not sure why doesn't work, maybe a cast issue, but I used a more generic alternative (FindAll method) and went into the same conditions afterwards.


3. On SearchAllColonies.cs generator, on the GetContexts part, responsible to check if there are curiosities in owned systems pending to be explored, it tries to access that analysis data from the AI player empire snapshot, but the data is held on the Snapshot Repository. I just added the service all and check the info there.


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 infer those into the source code.


The code files: ai-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.


Thanks for reading.

Updated a year ago.
0Send private message
a year ago
Nov 14, 2023, 8:48:03 PM

I'm the one that would be implementing them into the codebase, thanks for including the original code, the compiler does make quite some considerable changes (such as stripping internal variable names, though the major structural changes are the bigger challenge) so having that made it a lot easier to rewrite your changes to fit into the original code

0Send private message
a year ago
Nov 14, 2023, 10:41:07 PM

Sure, I provided the context of the changes and all the information I can give to ease the application. I sent a formal full permission statement to Amplitude so hopefully these fixes can be implemented.

0Send private message
a year ago
Nov 15, 2023, 8:46:26 AM

Wow, thanks a lot Ninakoru ! I'm sure that with the help of CyRob your fixes will make into game! 

Updated a year ago.
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message