Page 2 of 7

Re: Strategic AI Tweaks

Posted: Mon Apr 16, 2018 7:26 pm
by zolobolo
Staffing Curve bug

Noticed now that Humans have a hard time holding on to their scout

Re: Strategic AI Tweaks

Posted: Mon Apr 16, 2018 7:43 pm
by zolobolo
The change to production descaling according to metal seems to have worked very well in practice

Below picture shows Yoral reinforcements after they have suffered heavy losses in the previous war and already in possession of Battleship tech. Previously they would have lost dozens of turns building up a couple of Battleships

This makes not only for interesting battles but the AI is now capable of recovering from losses much faster. The below is (while cost effective) also a very potent fighting force in by of itself with plasma batteries as well as numerous medium guns and torpedoes

Re: Strategic AI Tweaks

Posted: Mon Apr 16, 2018 8:50 pm
by harpy eagle
zolobolo wrote:Staffing Curve bug


Fixed in 4dfbabf, also fixed a bug in build time estimation that occurred when the planet had produced enough hammers to build the ship this turn, but was lacking metal.

I also noticed in that save game the Tinkers were not colonizing for some reason. When I looked into it though, it seemed like an issue with fleet routing (which my mod doesn't touch yet).

Speaking of Tinkers, I should probably do something similar for their "construct population" option as what I did for city planning.

Re: Strategic AI Tweaks

Posted: Mon Apr 16, 2018 10:14 pm
by harpy eagle
zolobolo wrote:
sven wrote:If you turn on the 'developer' options by creating a 'show_hidden_options.bool' (as described here)

Thanks for the tip, and for supporting the modding community so fully - the DEV options menu is a real treasure trove

Yeah, there's some really nice tools in there. I just discovered one that visualizes the current AI fleet plans, it's pretty cool. You can see exactly what the AI is thinking when routing fleets, without having to squint at pages of console output.

Re: Strategic AI Mod

Posted: Tue Apr 17, 2018 6:14 am
by harpy eagle
Update: Added support for Tinker's manufacture pop build project.

Re: Strategic AI Mod

Posted: Tue Apr 17, 2018 2:00 pm
by CapnDarwin
@Harpy Eagle - Should this mod have one folder or two. Currently it has a Financial AI (not sure of the exact name) and earlier versions had Strategy AI. What is the correct configuration for the mod?

Thanks!

Re: Strategic AI Mod

Posted: Tue Apr 17, 2018 3:49 pm
by zolobolo
Here is a picture of what I was thinking under make all attributes visible

Why is this useful?
Now that the AI is capable of building Outposts and having more ship (via this mod), it can finally make use of the already existing starvation mechanic and blockade all planets within its reach which it should absolutely do if possible for the following reason:

Blockading has always been a massively potent strategy as it:
1. Does not require a strong naval force in order to wear down Planetary Defenses (single ship no module requirement)
2. Does not require a strong ground forces (none)
3. Planets with food shortage and blockaded directly will start starving out immediately
4. All planets with food shortage will start starving once the empire as a whole is in minus: and most empires do not have large amount of food surplus Thus blockade of even a couple of planets can deplete the reserves of even the strongest empires
5. Each Turn starvation effects any planet, all effected pops suffer considerable moral penalty which also directly translates over to all other pops of the same type throughout the entire empire!
6. Blockade also prevents planetary construction rushes effectively preventing the prompt reaction to a sudden war if done against industry worlds

The above makes blockading one of the absolute best strategies when up against an enemy that has at least somewhat capable defenses. It mitigates combat risk to fleet and ground forces, cheap and effective. It also enables small empires to defeat a single large one as they do not need the space nor ground superiority to inflict wide-spread damage which is amplified by the size of an empire: more planets are pops mean, more trouble defending them and more food for feeding + starvation effect multiplied by the amount of pop overall

The player can and should of course also make use of this mechanic, but without clear and accessible indication of what the surplus of an enemy empire exactly is, it takes some hoops to jump through before this strategy can effectively be put into use and verified if it is applied

The same also goes for all the other parameters, but I think that food capacity indicators are the most vital information due to the blockade mechanic (and the diplomacy trade offers to buy some because of them)
And the mechanic is great: hope to use it and see it more often as it makes for more space battles (less sieges against planets and identical starbases) and it rewards area of control vs doom-stacks

Re: Strategic AI Mod

Posted: Tue Apr 17, 2018 7:34 pm
by harpy eagle
CapnDarwin wrote:@Harpy Eagle - Should this mod have one folder or two. Currently it has a Financial AI (not sure of the exact name) and earlier versions had Strategy AI. What is the correct configuration for the mod?

Thanks!

My bad, the earliest versions of the mod were in a folder called StrategyAI, but I later renamed that to EconomyAI. There should only be one folder, and it should be EconomyAI.

Re: Strategic AI Mod

Posted: Tue Apr 17, 2018 7:43 pm
by CapnDarwin
Thanks. I will need to fix my install this evening.

Re: Strategic AI Mod

Posted: Wed Apr 18, 2018 12:43 am
by harpy eagle
Found and fixed a bug that was causing the AI to build too many transports, and an issue where the perceived benefit from city planning/manufacture pop was being exaggerated when handling a resource that doesn't accumulate (b361577).

Also, if the AI knows about any other empires, it now compares it's naval power with theirs when determining the urgency with which to build ships.

Re: Strategic AI Mod

Posted: Wed Apr 18, 2018 2:07 am
by harpy eagle
Just realized that there's an unintended interaction between the way vanilla chooses the planets to assign to ship production, and the AI's new ability to set city planning.

When deciding which planets to assign to ship production, it ignores any planets that have empty improvement slots left. Since the AI is now much better at growing it's population, it can actually have planets with good industrial output that still have empty improvement slots. This means that in the cases where the AI really needs ships urgently, it doesn't fully utilize it's production capacity, which is what I've been noticing lately.

Re: Strategic AI Mod

Posted: Wed Apr 18, 2018 4:57 pm
by zolobolo
Orthin keep producing Scouts as seen below

Save: https://www.dropbox.com/s/makxgphc2wrne ... 0.rar?dl=0

Is the ship produced affected by the mod at this point?
Some time ago it has been stated that the AI should chose a preferred selection of ship types each game, in which case this might be a bug in the logic putting too much priority on a ship that should practically have the lowers priority from mid-game on?

Re: Strategic AI Mod

Posted: Wed Apr 18, 2018 6:00 pm
by harpy eagle
Yeah, I was looking into the scout spam myself yesterday, haven't gotten the bottom of it yet.

I did find that it was related to their metal cost in a way. It seems that when the AI feels it doesn't have enough metal to build a destroyer, it builds a scout instead... but scouts still cost metal, so it can never save up enough metal to reach the point where it considers building a destroyer.

Or sometimes I've seen it builds a destroyer, but as the build progresses and it gets closer to running out of metal, it switches the construction to a scout just few turns before it finishes (since scouts and destroyers share build progress). Sometimes it does this a few times in a row.

I'm still working on it. There's a "patience" variable that I probably have set too low, and I should double check that it is correctly evaluating the combat value of ships.

Re: Strategic AI Mod

Posted: Wed Apr 18, 2018 10:21 pm
by CapnDarwin
Is it possible that scouts are made if the percentage of undiscovered systems is still high? I just gave the Tinkers, who are basically trapped on an edge of the galaxy by my systems, the ability to use my systems for refueling. They spammed out about a dozen scouts once that happened heading of to every system within the new found range.

Re: Strategic AI Mod

Posted: Wed Apr 18, 2018 11:55 pm
by harpy eagle
Yes the AI will make more scouts if there are a lot of undiscovered systems, and that can sometimes explain the scout building by the AI. However, when I was debugging yesterday and inspecting the reasons why the AI was building particular ships, it was also building scouts as warships. i.e. it decided it needed another warship, and then chose a scout design as it's chosen warship. I'm not sure why yet, since I haven't been able to do much modding today.

I do want to revisit the code that I have for AI ship selection though, there are some other reasons why I'm not fully satisfied with it.