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
wobbly
Cosmic Dragon
Posts: 1880
Joined: Thu Oct 10, 2013 6:48 pm

Fickleness in Necessity Bonus

#1 Post by wobbly »

planet1.png
planet1.png (24.58 KiB) Viewed 1028 times
planet2.png
planet2.png (25.88 KiB) Viewed 1028 times
2 Planets, same game. Compare "Change". One has the +1 research/turn from Necessity, one doesn't. I'll try and get a save from single player at some stage, at the moment I'm struggling to work out the exact conditions to cause it.

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

Re: Fickleness in Necessity Bonus

#2 Post by wobbly »

Ok, I believe I have the pre-conditions and it's a delay based on the order of processing.
  • Adopt necessity on the turn you place a research focused species colony down. Research growth is applied instantly.
  • Adopt necessity on the turn you place an industry focused species colony down. Switch focus. 1 turn delay before research growth bonus.
  • Adopt necessity with colony already down and set to research focus. 1 turn delay for research growth.
  • Switch to Research focus with necessity already adopted. 1 turn delay for research growth.

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

Re: Fickleness in Necessity Bonus

#3 Post by Geoff the Medio »

wobbly wrote: Mon Nov 21, 2022 5:45 am... Switch focus. 1 turn delay ... set to research focus. 1 turn delay ... Switch to Research focus ... 1 turn delay
Based on that, I suspect the pattern is that there's a delay of 1 turn after switching focus?

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

Re: Fickleness in Necessity Bonus

#4 Post by wobbly »

Geoff the Medio wrote: Mon Nov 21, 2022 5:37 pm
wobbly wrote: Mon Nov 21, 2022 5:45 am... Switch focus. 1 turn delay ... set to research focus. 1 turn delay ... Switch to Research focus ... 1 turn delay
Based on that, I suspect the pattern is that there's a delay of 1 turn after switching focus?
Yeah a 1 turn delay on focus switch and a 1 turn delay on turn of adoption. What's weird is the target increase doesn't have the delay, just the growth.

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

Re: Fickleness in Necessity Bonus

#5 Post by Ophiuchus »

so here are my expectations
wobbly wrote: Mon Nov 21, 2022 5:45 am
  • Adopt necessity on the turn you place a research focused species colony down. Research growth is applied instantly.
planet gets invaded (default focus set); policy gets adopted; focus is right; effects are evaluated - so growth effect kicks in
wobbly wrote: Mon Nov 21, 2022 5:45 am
  • Adopt necessity on the turn you place an industry focused species colony down. Switch focus. 1 turn delay before research growth bonus.
planet gets invaded (default focus set); policy gets adopted; effects are evaluated - wrong focus before switch, so no growth effect;
after switching focus should directly apply growth effect
wobbly wrote: Mon Nov 21, 2022 5:45 am
  • Adopt necessity with colony already down and set to research focus. 1 turn delay for research growth.
policy gets adopted; focus good; effects are evaluated; - so Id expect growth effect to kick in
wobbly wrote: Mon Nov 21, 2022 5:45 am
  • Switch to Research focus with necessity already adopted. 1 turn delay for research growth.
should kick in directly after switching focus
wobbly wrote: Mon Nov 21, 2022 6:20 pm Yeah a 1 turn delay on focus switch and a 1 turn delay on turn of adoption. What's weird is the target increase doesn't have the delay, just the growth.
the target values shown are the for the next turn; are you should the target did not have the delay?
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: 1880
Joined: Thu Oct 10, 2013 6:48 pm

Re: Fickleness in Necessity Bonus

#6 Post by wobbly »

Ophiuchus wrote: Mon Nov 21, 2022 8:58 pm
wobbly wrote: Mon Nov 21, 2022 6:20 pm Yeah a 1 turn delay on focus switch and a 1 turn delay on turn of adoption. What's weird is the target increase doesn't have the delay, just the growth.
the target values shown are the for the next turn; are you should the target did not have the delay?
The 2nd screenshot in the 1st post is for a focus change (from protection to research), the 1st screenshot is a planet that was on research last turn. In both cases the policy was adopted in a previous turn.

Edit: Note, as a comparison colonial bootstrapping seems to be kicking in immediately on adoption

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

Re: Fickleness in Necessity Bonus

#7 Post by wobbly »

Have I mentioned yet that the design on Necessity is broken unbalanced cheese? Pretty sure I have. Let's look at early game numbers.

An average research native early game with 13.6 pop and 2 stability, pre-Necessity would produce: 2.72 research. With Necessity it produces 9.62 research. That's not even close to balanced.

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

Re: Fickleness in Necessity Bonus

#8 Post by Geoff the Medio »

Could you suggest an adjustment to decheesify it without completely removing the use case / strategy for lower-stability strategies?

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

Re: Fickleness in Necessity Bonus

