Fickleness in Necessity Bonus

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
Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Fickleness in Necessity Bonus

#16 Post by Ophiuchus »

I am also (now finally) in a position to milk Necessity for the first time. And i am totally looking for ways to make that planet as unhappy as possible (without having a revolution). I could also go for metropoles there (because yay population). :mrgreen:

Also spying at universe stats i am quite late in the game of necessity milking it sems :shock:

As far as I see the combined PP/RP output of metropoles there would be a bit lower than RP Necessity. But Metropoles has soooo many restrictions. While Necessity has basically none. Also that species there really dislikes buildings... So guess what I am about to do :mrgreen:
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!

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

Re: Fickleness in Necessity Bonus

#17 Post by wobbly »

Oberlus wrote: Wed Nov 23, 2022 3:14 pm Any objection on making stability<0 force zero outputs?
I'd prefer negative stability = 0 stability

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

Re: Fickleness in Necessity Bonus

#18 Post by Oberlus »

wobbly wrote: Wed Nov 23, 2022 7:40 pm
Oberlus wrote: Wed Nov 23, 2022 3:14 pm Any objection on making stability<0 force zero outputs?
I'd prefer negative stability = 0 stability
Magnitude of negative stability is used for rebel troops generation, IIRC. If so, negative stability must be possible.
Maybe it can be done in other ways, but in any case, Necessity could have "Stability low = 0" to not work on rebelling planets.

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

Re: Fickleness in Necessity Bonus

#19 Post by LienRag »

Oberlus wrote: Wed Nov 23, 2022 8:51 pm Necessity could have "Stability low = 0" to not work on rebelling planets.
It was supposed to work that way, from the description.

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

Re: Fickleness in Necessity Bonus

#20 Post by wobbly »

Oberlus wrote: Wed Nov 23, 2022 8:51 pm
wobbly wrote: Wed Nov 23, 2022 7:40 pm
Oberlus wrote: Wed Nov 23, 2022 3:14 pm Any objection on making stability<0 force zero outputs?
I'd prefer negative stability = 0 stability
Magnitude of negative stability is used for rebel troops generation, IIRC. If so, negative stability must be possible.
Maybe it can be done in other ways, but in any case, Necessity could have "Stability low = 0" to not work on rebelling planets.
What I'm suggesting is min(6, 6-stability). Though other suggestions are possible.

Your table seems to have a /50 which is not in the PR? I haven't tried plugging in any numbers to see what was intended.

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

Re: Fickleness in Necessity Bonus

#21 Post by Oberlus »

wobbly wrote: Thu Nov 24, 2022 6:40 am What I'm suggesting is min(6, 6-stability). Though other suggestions are possible.

Your table seems to have a /50 which is not in the PR? I haven't tried plugging in any numbers to see what was intended.
Oh, right to both. I have to fix the PR.

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

Re: Fickleness in Necessity Bonus

#22 Post by Ophiuchus »

Ophiuchus wrote: Wed Nov 23, 2022 3:22 pm I am also (now finally) in a position to milk Necessity for the first time. And i am totally looking for ways to make that planet as unhappy as possible (without having a revolution).
note that i tried to go below zero (because my troops could handle the rebels) as i forgot the stability guards for the basic research bonus and when stability went below zero, suddenly the planet lost ~7 target RP.
i have the feeling that also the current research meter value dropped instantly (which it should not?). but cant pinpoint that... it is not a max meter, so it should not simply cut off; probably it just dropped strongly(?). with such a low stability growth completely depends on the necessity growth effect, so a one turn drop 7 current research meter leads to the heavy loss of 28 RP.

surfing quite close to zero with likes/dislikes means one needs to look every turn carefully what will happen next turn. e.g. for a kobuntura planet when a new disliked building gets build somewhere in the empire, it might decrease stability by 0.3 (or 0.1? or 0.5? who knows), kicks stability under zero and leads to a massive loss of research.

another issue is that ~every change in policies etc needs to be countered. so e.g. scrapping a disliked building.

as said i still do not have much experience with the necessity policy, but i think i would prefer some kind of smoothing or warning here.

the easiest tweak would be to change the incentive to go to zero stability. e.g. give the same amount of research boost for 0 to 1 (or e.g. 0 to 2) stability. This would give a bit of freedom with likes/dislikes.

