Would you accept a less simulated AI?
The big problems with Stellaris these days are performance and AI. One drastic solution to both problems would be to simulate the AI less. This would sacrifice some level of realness for gameplay.
The first example would be trade routes and pirates. For players, trade routes are fun. You can set up patrols to level your admiral, or let pirates spawn and take them out. But the AI seems to have real trouble taking out pirates. Would much be lost if AIs just got %100 of their trade value all the time and never spawned pirates? A pirate battle on the other side of the galaxy would rarely be noticed by the player, but does use CPU resources.
Of course, the biggest performance sink is pops and jobs and the AI isn't great at running their economy. What if we simulated AI economy at the planetary level? There could be a simple matrix. A Pop 4 Agriworld produces X, Y, Z resources. If we ignore details like species traits, then we won't constantly have to run an algorithm trying to put the right pops in the right jobs. Obviously, if you conquer the planet or build a branch office you'll want ot fully simulated. It could be instantly populated with appropriate buildings (just another column in the matrix.) This should greatly improve performance as well as keep the AI from borking their economy too much.
To me, the marauders and crisis are some of the best gameplay and they already work this way. Would you be willing to accept normal AI empires playing a slightly different, simpler, game?
Posted Nov 28, 2019, 2:26 PM UTC
I've found two of the biggest items hitting performance (After accounting for vacant jobs causing daily job checks - pops themselves don't have much of a performance hit when there aren't many checks being run.) are fleet pathing and trade calculations.
Less AI simulation won't directly help with any of that tbh. They need to iteratively optimise their algorithms.
Though trade/piracy probably needs a partial rework, as it's a bit shit right now.
What do you mean by trade calculations?
We could have fleets be able to jump between stations within an empire's territory within the fog of war. That would give an impression of the AI being able to position their fleets. That might cut down a little on pathing. The new ship-building ships might cut down on a lot of pathing.
Not really, the difficult part of pathing is pathing. As in the ai has to check were it wants it fleet to go, making the fleet faster (to the point of teleporting) won't reduce how often the ai decides were the fleet is supposed to be.
If the actual cost is calculating a ship's movement each frame, then don't do that, just use the route and then render the ship where it is supposed to be when it is seen. Remove small details about maneuvering from the program.owing down and speeding up and the like and maneuverability and turn radius.... features that are not so important.
If the actual cost is calculating a ship's movement each frame, then don't do that, just use the route and then render the ship where it is supposed to be when it is seen. Remove small details about manuevering from the program.
That's not what's meant by pathfinding... spatial updating of ships shouldn't be that expensive outside of battles tbh. He means deciding which systems the ships even need to travel through to reach their target (almost equivalent check for pathfinding trade routes)
Trade calculations = Calculating trade routes between stations.
Yeah, I don't think AIs should have trade routes, we can just assume they get all the trade goods where they need to go.
Stellaris Immortal, a alpha mod does this to improve performance. Trade is all collected with no use for trade range stations, since they are big sources of lag