#9 Post by Oberlus »

wobbly wrote: Wed Nov 23, 2022 4:16 am An average research native early game with 13.6 pop and 2 stability, pre-Necessity would produce: 2.72 research. With Necessity it produces 9.62 research. That's not even close to balanced.

With current formula sqrt( pop * max(0, 6-stability) ):
(Columns are population)
6-Stability 1 3 9 18 36 54
0.5 0.707 1.225 2.121 3 4.243 5.196
1 1 1.732 3 4.243 6 7.348
1.5 1.225 2.121 3.674 5.196 7.348 9
2 1.414 2.449 4.243 6 8.485 10.392
2.5 1.581 2.739 4.743 6.708 9.487 11.619
3 1.732 3 5.196 7.348 10.392 12.728
3.5 1.871 3.24 5.612 7.937 11.225 13.748
4 2 3.464 6 8.485 12 14.697
4.5 2.121 3.674 6.364 9 12.728 15.588
5 2.236 3.873 6.708 9.487 13.416 16.432
5.5 2.345 4.062 7.036 9.95 14.071 17.234
6 2.449 4.243 7.348 10.392 14.697 18
Notice the +18 RP from having a huge population exactly at 0 stability (last row and column).
I think that number might be OK, because such populations could produce much more with high stability.
What is not OK is that planets with stability 5.5 (first row) are already reaping a big chunk of the maximum RP bonus at lowest stability.
The same reasoning applies to the differences in population: a pop 1 plaet with stability X is already giving 16% of the bonus obtainable with a population 5300% bigger.
This comes from using sqrt in the equation.

Alternative with linear equation pop * max(0, 6-stability) / 20
6-Stability 1 3 9 18 36 54
0.5 0.025 0.075 0.225 0.45 0.9 1.35
1 0.05 0.15 0.45 0.9 1.8 2.7
1.5 0.075 0.225 0.675 1.35 2.7 4.05
2 0.1 0.3 0.9 1.8 3.6 5.4
2.5 0.125 0.375 1.125 2.25 4.5 6.75
3 0.15 0.45 1.35 2.7 5.4 8.1
3.5 0.175 0.525 1.575 3.15 6.3 9.45
4 0.2 0.6 1.8 3.6 7.2 10.8
4.5 0.225 0.675 2.025 4.05 8.1 12.15
5 0.25 0.75 2.25 4.5 9 13.5
5.5 0.275 0.825 2.475 4.95 9.9 14.85
6 0.3 0.9 2.7 5.4 10.8 16.2
With this, a 2 stability planet with 13.6 pop would produce +1.36 RP (roughly +50%), down from +6.9 RP (+250%) with current formula.
The maximum you can get for huge, very unstable planets (last row and column) keeps similar.
This would be a balance improvement, but I like the idea of favouring empires that manage to get a stability as close to 0 as possible.

Alternative with equation exponential on stability distance to 6, pop * max(0, 6-stability)^1.5 / 50:
6 – STA 1 3 9 18 36 54
0.5 0.007 0.021 0.064 0.127 0.255 0.382
1 0.02 0.06 0.18 0.36 0.72 1.08
1.5 0.037 0.11 0.331 0.661 1.323 1.984
2 0.057 0.17 0.509 1.018 2.036 3.055
2.5 0.079 0.237 0.712 1.423 2.846 4.269
3 0.104 0.312 0.935 1.871 3.741 5.612
3.5 0.131 0.393 1.179 2.357 4.714 7.072
4 0.16 0.48 1.44 2.88 5.76 8.64
4.5 0.191 0.573 1.718 3.437 6.873 10.31
5 0.224 0.671 2.012 4.025 8.05 12.075
5.5 0.258 0.774 2.322 4.644 9.287 13.931
6 0.294 0.882 2.645 5.291 10.582 15.873
With this, a 2 stability planet with 13.6 pop would produce +0.77 RP (roughly +28%).

What do you think?

Geoff the Medio wrote: Wed Nov 23, 2022 9:52 am Could you suggest an adjustment to decheesify it without completely removing the use case / strategy for lower-stability strategies?
From above, but waiting for feedback, I suggest using this:

Code: Select all

                SetTargetResearch value = Value +
                    Target.Population * max(0.0, (NamedRealLookup name = "PLC_NECESSITY_MAX_STABILITY") - Target.Happiness)^1.5

Edit: PR https://github.com/freeorion/freeorion/pull/4332

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

Re: Fickleness in Necessity Bonus

#10 Post by LienRag »

wobbly wrote: Wed Nov 23, 2022 4:16 am An average research native early game with 13.6 pop and 2 stability, pre-Necessity would produce: 2.72 research. With Necessity it produces 9.62 research. That's not even close to balanced.
That was never what was supposed to be balanced.

