FreeOrion

Forums for the FreeOrion project
It is currently Tue Jun 19, 2018 10:42 am

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Fri Jun 01, 2018 11:28 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4561
Location: Sol III
Krikkitone wrote:
Well then revert them to max meters... or possibly make them max meters for focus switching only (ie when you switch focus all meters are reduced to their maximum under the new focus.)
That would quite drastically change balance/dynamics.

The "target" meter stuff is supposed to convey the idea of a gradual switch in a colonies focus. The meter values kind of represents the industrial/scientific/whatever infrastructure that has been build up, when you switch the focus from industry to research for example, the gradual growth of the research and decline of the industry meter simulates/represents the "rededication"/"repurposing"/"re-equipment" (or whatever you want to call it) of all those buildings and structures making up the industrial infrastructure to a "research and development" kind of infrastructure.

Having both the increase of the one and the decline of the other meter happen at the same rate simulates the fact that usually you won't do such a switch by totally levelling your existing infrastructure and then rebuild from scratch, but to gradually replace one with the other.

I think that model works quite nice, and it allows you to reconsider your decision to switch focus at any point without having to suffer extreme setbacks. IMO that's an interesting and fun mechanic. If we decide to set back current meters to their max meters all the time when the focus gets switched, that dynamic is lost. Instead we have the "totally level your existing infrastructure and rebuild from scratch" approach, and each focus switch becomes a very serious/difficult decision, as the costs can be extreme, particularly if you have a maxed out meter.

Which means, aside from the changes dynamics, you also have the problem that the costs for a focus switch can vary greatly, depending on the level of the current meter that will drop in case of a switch, the scale of the meters involved in the switch, etc. It would make switching from the logistics to the industry or research focus much less costly then switching from industry/research to logistics. Meaning, making a switch from logistics to industry isn't a big deal if you want to switch back shortly after, but in the opposite case it would be a huge issue. I don't think I like that very much.

A fixed, moderate, well balanced influence cost for a focus switch would be much preferable to that, IMO.


Top
 Profile  
 
PostPosted: Fri Jun 01, 2018 11:44 am 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4561
Location: Sol III
Oberlus wrote:
Doesn't seem difficult to balance the change rate of the different meters
No, of course not, which is why I said I consider this to be a possible viable approach. It's just not simpler than an influence fee. Both have their pros and cons, we can even consider to do both (combining them).

Personally I prefer the influence fee approach, because it would allow us to have the growth/shrink rates of the meters affected by a focus switch to be the same. That IMO more believably conveys the idea that a planetary population/infrastructure gradually switches their colony from focusing on e.g. industry to e.g. research. It also better fits with the idea that you can revert such a process any time, and then only having to revert the changes that have happened to far, and not having to rebuild the original infrastructure completely.


Top
 Profile  
 
PostPosted: Fri Jun 01, 2018 12:12 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 592
Vezzra wrote:
The "target" meter stuff is supposed to convey the idea of a gradual switch in a colonies focus. The meter values kind of represents the industrial/scientific/whatever infrastructure that has been build up, when you switch the focus from industry to research for example, the gradual growth of the research and decline of the industry meter simulates/represents the "rededication"/"repurposing"/"re-equipment" (or whatever you want to call it) of all those buildings and structures making up the industrial infrastructure to a "research and development" kind of infrastructure.
Yes to all of it.
However, if the ratio increase:decrease is 1:1 the simulation you mention (which I assume to be related to realism?) is clearly off. If you take X% of your workforce and infrastructures from your previously focused task and put them to training and repurposing of the infrastructures for the new task, implying only a -X% production of the previous task, there's no chance you get +X% increase on your new task. And the old one would be zeroed way sooner than the new one reaches its maximum output. In fact, I think 1:5 would be more realistic (irrelevant, I know) than the suggested 1:3.
But more important, this 1:1 ratio also goes against some game design principles/aims (at least "avoid or at least discourage micromanagement").

The suggestion of making the ratio to punish both improves that simulation you mentioned (irrelevant, I know) as well as discourages micromanagement without any negative effects on game play, plus the implementation is fairly simple and small (already sketched in this thread) and could be used at least until influence is implemented.


Top
 Profile  
 
