Fixing Influence - any ideas welcome

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Message
Author
User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Fixing Influence - any ideas welcome

#91 Post by drkosy »

The upkeep function may for sure be one problem. The other is that not really possible option of having a tall empire. I like to improve my kosymod to make that more relevant but it's a complicated thing. :x
You need resources to grow. You get resources usually from colonizing, especially early on. For a wide empire you need some pop-increasing-techs and Terraforming. That needs research and Terraforming needs production. With a wide empire you have more of both but I would really add a possibility to choose in early game between tall and wide. That would give Replicons the chance to be competitive, even without natives.

I actually think about a policy that increases resource output (dependent on focus) but have something like happieness = value + 2 - (number of colonies / 20). There actually has to be a tradeoff because otherwise everyone would adopt that policy till there are 30 - 40 colonies in the empire.

I think influence is great as it is, but there should be some more options how to shape the empire...
Want some fresh experience? Try Kosymod

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Fixing Influence - any ideas welcome

#92 Post by Geoff the Medio »

drkosy wrote: Wed Aug 17, 2022 1:29 pmI actually think about a policy that increases resource output (dependent on focus) but have something like happieness = value + 2 - (number of colonies / 20). There actually has to be a tradeoff because otherwise everyone would adopt that policy till there are 30 - 40 colonies in the empire.
Similarly, why does a single function for influence costs need to handle all cases? I'd also rather have a policy that an empire with very high numbers of planets can adopt to adjust its cost curve.

wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Re: Fixing Influence - any ideas welcome

#93 Post by wobbly »

Geoff the Medio wrote: Wed Aug 17, 2022 7:17 pm
drkosy wrote: Wed Aug 17, 2022 1:29 pmI actually think about a policy that increases resource output (dependent on focus) but have something like happieness = value + 2 - (number of colonies / 20). There actually has to be a tradeoff because otherwise everyone would adopt that policy till there are 30 - 40 colonies in the empire.
Similarly, why does a single function for influence costs need to handle all cases? I'd also rather have a policy that an empire with very high numbers of planets can adopt to adjust its cost curve.
Another possibility is doing it by game stage. Megalith could generate a large flat bonus of influence. You could have maybe 1 or 2 other buildings like it.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Fixing Influence - any ideas welcome

#94 Post by Oberlus »

Geoff the Medio wrote: Wed Aug 17, 2022 7:17 pm I'd also rather have a policy that an empire with very high numbers of planets can adopt to adjust its cost curve.
I tried that and failed to find anything as good as the equation suggested in this thread (that has nothing to do with what drkosy commented).

Ways I considered:
- Adopt a policy to reduce the factor of the equation (from 0.4 to...). If the reduction is small, then you need many policies to be able to have very high number of planets (1000). If the reduction is big (few policies), swiching to the better policy means overwhelming overflow of IP (start chaning planet focus from influence to something more necessary...).
- Adopt a policy to reduce the exponent from 0.5 to 0.33 and 0.25. That worked as good as the above.
- More policies to add unfocused, flat bonuses, unlocked when the empire owns a certain number of planets. Same problems as above.

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Fixing Influence - any ideas welcome

#95 Post by LienRag »

wobbly wrote: Wed Aug 17, 2022 7:40 am A bit of a side note, what I dislike most as a player, is the jolting nature of the current system. It goes from no problem to a problem very quickly. Sometimes it's gaining multiple colonies in 1 turn. Suddenly you shift from a healthy plus to a big drop as every colony you own increases in cost.

I'm not sure there is much that can be done about it in an exponential system.
Well, there was my old proposal...

And also more or less this one about Nomes.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Fixing Influence - any ideas welcome

#96 Post by Oberlus »

LienRag wrote: Thu Aug 18, 2022 2:56 pm Well, there was my old proposal...
Which was awful, IMNSHO, and you got the reasons why in that thread. But to sum up: utterly counterintuitive, hard to manage, requires lots of attention from the player.
LienRag wrote: Thu Aug 18, 2022 2:56 pm And also more or less this one about Nomes.
Nomes and IRAs...
Edit: LienRag, if you want to discuss your Nomes or Upkeep-per-colonization-order suggestions, do it on those threads.

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Fixing Influence - any ideas welcome

#97 Post by drkosy »