(not that Necessity is necessarily balanced right now, but that's certainly not what should be balanced. It's like comparing the research output of a planet on Production focus with the same planet on Research focus, yes it would be wildly different)

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

Re: Fickleness in Necessity Bonus

#11 Post by wobbly »

LienRag wrote: Wed Nov 23, 2022 12:28 pm
wobbly wrote: Wed Nov 23, 2022 4:16 am An average research native early game with 13.6 pop and 2 stability, pre-Necessity would produce: 2.72 research. With Necessity it produces 9.62 research. That's not even close to balanced.
That was never what was supposed to be balanced.

(not that Necessity is necessarily balanced right now, but that's certainly not what should be balanced. It's like comparing the research output of a planet on Production focus with the same planet on Research focus, yes it would be wildly different)
Flat out disagree. Policies need to be balanced against leaving an empty slot or delaying opening the slot, at least up to a certain phase of the game. This is a literal tripling of research. You keep saying you don't want "no-brainers" in the game. Getting the pre-conditions to milk necessity as early as possible is currently a no-brainer.

That aside: Nascient AI (+1 RP), liberty with 20! stability (+2.04 RP) + algorithmic research (+1.36) = +3.40 is <, is <, is < +6.9. Would you like me to throw in technocracy as well? It's still less then +6.9

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

Re: Fickleness in Necessity Bonus

#12 Post by wobbly »

Oberlus wrote: Wed Nov 23, 2022 11:18 am tables, numbers and suggestion.
Thanks! I'll need to read over them before giving an opinion
Oberlus wrote: Wed Nov 23, 2022 11:18 am but I like the idea of favouring empires that manage to get a stability as close to 0 as possible.
2 comments here:
I'm not sure I actually agree. Reducing stability is where the real cheese is. At below stability 6 you've already lost access to almost all stability based boosters. The most gamey part is deliberately lowering stability. In terms of asthetics/fluff why am I deliberately making all my colonies as unhappy as possible? Why did I adopt random policy x that my species dislikes, but doesn't fit in to any of my general strategy other then an extra -2(or -4) stability? I mean I'm doing it because I'm playing a game of numbers go up (or down in this case) but otherwise ??

2nd comment: If you are assuming 0 stability is max. cheese you are mistaken.
stability.png
stability.png (67.61 KiB) Viewed 861 times
research.png
research.png (830.51 KiB) Viewed 861 times

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

Re: Fickleness in Necessity Bonus

#13 Post by wobbly »

Geoff the Medio wrote: Wed Nov 23, 2022 9:52 am Could you suggest an adjustment to decheesify it without completely removing the use case / strategy for lower-stability strategies?
I don't have a good suggestion, and am glad Oberlus is on the job here. Part of the issue is what time frame we are talking about. If its early - midgame then its matching the numbers roughly against liberty (or algorithmic research) + nascent AI + adaptive automation. However if its balanced against that point it's not competitive midgame - late when more stability based boosters kick in.

And perhaps thats fine, however if you wanted to stretch the working range I'd consider something outside of the policy itself. Currently almost every booster is stability based. If it was more like "every 2nd" or "2 out of 3" it'd be easier to balance low stability vs high stability. The question is, would that be an improvement outside of the context of the policy? My own opinion is that it would be.

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

Re: Fickleness in Necessity Bonus

#14 Post by LienRag »

wobbly wrote: Wed Nov 23, 2022 2:13 pm In terms of asthetics/fluff why am I deliberately making all my colonies as unhappy as possible? Why did I adopt random policy x that my species dislikes, but doesn't fit in to any of my general strategy other then an extra -2(or -4) stability? I mean I'm doing it because I'm playing a game of numbers go up (or down in this case) but otherwise ??
I believe that is the actual problem.

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

Re: Fickleness in Necessity Bonus

#15 Post by Oberlus »

wobbly wrote: Wed Nov 23, 2022 2:13 pm
Oberlus wrote: Wed Nov 23, 2022 11:18 am but I like the idea of favouring empires that manage to get a stability as close to 0 as possible.
2 comments here:
I'm not sure I actually agree. Reducing stability is where the real cheese is. At below stability 6 you've already lost access to almost all stability based boosters. The most gamey part is deliberately lowering stability. In terms of asthetics/fluff why am I deliberately making all my colonies as unhappy as possible? Why did I adopt random policy x that my species dislikes, but doesn't fit in to any of my general strategy other then an extra -2(or -4) stability? I mean I'm doing it because I'm playing a game of numbers go up (or down in this case) but otherwise ??

2nd comment: If you are assuming 0 stability is max. cheese you are mistaken.
Oh... I thought planets at stability < 0 had zero outputs (special case conc. camps, but those set stability=0).
My preference for rewarding empires that manage lower stability was counting on that.
And the equations count on that for balance (max output).

I'll look into it.

Any objection on making stability<0 force zero outputs?

Post Reply