PostPosted: Fri Jun 01, 2018 12:44 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4561
Location: Sol III
Oberlus wrote:
In fact, I think 1:5 would be more realistic (irrelevant, I know) than the suggested 1:3.
Wow, do you really think it would be that extreme? Realistically, I would have thought the ratio to be more something along the lines of 1:1.2 or 1:1.3, to account for the "administrative overhead" (after all, you need resources to retrain your personnel), so 1:1 would be close enough to be "realistic". The "adminstrative overhead" would be what the influence fee represents.

But of course, I'm a technician, not an economist, so what do I know how these things work in the real world... ;)
Quote:
The suggestion of making the ratio to punish both improves that simulation you mentioned (irrelevant, I know) as well as discourages micromanagement without any negative effects on game play, plus the implementation is fairly simple and small (already sketched in this thread) and could be used at least until influence is implemented.
Well, of course, as a stop-gap solution until Influence is implemented that normally would be an option.

However, AFAIK the real reason why we didn't do this long ago has been objections by the AI team. Apparently such a change would break the AI quite badly, and adjusting the AI to consider those costs for focus switching correctly is far from trivial. If that's correct (AI team?), then putting this in as a stop gap solution until Influence is implemented doesn't make much sense at this point, with Influence practically around the corner. It would only double the work for the AI team, and I'm pretty wary of Dilvish' assassins... :shock: :mrgreen:


Top
 Profile  
 
PostPosted: Fri Jun 01, 2018 3:02 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 592
Vezzra wrote:
But of course, I'm a technician, not an economist, so what do I know how these things work in the real world... ;)
:lol: :lol: :lol:
I'm a IT engineer working with economists. I know they know nothing!

Vezzra wrote:
AFAIK the real reason why we didn't do this long ago has been objections by the AI team. Apparently such a change would break the AI quite badly, and adjusting the AI to consider those costs for focus switching correctly is far from trivial. If that's correct (AI team?), then putting this in as a stop gap solution until Influence is implemented doesn't make much sense at this point, with Influence practically around the corner. It would only double the work for the AI team, and I'm pretty wary of Dilvish' assassins... :shock: :mrgreen:
I'm too!

Anyway, I bet AIs are better giving up that intensive focus switching they do (what I pressume causses those saw teeth graphs for them). That never gets them anywhere. I have no idea how are performed the predictions and decission-making in the FO AIs, but in my case the decission making about foci is rather straightforward:

1. Capital and each new colony begins with focus set to the best species trait (either industry or research). If same value stick to the preferred focus unless it is something funny and for which I pick research.
2. From time to time, check this:
- IF primary construction objectives require more PPs AND you don't predict future increases thanks to incoming techs/buildings will fill in the need AND primary research objectives are fully feeded with RPs THEN switch planets until all primary construction objectives are feeded or some primary research objective lacks RPs, picking first the colonies with greater target IncrementOnPPs/DecrementOnRPs.
- IF there are RPs in excess for all relevant research objectives (primary and secondary) AND you don't predict that a new, demanding tech in the queue will require that excess in a near future (5 turns) AND there is no excess production THEN switch planets until... (idem).

Something else is the implementation of the details, where devil (not Dilvish, the other one) lies. For starters, what is primary, what is secondary and what's something else?


Top
 Profile  
 
PostPosted: Fri Jun 01, 2018 7:35 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4645
Vezzra wrote:
However, AFAIK the real reason why we didn't do this long ago has been objections by the AI team. Apparently such a change would break the AI quite badly, and adjusting the AI to consider those costs for focus switching correctly is far from trivial.
I don't recall making such an objection, but I won't claim it's not possible. There has been a lot of reorganization and cleanup of the AI focus setting code since that time-- taking a look at the code now it appears to me that a couple fairly simple changes would prevent it from outright breaking the AI; some additional modest rework would probably also be useful for the AI to really handle that dynamic properly.

Quote:
If that's correct (AI team?), then putting this in as a stop gap solution until Influence is implemented doesn't make much sense at this point, with Influence practically around the corner. It would only double the work for the AI team
Vezzra, so just what is the focus change penalty rule you'd prefer to adopt if it weren't too much AI work? If someone wants to put up a 'Work in Progress' PR with that, I'd be game to at least check if some modest adjustment lets the AI deal with it sufficiently well.