also the decrease formula might be fishy.

another more important thing is a better UI/projection for effects of stability effects. E.g. what will industry/research/... target values when the e.g. target stability is reached. In principle stability is not different from any other meter, and as we cant rule out non-monotonic effects (e.g. that growing stability lowers the target research is such a non-monotonic effect), to be correct in the general case we might need to iterate to a fixpoint (and/or stop after a certain number of iterations).
In practical terms it might be enough to simply set stability to the target value and calculate the resulting meters. Buut this is a content thing, so doing that in the backend is not correct. The correct way for the "simple" solution is probably to specify a FOCS effect which gets evaluated before calculating the "final" target meters. So for the current content that effect would set the stability of a planet to the target stability.
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: Fickleness in Necessity Bonus

#23 Post by Oberlus »

FDR, in master, Necessity no longer gives you any bonus at stability < 0.

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

Re: Fickleness in Necessity Bonus

#24 Post by Ophiuchus »

Oberlus wrote: Thu Dec 29, 2022 9:43 am FDR, in master, Necessity no longer gives you any bonus at stability < 0.
I know. Does not change the issue that 0.1 is the best stability
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: Fickleness in Necessity Bonus

#25 Post by Oberlus »

The risk of losing the bonus if you try to milk it too hard is part of what I like from Necessity.
But I understand that inviting the player to play that game, with the many things one has to consider and reconsider every turn, maybe we should not encourage such a game.

The bonus could be independent of how close to minimum or maximum stability. Something like +0.2*pop if 0<stability<6.
That's "boring".

The bonus could be maximum at stability 3, and go down in either direction from there (zero at stability 0 or 6).
Still inviting players to fiddle with building or scrapping stupid stuff to finetune the stability of each planet.

I never liked a bonus based on low stability anyways. I think the best solution should be to completely change Necessity so that it doesn't encourage players doing stupid stuff like spamming buildings to annoy an owned species.

Ideas?

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

Re: Fickleness in Necessity Bonus

#26 Post by Ophiuchus »

Oberlus wrote: Thu Dec 29, 2022 9:26 pm I never liked a bonus based on low stability anyways. I think the best solution should be to completely change Necessity so that it doesn't encourage players doing stupid stuff like spamming buildings to annoy an owned species.
+1
Oberlus wrote: Thu Dec 29, 2022 9:26 pm Ideas?
one could base the bonus on another low resource, but that has milder variants of the same issues.
its milder if the player has less agency about lowering the value (e.g. target population)

we could base it on hostility of environment (more bonus the worse the environment).
using terraforming/repopulation to get a worse environment has probably a high enough cost that is usually prohibitive.
the policy could also slow down dying out of colonies. so if one ~mistakenly (or ~too early) colonizes an uninhabitable planet, one can use the slow down to buy some time and the research bonus to get the necessary population tech to live there.

or we get rid of the whole non-monotonic idea, but i cant come up something fitting the theme of necessity.
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: Fickleness in Necessity Bonus

#27 Post by Oberlus »

Ophiuchus wrote: Fri Dec 30, 2022 10:07 am its milder if the player has less agency about lowering the value (e.g. target population)
Yeah, better but still not cool.

we could base it on hostility of environment (more bonus the worse the environment).
That I like it.

Slowing down population die doesn't seem like a real benefit to me nowadays: given that planting a colony also increases influence upkeep, and that each turn your pop goes down means even more turns to max out population later, anyone would be better off holding the colony until the right pop bonus.


Re. other innovative/diverse (non-monotonic?) effects, with Necessity I always end up in the same place: "necessity sharpens your wit". So you figure out new ways (weapons, techniques, etc.) when you really need them. Better weapons in time of war, better food production techniques in time of hunger...