I tried that and failed to find anything as good as the equation suggested in this thread (that has nothing to do with what drkosy commented).
That's a point. Maybe it's worth to work on the function as well as on other mechanics. I just don't like it the way it is. As much as I tried in several games, the more planets you have, the more resources there are to use. That means my fastest games always was the wide way. So I would like to have the possibility of not building 1000 colonies to win the game, but to have 200 and be competitive.

This would address the problem with different starting conditions. You have a good start with some average / good planets around - you have a great advantage. With narrow species (e.g. Fluver) it get's even worse. With policies you could give possibilities to choose you way to expand and change that if conditions change (e.g. catch a great influence species). That's why I think policies are the right way to solve the "problem".

By the way: I added a maximum to IP cost of new colonies by adding

Code: Select all

 (NamedReal name = "COLONY_ADMIN_COSTS_PER_PLANET" value = 0.4) *min (8, ((Statistic Count condition [...] )^0.5)) 
That makes it much more easy to handle very large empires. For me that's not really important because with > 300 colonies the game crashes very often, while with < 100 everything runs smooth. Maybe my machine is a bit outdated for such large empires and maybe that's the reason why I like the idea of tall empires that much :wink:
Want some fresh experience? Try Kosymod

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Fixing Influence - any ideas welcome

#98 Post by Oberlus »

Policies to increase IP output are there already, and more could be added. But there is a limit to what you can do with them.

The suggested upkeep formula change is independent of that, and compatible with it. The main issue addressed by the new formula is the scalation of upkeep to galaxy size: with this you can have tiny galaxies in which IP productio is not irrelevant and huge galaxies that can be conquered. With a parameter to make this easier or harder independentlt from galaxy size.

Using instead a hard cap at upkeep that always hits at the same number of colonies would not be as good: for huge galaxies the pace would be slower, for small galaxies the cap is never reached and influence is less important than in biggers galaxies, or irrelevant.
Edit: it also partially defeats the purpouse of having upkeep, to make bigger empires grow not so faster than small ones. From the number of planets of the hard cap onwards, bigger empires will grow faster since upkeep won't depend 9n numbrr of planets anymore.


Tall vs wide has nothing to do with this. If you make hard or impossible to go wide, you are not improving going tall, you are forcing everyone to go tall = wide.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Fixing Influence - any ideas welcome

#99 Post by Oberlus »

In a comment in the PR, Geoff expressed his dislike for an upkeep function that depends on the size of galaxy that an empire has no information about.

I replied that the number of planets can be estimated by any player based on the GalaxySize (number of systems), GalaxyAge (Young, Mature, Ancient) and PlanetDensity (Low, Medium, High), but I don't know if that will make him change his opinion.

Meanwhile, I found another equation with very similar growth patterns compared to what we have now (i.e., exponential on number of planets, with exponent < 1), the second quadrant of an ellipse with vertical radius = 10 (parameter max_output, the maximum average IP output per influence-focused colony at end-game) and horizontal radius = 1000 (parameter max_planets, the number of planets at which upkeep stops growing and equals max_output):

y: upkeep of a colony
if x<=max_planets: y = max_output * (1 - ( (owned_planets - max_planets)/max_planets )^2)^0.5
if x>max_planets: y = max_output

https://www.wolframalpha.com/input?i=y% ... 2C+1000%5D

What I like of this function compared to the logistic on percentage of colonized galaxy:
- It has a faster growth early game, more exponential, which is good for the intended purpose of delaying more/sooner the empires that grow faster at start (when the luck factor from starting conditions might be stronger).
- Both have an asymptote at a desired upkeep max, but the logistic version has it at infinitum and this version has it at a given threshold (parameter).
What I don't like (but maybe is not bad):
- The player will have to increase the max_planets parameter for very big galaxies to not slow too much empire growth at later stages of the game.
- Conversely, the parameter should be reduced in small galaxies to ensure that the bigger empires doesn't have too much advantage against smaller empires (i.e., that the ratio of influence-focused planets of the bigger empires is bigger enough to give a chance to the smaller empires).

For comparison, the current formula with a hard cap at 10 upkeep:

https://www.wolframalpha.com/input?i=y% ... 2C+1000%5D

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Fixing Influence - any ideas welcome

#100 Post by Daybreak »

I had thought this new formular would negate the need for more and more planets to be set to influnece the more you gobbled up planets becaase it was nearly impossible to achieve total control of a galaxy.