Oberlus wrote:
Anyway, I bet AIs are better giving up that intensive focus switching they do (what I pressume causses those saw teeth graphs for them). That never gets them anywhere.
From Sun Tsu, The Art of War, "If an action is beneficial, take it! If your enemy thinks it won't get you anywhere, make sure he notices the action!"

edit: p.s., OK, that's not really Sun Tsu, but almost...

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Fri Jun 01, 2018 9:59 pm 
Offline
Creative Contributor
User avatar

Joined: Sat Sep 13, 2003 6:52 pm
Posts: 1414
The key is to avoid focus bouncing back and forth for a "hybrid focus"
Two ways to do that
1. make it so that amount lost is always more than the ratio of the two different targets
2. make it so that the cost of switching itself is always more than the gain

#1 is better

what I would do.
gain=1
loss= maximum of (1, target value of this meter at best focus/target value of focus)

so for a planet with 100 ind at ind focus and 300 res at res focus, the amount of research that would be lost each turn after switching to industrial focus is 3.

then add some influence cost to switching on top of that


Top
 Profile  
 
PostPosted: Fri Jun 01, 2018 10:26 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 592
Krikkitone wrote:
what I would do.
gain=1
loss= maximum of (1, target value of this meter at best focus/target value of focus)

so for a planet with 100 ind at ind focus and 300 res at res focus, the amount of research that would be lost each turn after switching to industrial focus is 3.

then add some influence cost to switching on top of that
I like that.
Continuing your example, if the planet was ind focus then it would lose max(1,100/3)=1 industry each turn
With a ind 50 res 250 planet, it would be -1 industry or -5 res.

Ah! But with a X/X planet you get the odd result that decreases are both -1. Feels strange that a planet with ind=1*pop and res=1*pop (balanced ind/res) receives no penalty for focus switching (appart from influence fee) while another colony with ind=1.5*pop and res=0.5*pop get a -3 decrease ratio for industry. But I certainly like that a hu...
WTF! Now I understand what Dilvish meant with his Tsun Tzu Tzomthing stuff!

You let your max 30 industry colony (but just max 10 res colony) reach its max. You are then at 30/2 (or whatever res makes sense here). Then you switch to res focus for 8 turns. Your research is now at 10 (max) and your ind is at 20 or so, way over it's minimum of 5. Then you switch over to ind during 8 turns.
You keep your industry at an average 83% of its max, and research at its 60%. An empire that does not micromanage focus is getting only 17%/100% or 100%/20%.
¡¡It's so unfair!!


Now I couldn't understand how you all shouldn't want to include a penalisation to always make decrease rate of a meter greater than its corresponding increase rate. Edit: asap.


Top
 Profile  
 
PostPosted: Sat Jun 02, 2018 7:46 am 
Offline
Space Floater

Joined: Sat Jul 01, 2017 4:54 am
Posts: 40
Vezzra wrote:
Geoff the Medio wrote:
Unless, potentially, an empire has lots of influence, and thus doesn't mind spending some to do some focus switching micromanagement...
That's a problem we can't avoid regardless what kind of penalty/cost we decide to apply to focus switching. If an empire can, for whatever reason, easily afford that cost/penalty, it can happily switch around.

Exactly. This is the point I am trying to make about the penalty/cost for switching, it will not stop focus dancing.


Vezzra wrote:
However, the basic issue here is that the scale of the various meters is not comparable. But e.g. the planetary shield and supply meters have a very different scale (and for both meters there are foci which can boost them).

To account for that, you'd have to have different growth/shrink rates for the different meter types, depending on their overall scale throughout a typical game.

You are correct, I missed this problem. I wouldn't mind reworking how focus works to make the differing scales issue go away, but thats a completely different topic.

To deal with it:
Oberlus wrote:
although just 1:1 for supply would be reasonable too)

This was what I was going to suggest after first reading Vezzra's concern, so as long as pair wise the cost is greater then the income, no problem.



Gault.Drakkor wrote:
That is if you want to avoid focus dance, make the per turn cost greater then the per turn benefit. Which currently is not true. so focus dance is viable.