It can be based solely on being at war, too easy to exploit (pal, let's declare war to each other to milk Necessity...).

Situations of necessity:

- Losing planets or ships to an enemy. Can we script an effect that (with Necessity adopted) gives a discount to certain techs for a while after losing a planet to an enemy?
This would still be exploitable (Pal, invade this planet of mine and I invade this of yours so that we both can milk Necessity, when bonus expires then reanse and repeat.

- Being at war with a much more powerful empire. Can we script effects that compare overal known strengths of empires at war? Complex because of alliances, and even easier to exploit than the above.

- Having blockaded planets. The bonus could go to all research planets of the empire or only to the blockaded ones, but I pressume the former is better for gameplay. Still exploitable with "friendly" blockades of research-focused planets.

. Having blockaded planets by armies that are strong compared to own fleets. Harder to exploit because it implies to devote a big chunk of your ships to "friendly" blockades, leaving undefended the front lines to real enemies, and because one of the two empires won't be able to exploit it, only the weak-army empire: so all in all, exploiting this would be quite risky and hopefully discouraging for any empire that is doing great. If only empires that are in real necessity in terms of game (i.e. aparently losing the game) can "exploit" Necessity, then it is OK for me.

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

Re: Fickleness in Necessity Bonus

#28 Post by Ophiuchus »

Oberlus wrote: Fri Dec 30, 2022 10:43 am Slowing down population die doesn't seem like a real benefit to me nowadays: given that planting a colony also increases influence upkeep, and that each turn your pop goes down means even more turns to max out population later, anyone would be better off holding the colony until the right pop bonus.
yes, I intended this mostly for the case of a newbie doing the wrong thing. Could give a "tutorial" sitrep saying: Target population is zero or less. Population is dying in XXX turns: adopt Necessity to slow this down to YYY turn. Research ZZZ tech in order to increase target population on HOSTILITY planets (link to pedia article).


Oberlus wrote: Fri Dec 30, 2022 10:43 am Situations of necessity:
...
- Having blockaded planets. The bonus could go to all research planets of the empire or only to the blockaded ones, but I pressume the former is better for gameplay. Still exploitable with "friendly" blockades of research-focused planets.
didnt like the others, but maybe a variation of this one? bonus based on being disconnected from capital (when not in confederation)?
bonus based on the level/malus of bad connection - which also decreases stability - without tying it to target stability.
Oberlus wrote: Fri Dec 30, 2022 10:43 am . Having blockaded planets by armies that are strong compared to own fleets. Harder to exploit because it implies to devote a big chunk of your ships to "friendly" blockades, leaving undefended the front lines to real enemies, and because one of the two empires won't be able to exploit it, only the weak-army empire: so all in all, exploiting this would be quite risky and hopefully discouraging for any empire that is doing great. If only empires that are in real necessity in terms of game (i.e. aparently losing the game) can "exploit" Necessity, then it is OK for me.
strikes me as too complicated at the moment. If we did something like it I would tie it also to sufficient enemy troop presence in the area (because then the friend could simply decide: oh, i rather invade the planet(s) for myself).
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
LienRag
Cosmic Dragon
Posts: 2148
Joined: Fri May 17, 2019 5:03 pm

Re: Fickleness in Necessity Bonus

#29 Post by LienRag »

Oberlus wrote: Fri Dec 30, 2022 10:43 am . Having blockaded planets by armies that are strong compared to own fleets. Harder to exploit because it implies to devote a big chunk of your ships to "friendly" blockades, leaving undefended the front lines to real enemies, and because one of the two empires won't be able to exploit it, only the weak-army empire: so all in all, exploiting this would be quite risky and hopefully discouraging for any empire that is doing great. If only empires that are in real necessity in terms of game (i.e. aparently losing the game) can "exploit" Necessity, then it is OK for me.
Interesting idea.

quarague
Space Floater
Posts: 31
Joined: Thu Jan 05, 2023 8:00 pm

Re: Fickleness in Necessity Bonus

#30 Post by quarague »

Question, where the screen shots in the very first post by wobbly achieved with significant negative stability?
I've been playing the December 27th release of 0.5 (that is well after wobbly's post) and there (I believe since then from this discussion thread) negative stability automatically leads to 0 target output (this seems very reasonable to me in general).

The Pedia entry on Necessity reads "Increases Target Research by 0.02 multiplied by the power to 1.5 of how far Stability is below 6.00 multiplied by Population."
So the maximal bonus would be achieved at Stability 0 and that would 0.02*6^1.5=0.294 times population. The base science rate is 0.2 times population and Eaxaw don't get any adjustments to their research output so if I understand the formulas correctly the bonus from Necessity would be at most around 1.5 times the base population rate (unless the species has a reduction to their base rate) and values as in the screenshot where the Necessity bonus is 4 or even 10 times the base rate are impossible in the lastest build. Is that correct?

Post Reply