Do you think that IP requirements should be worse earlier than it is currently the case now under the current linear path formula?

It seems already bad enough. What made you come to this conclusion?

is it possible to have the same path as the linear fomula initially, and then break further to the righ later?

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Fixing Influence - any ideas welcome

#101 Post by Oberlus »

I think you are confused, I am not increasing any early IP cost. Maybe you misunderstood what I was saying about the logistic vs the elliptic functions.
There are no linear functions here, not on this thread, not in the game code base.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Fixing Influence - any ideas welcome

#102 Post by Ophiuchus »

Oberlus wrote: Mon Aug 22, 2022 2:18 pm - It has a faster growth early game, more exponential, which is good for the intended purpose of delaying more/sooner the empires that grow faster at start (when the luck factor from starting conditions might be stronger).
this sentence seems to partly contradict itself. Exponential growth amplifies differences way stronger - so one getting lucky early gets a more significant advantage.

i would guess that being able to colonize multiple planets evens out some luck with a single planet - is that what you meant?
i suggest to make the galaxy setup scripts for multiplayer consider adding/making sure that e.g. a midsize good environment planet is not so far away from the capital.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Fixing Influence - any ideas welcome

#103 Post by Oberlus »

Ophiuchus wrote: Wed Aug 24, 2022 10:20 am
Oberlus wrote: Mon Aug 22, 2022 2:18 pm - It has a faster growth early game, more exponential, which is good for the intended purpose of delaying more/sooner the empires that grow faster at start (when the luck factor from starting conditions might be stronger).
this sentence seems to partly contradict itself. Exponential growth amplifies differences way stronger - so one getting lucky early gets a more significant advantage.
Yeah, exponential growth of outputs.
But here we are talking about the influence upkeep. If upkeep grows faster, then the empire grows slower.

The equation referred to by the text you quoted is exactly the same in the early stages (tens of planets) than what we have now in master.
The logistic function suggested before this one made early upkeep growth slower, so empires that had better available colonization/invasion targets could stick to PP/RP focus for longer. But the idea is that empires that go faster are forced to use influence foci sooner.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Fixing Influence - any ideas welcome

#104 Post by Ophiuchus »

Oberlus wrote: Wed Aug 24, 2022 3:16 pmhere we are talking about the influence upkeep. If upkeep grows faster, then the empire grows slower.
that explains the contradiction, thanks for the context
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

BlueAward
Vacuum Dragon
Posts: 646
Joined: Mon Aug 08, 2022 3:15 am

Re: Fixing Influence - any ideas welcome

#105 Post by BlueAward »

Oberlus wrote: Tue Aug 23, 2022 6:08 am There are no linear functions here, not on this thread, not in the game code base.
Well... Your first proposal to scale influence to universe size had linear function - ratio of planets needing influence focus being linearly proportional to percentage of owned universe
Oberlus wrote: Mon Aug 22, 2022 2:18 pm - It has a faster growth early game, more exponential, which is good for the intended purpose of delaying more/sooner the empires that grow faster at start (when the luck factor from starting conditions might be stronger).
Seem you wish to make early game harder on everybody, as a big equalizer. I wanted to actually make it easier on everybody - THAT being the equalizer, no matter your start, everybody can rise up to some level relatively easily and only then things get harder. Hence using a sigmoid. Which does not need to be logistic function, and can be scaled or "maxed", so it does not produce some leftoever planets at the tail end (so it actually does have a hard cap)

Elipsis is still square root, which makes the early growth comparatively more stunted than later, you're just rescaling it to make it even harsher on early game, and to hard cap sooner at predetermined time.

So ultimately we seem to disagree on a philosophical level about early game. Probably some kind of balanced world gen would be more "permanent" solution to "lucky start" but that balance can be sliced multiple ways and it's another discussion

I don't agree with Geoff's hesitance to scale to galaxy size. Okay, scaling to actual number of planets is maybe problematic technically (and mind also planets can be generated or destroyed!) but heursitic approach based on systems and density makes sense to me and is "public knowledge" so should not be a problem

On the other hand, maybe there's no need to scale to galaxy size. Like 30 planet empire should maybe feel the same regardless of galaxy size, but galaxy size would change the meaning of it at a different level. Dunno. I do like scaling to galaxy size, though (just with something that makes early game easier rather than harder!)

Post Reply