To re-state it a bit differently. There are three possible states taking an individual planet.
  • positive return ie +1, 0. In this case focus dance is always good. The variable cost of focus change only changes how frequent focus is changed.
  • critical ie +1,-1. In this case for a single planet it is neutral, but including the empire as a whole make it sometimes good to focus dance. Again the variable cost would only change the frequency of the focus change.
  • negative return ie +1 -2. In this case it is always bad to change focus, regardless of additional focus change cost. The more negative the return the more clear it is that focus dance is bad.
So In all cases the fee to switch, the variable cost, is extraneous complexity. The fee does not affect meaningfully change weather or not focus dancing is viable. If there are game play reasons why, OK. But I feel it is just complexity for complexity sake.

Or yet another way: there can be positive feedback, negative feedback, or critical, with the fee controlling the oscillation. I am saying it would be best to have negative feedback, no oscillation.

Side note: If realism is being taken into account the penalty for focus change should be much steeper. Probably to the tune of 10-50% per turn. Look at what happened in Seattle for the tunnel, they hit a metal pipe had to refocus priorities, months were added to the project.
Look at poor NASA, every four years, big focus change. Those focus change costs for NASA are steep.

This says to me the 1:1 default is purely game play, and it has undesired consequences, so it should be changed to have negative return. And again the fee to change is low game play value in my opinion and can and should be scraped for KISS. I'll see about putting together the changes for this.


Top
 Profile  
 
PostPosted: Sun Jun 03, 2018 1:55 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4561
Location: Sol III
Dilvish wrote:
I don't recall making such an objection, but I won't claim it's not possible. There has been a lot of reorganization and cleanup of the AI focus setting code since that time-- taking a look at the code now it appears to me that a couple fairly simple changes would prevent it from outright breaking the AI; some additional modest rework would probably also be useful for the AI to really handle that dynamic properly.
I'm not 100% sure, but I think I remember the last time that topic came up was at the time we introduced the current one-turn-only penalty when switching focus (where the meter you switch away from drops 2 instead of only 1 the first turn after the switch). IIRC the reason (or one of the reasons) why we decided to stick with only that one-turn-only penalty has been because that approach didn't require any (or only very simple) AI adjustments. Making it so that ratio for meter increase/decline is 1:2 would have required more AI adjustments, which maybe no one had the time to do at that point (could be that this happened during your one year break from FO ;)).

But if your current assessment is that the adjustments for the AI wouldn't be too difficult if we made focus switching actually really costly, then by all means, lets do it (not for 0.4.8 obviously, but for the next release cycle)!
Quote:
Vezzra, so just what is the focus change penalty rule you'd prefer to adopt if it weren't too much AI work?
Ha, good question. After reading the discussion and ideas presented so far, and mulling things over, I guess a combination of influence costs and faster meter decline than increase (ratio to be determined) seems to be the best. Although I don't have a strong preference either way (a meter increase/decline ratio of 1:n with n>1, influence costs, or both), so I can live with any of these approaches.


Top
 Profile  
 
PostPosted: Thu Jun 07, 2018 9:48 pm 
Offline
Creative Contributor
User avatar

Joined: Sat Sep 13, 2003 6:52 pm
Posts: 1414
An issue is a simple >1 multiplier doesn't always work.

Imagine a species whose worlds can be
10 ind, 0 res
or
0 ind, 100 res

If meters grow at 1 and drop at 2
Res Focus...
0, 100
switch to Ind focus for 10 turns
10, 80
switch to Res focus for 20 turns (Ind hits 0 after 5 turns)
0,100
and repeat

Your average Research over 30 turns is 90 (100*30 - 1/2*20*30)/30
Your average Ind over 30 turns is (1/2*10*15)/30=2.5

So instead of
0,100 or 10,0 you have 2.5,90.... which is preferable (gained 1 industry at a cost of 4 research instead of 10 research)

What might work
Target meters decline at the same basic rate they rise, BUT they also drop at "This Meter's Current Value"/"Focus Meter's Target value"

So for our model
0 I, 100 R..
switch to Ind focus
Industry adds +1 each turn
Research drops by -1 and an additional 1/10 of its total amount (so -1+ -9.9 or -1+-10 depending on order of operations)

So you would approximately be paying the cost of switching (and a bit extra)


Top
 Profile  
 
PostPosted: Wed Jun 13, 2018 11:46 am 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 482
Krikkitone wrote:
An issue is a simple >1 multiplier doesn't always work.

I think thats a balancing issue and depends on the game content. So it is a heuristic, the same as the 10% decrease you proposed. I would prefer have not too many effects complicating the calculation. So if a simpler approach suffices I would prefer that.

So talking about balancing:
The value of any resource like RP will always be very situation dependent. But if we agree on a default relative value in a default universe (e.g. lets say 1RP ~= 1PP) we can actually start talking about balancing techs etc and also exchange costs including focus switching.

There is a relative exchange costs relating to species traits in your empire. So if you have a good research species and a bad research species you will probably first switch the good species to research. So with the current content average_industry/average_research are easy to acquire and great_ are exceptional. So if we compare bad_ vs great_ traits we are on the safe side. Both industry and research use the same basic multipliers:
Code:
BAD_MULTIPLIER
'''0.75'''

AVERAGE_MULTIPLIER
'''1.0'''

GOOD_MULTIPLIER
'''1.5'''

GREAT_MULTIPLIER
'''2.0'''

ULTIMATE_MULTIPLIER
'''3.0'''

So from population bonus the bonus factor for switching focus is less than 3. Tech does have an bigger effect (more industry bonus AFAIK).

But just looking at species traits, a focus exchange rate of +1:-3 should be good.

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Jun 13, 2018 10:42 pm 
Offline
Creative Contributor
User avatar

Joined: Sat Sep 13, 2003 6:52 pm
Posts: 1414
Ophiuchus wrote:
Krikkitone wrote:
An issue is a simple >1 multiplier doesn't always work.

I think thats a balancing issue and depends on the game content. So it is a heuristic, the same as the 10% decrease you proposed. I would prefer have not too many effects complicating the calculation. So if a simpler approach suffices I would prefer that.

So talking about balancing:
The value of any resource like RP will always be very situation dependent. But if we agree on a default relative value in a default universe (e.g. lets say 1RP ~= 1PP) we can actually start talking about balancing techs etc and also exchange costs including focus switching.

There is a relative exchange costs relating to species traits in your empire. So if you have a good research species and a bad research species you will probably first switch the good species to research. So with the current content average_industry/average_research are easy to acquire and great_ are exceptional. So if we compare bad_ vs great_ traits we are on the safe side. Both industry and research use the same basic multipliers:
Code:
BAD_MULTIPLIER
'''0.75'''

AVERAGE_MULTIPLIER
'''1.0'''

GOOD_MULTIPLIER
'''1.5'''

GREAT_MULTIPLIER
'''2.0'''

ULTIMATE_MULTIPLIER
'''3.0'''

So from population bonus the bonus factor for switching focus is less than 3. Tech does have an bigger effect (more industry bonus AFAIK).

But just looking at species traits, a focus exchange rate of +1:-3 should be good.


That would probably work for most cases (it actually would only let you trade off at a 1:9 if you were focus switching back and forth... so it should probably be ok.)


Top
 Profile  
 
PostPosted: Thu Jun 14, 2018 2:31 pm 
Offline
Psionic Snowflake

Joined: Tue Sep 30, 2014 10:01 am
Posts: 482
Krikkitone wrote:
Ophiuchus wrote:
But just looking at species traits, a focus exchange rate of +1:-3 should be good.


That would probably work for most cases (it actually would only let you trade off at a 1:9 if you were focus switching back and forth... so it should probably be ok.)

Actually i think you get a 1:6 rate i think. Think you got max RP and min PP. If you switch for 1 turn.
  • turn 0 - max RP min PP // switch to industry
  • turn 1 - max-3 RP min+1 PP // switch to research
  • turn 2 - max-2 RP min PP
  • turn 3 - max-1 RP min PP
  • turn 4 - max RP min PP
So you traded 6 (= 3+2+1) RP for 1 PP.

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Fri Jun 15, 2018 9:19 am 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 592
Got another idea about this:
What about making the change rates of industry and research proportional to the difference between max and min values with a minimum of 1 point per turn for increase and 2 for decrease?
If 10% per turn for increase and 20% for decrease, a meter would go from minimum to maximum in min(10, maximum-minimum) turns, and from maximum to minimum in min(5, (maximum-minimum)/2) turns.

By switching focus you will always be trading a considerably greater percentage of your currently focused meter than what you get from the other meter, for as long as twice the time required to zero the initially focused meter.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group