FreeOrion

Forums for the FreeOrion project
It is currently Thu May 23, 2013 11:14 am

All times are UTC




Post new topic Reply to topic  [ 56 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Meter Growth
PostPosted: Mon Oct 19, 2009 4:38 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
In the current SVN version of the game, all meters grow at a rate of 1 per turn until they reach their max meter value. This gives an advantage for micromanaging meter changes.

If I want to change both foci from say, mining to research, there is no advantage to doing it directly, since that would immediately eliminate all my mining production. Instead, it would be better to set secondary focus to balanced first, then wait one turn for research to reach its new max meter. At this point, I have only lost 4 from my max mining, and my research is just as high as it would have been otherwise. Then, I would set primary focus to balanced, losing 12 from max mining, but gaining other resources as well while waiting three turns for research to max out. When research is at max, I would then set secondary focus to research and wait four turns for it to max out, still gaining other resources from the primary balanced setting. Then, I would finally set primary focus to research, and I would be much better off than if I had changed them directly.

This could probably be compensated for by either making meter growth dependent on focus, so that research growth would take place 3 times as fast if primary focus was set to research than if secondary focus was. Alternatively, meter growth could be a function of max meter value. This is probably better, since it takes into account effects which might be raising the max meter, thus allowing more time for the meter to max out if its growth is only dependent on focus, and possibly making it advantageous to change foci gradually.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Mon Oct 19, 2009 5:36 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
...advantage for micromanaging meter changes.

I suppose not giving an advantage to micromanaging focus settings was a reason the meters used to grow dependent on the max value (in a fomula that also involved the construction meter).

Bigjoe5 wrote:
Alternatively, meter growth could be a function of max meter value. This is probably better, since it takes into account effects which might be raising the max meter, thus allowing more time for the meter to max out if its growth is only dependent on focus, and possibly making it advantageous to change foci gradually.

Are you suggesting it should be beneficial to micromanage focus? If so, I'm inclined to disagree...

Having resource meters grow each turn by the sum of:
+1 always
+1 if the secondary focus is set to the resource
+1 if the primary focus is balanced
+2 if the primary focus is set to the resource

might work to motivate setting focus to what is wanted long term, rather than micromanaging. There are probably still a few cases were micromanagement might be of some benefit, but this would seem to provide adequate motivation in most cases...


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Mon Oct 19, 2009 5:52 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Geoff the Medio wrote:
Are you suggesting it should be beneficial to micromanage focus? If so, I'm inclined to disagree...
On the contrary, the reason I made this thread is because something clearly needs changing to prevent micromanagement being beneficial.

Perhaps my wording was a little bit unclear. What I meant to say was that if resource meter growth is dependent only on focus rather than max meter, this would not take into account possible changes to the max meter due to other effects. This could lead to a situation in which it was still beneficial to micromanage focus changes. Therefore, that option is inferior to the option of making meter growth a function of max meter, which would take into account other effects on max meter, and thus avoid such difficulties.

Quote:
Having resource meters grow each turn by the sum of:
+1 always
+1 if the secondary focus is set to the resource
+1 if the primary focus is balanced
+2 if the primary focus is set to the resource

might work to motivate setting focus to what is wanted long term, rather than micromanaging. There are probably still a few cases were micromanagement might be of some benefit, but this would seem to provide adequate motivation in most cases...
It would probably be better to have each meter grow by a fraction of the max meter value per turn. In your example, meter growth is still very disproportionate to max meter values, and I suspect I could still get a bonus from micromanaging anyway, though it would come at a slight cost to the resource to which I would eventually be changing focus overall. Making growth proportional to max meter should ensure that its impossible to get a net gain in overall resources through micromanagement (though I haven't actually done the relevant calculations; it seems to me that it would just be a proportional trade-off between the speed at which one meter increases and the speed at which another decreases, whereas with the numbers you propose, it would be disproportional, allowing some micromanagement advantage somewhere).

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Tue Oct 20, 2009 6:51 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
Making growth proportional to max meter should ensure that its impossible to get a net gain in overall resources through micromanagement (though I haven't actually done the relevant calculations; it seems to me that it would just be a proportional trade-off between the speed at which one meter increases and the speed at which another decreases, whereas with the numbers you propose, it would be disproportional, allowing some micromanagement advantage somewhere).

That doesn't solve the problem in general. The relative benefits of using intermediate focus or switching directly to the desired focus, if calculating overall benefit from total resource output, depends on the meter values. Based on some spreadsheeting, with +20% of max meter growth in current meter each turn:

If balanced focus gives 10 to two meters, and focused gives 20 to one meter and 0 to the other, then switching from one focus to another works best using an intermediate stage where both meters have max value 10 while the focus being switched two grows from 0 to 10 current value, and then the focus is switched to the desired resource after the desired resource. This works best because the loss of the 10 resource / turn from the non-desired meter is a large fraction of the final output of the desired meter, and the desired meter doesn't grow fast enough with a higher max to offset the 10 / turn from the already maxed undesired resource.

If focused give 40 to one meter and 0 to the other, and balanced still gives 10 to both, then it's better to switch directly to the desired focus, as the 10 resources / turn you'd get by staying at balanced isn't enough to offset the long-term benefit of increasing the desired meter faster by increasing the max value sooner.


Attachments:
File comment: spreadsheet simulations for described scenarios
FO_meter_simulations.zip [10.75 KiB]
Downloaded 29 times
Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Tue Oct 20, 2009 8:11 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Hmm. That's inconvenient.

I suppose that in general since the player is already exchanging one resource for another by changing focus, the gain in one resource that could be acquired through micromanagement wouldn't be worth the loss of the resource to which he was changing focus.

So I guess doing it this way:
Quote:
Having resource meters grow each turn by the sum of:
+1 always
+1 if the secondary focus is set to the resource
+1 if the primary focus is balanced
+2 if the primary focus is set to the resource

Would probably be just as effective as making it relate to max meter, and would probably be a simpler set of rules for the player to understand.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Tue Oct 20, 2009 9:04 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
I suppose that in general since the player is already exchanging one resource for another by changing focus, the gain in one resource that could be acquired through micromanagement wouldn't be worth the loss of the resource to which he was changing focus.

In some cases it would... Particularly with fixed +1 / turn meter growth, it's always beneficial to switch gradually using an intermediate focus. With the +% / turn meter growth, it's sometimes beneficial to switch gradually, and sometimes better to switch directly.

Quote:
So I guess [having resource meters grow each turn by an amount depending on focus w]ould probably be just as effective as making it relate to max meter, and would probably be a simpler set of rules for the player to understand.

As above, the max meter-fraction system sometimes works as we want, but not always. The simplicity and ease of understanding fixed +X / turn growth is an important point though.

Previously, the way meter growth worked was that the rate of increase each turn was related strongly to the difference between the current and max meter values. (It was also related to the construction meter, but that's not important for this discussion.) This was really complicated, so that knowing how fast meters were going to grow was pretty much impossible. It may or may not have help make it preferable to switch directly to the desired final focus... probably it would have help similar to +% in some cases where the specialized focus is much better than the balanced focus bonus.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Tue Oct 20, 2009 9:28 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Geoff the Medio wrote:
Bigjoe5 wrote:
I suppose that in general since the player is already exchanging one resource for another by changing focus, the gain in one resource that could be acquired through micromanagement wouldn't be worth the loss of the resource to which he was changing focus.

In some cases it would... Particularly with fixed +1 / turn meter growth, it's always beneficial to switch gradually using an intermediate focus. With the +% / turn meter growth, it's sometimes beneficial to switch gradually, and sometimes better to switch directly.
In terms of total resources yes, but since the player clearly wants more of one resource than another, having more total resources probably wouldn't be worth it if most of them aren't the resource he wants. But it probably isn't best to count on this as being sufficient for discouraging micomanagement.

Quote:
As above, the max meter-fraction system sometimes works as we want, but not always. The simplicity and ease of understanding fixed +X / turn growth is an important point though.

Previously, the way meter growth worked was that the rate of increase each turn was related strongly to the difference between the current and max meter values. (It was also related to the construction meter, but that's not important for this discussion.) This was really complicated, so that knowing how fast meters were going to grow was pretty much impossible. It may or may not have help make it preferable to switch directly to the desired final focus... probably it would have help similar to +% in some cases where the specialized focus is much better than the balanced focus bonus.
One idea might be to make the focus-dependant X per turn meter growth disproportional to the change in max meter caused by changing focus, so that changing focus directly would always be advantageous. If this turns out to make focused meters grow too quickly or unfocused meters grow too slowly (though presumably unfocused meters gaining bonuses should be very rare and small, and in that case, they probably should grow very slowly), we could make meter growth be a focus-dependent X per turn plus max meter over X. This shouldn't be too hard to understand; it doesn't involve current meter or the construction meter at all.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Tue Oct 20, 2009 10:00 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
Bigjoe5 wrote:
Geoff the Medio wrote:
Particularly with fixed +1 / turn meter growth, it's always beneficial to switch gradually using an intermediate focus. With the +% / turn meter growth, it's sometimes beneficial to switch gradually, and sometimes better to switch directly.
In terms of total resources yes, but since the player clearly wants more of one resource than another, having more total resources probably wouldn't be worth it if most of them aren't the resource he wants.

My point was mainly that with +1 / turn, it's beneficial to switch gradually regardless of how you judge benefit. You don't lose any of the desired resource by switching gradually, since the growth is +1 / turn no matter what the max is. Switching gradually means you lose less of the other resource while waiting for the meter to grow high enough that the higher max of specialized focus will let it grow further.

Quote:
One idea might be to make the focus-dependant X per turn meter growth disproportional to the change in max meter caused by changing focus, so that changing focus directly would always be advantageous. If this turns out to make focused meters grow too quickly or unfocused meters grow too slowly (though presumably unfocused meters gaining bonuses should be very rare and small, and in that case, they probably should grow very slowly)

If you can suggest a specific scaling and run some tests on making meter growth rates grow faster than proportionally with meter max values, and show that it wouldn't make large max meters grow too fast and/or small max meter grow too slowly, please do so.

Quote:
we could make meter growth be a focus-dependent X per turn plus max meter over X. This shouldn't be too hard to understand; it doesn't involve current meter or the construction meter at all.

That seems pretty complicated... It would seem to produce large growth rates for large or small X, but lower growth rates in between. (And in all cases very large growth rates, but that can be adjusted with a scaling factor). What's the reason for this formula?


Attachments:
File comment: Meter Growth Rate vs. "X"
MGR_vs_X.png
MGR_vs_X.png [ 8.81 KiB | Viewed 1075 times ]
Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Wed Oct 21, 2009 1:24 am 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
My apologies. I meant X + max meter / Y, where X is dependent on focus and Y is a constant.

I had no intention of making those two variables the same like that.

The reason I suggested that formula is that on its own, making meter growth only a function of max meter won't solve the micro problem, as your simulations indicate, and when growth is dependent only on focus, it would probably require growth to be very much out of proportion to the max meter bonus in the early game in order to adequately prevent micromanagement in the later game, when changing focus will cause a greater change to max meter values.

I'll probably do some calculations related to this tonight, but my first impression is that a hybrid of focus dependency and max meter dependency would be best for avoiding micromanagement and keeping meter growth reasonable.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Wed Oct 21, 2009 6:05 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Making meter growth a function of max meter is sufficient to prevent micromanagement.

Your simulations only took into account two resources and one focus, which does not translate accurately into a five-resource two-focus system. This is because when switching to balanced, much less of the original resource actually stays; more of the max meter value is transferred to the other resources, all of which must grow in order to become productive - that is to say, there is a greater immediate loss of resources due to changing focus to balanced in a five resource system.

Assuming that the most advantageous form of micromanaging focus changes would be to change foci in such a way as to give the smallest possible immediate loss in total resource production, the sequence would be as follows:

1. P - Original, S - Original

2. P - Original, S - Balanced

3. P - Balanced, S - Original

4. P - Balanced, S - Desired

5. P - Desired, S - Desired

The changes would occur on the turn that the desired resource is about to hit its max meter (i.e. it never actually hits the max meter until the very end, but it gets as close as possible in each phase). If this would not provide an advantage, I don't see how moving between phases faster would either.

In the case of Meter Growth = Max Meter / 5, switching gradually will fill with max meter in 18 turns, with a total resource production of 318.8. Switching directly gives a total resource production of 320 in the same period of time (assuming a population of 10).

The difference is even more pronounced in the case of Meter Growth = Max Meter / 10. At turn sixteen, the point at which a micromanager would only be switching between phases 3 and 4, he only has 229.2 units of resources, whereas the player who switched directly would already have 230.

Meter Growth = Max Meter / 10 seems like it would be a reasonable formula. Current meter still grows slowly enough to discourage regular meter changes (by turn 16, the player who didn't change focus at all has 320 units of resources: 90 more than the player who switched directly), but still quickly enough to avoid being annoying (the greatest amount of time it can take to fill the max meter is 10 turns).

In the later game, switching focus will provide an even greater difference between max meters, increasing the benefits of switching directly.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Wed Oct 21, 2009 7:22 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
How does adding other meters that produce some resources during the turns at balanced focus make using balanced focus less beneficial than a two meter simulation, and how does adding more meters increase the loss from changing focus?

In a two meter simulation, there is no benefit to balanced focus intermediate steps other than preserving the original meter while the desired meter grows. With additional meters, balanced focus should become better, not worse, as the extra meters grow during the balanced phase, producing "free" extra resources.

The only loss in output due to a switch should be from reduction in the original meter. I don't have your tests to examine, so I don't know what values you used for meter bonuses at the various focus settings, but in the actual game right now, as you note, "much less of the original resource actually stays" than in my simulations. This is (presumably?) not because of the other meters being present; it's (probably) due to the size of meter bonuses from various focus settings not matching the meter levels in my tests.

My tests still illustrate that for some max meter values, there could still be benefit to using balanced focus as an intermediate, though, which could matter in some in-game situations. If there are some techs or buildings or specials that give bonuses to various resources when at balanced focus added to FreeOrion, which there should be, the actual in-game focus bonuses might in some cases be of appropriate relative scale to make balanced focus useful.

Also, the most gradual transition is probably:
1. P - Original, S - Original
2. P - Original, S - Balanced
3. P - Balanced, S - Original
4. P - Balanced, S - Balanced
5. P - Balanced, S - Desired
6. P - Desired, S - Balanced
7. P - Desired, S - Desired


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Wed Oct 21, 2009 7:47 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Geoff the Medio wrote:
The only loss in output due to a switch should be from reduction in the original meter. I don't have your tests to examine, so I don't know what values you used for meter bonuses at the various focus settings, but in the actual game right now, as you note, "much less of the original resource actually stays" than in my simulations. This is (presumably?) not because of the other meters being present; it's (probably) due to the size of meter bonuses from various focus settings not matching the meter levels in my tests.
Assuming the only factor affecting max meter is focus, all the max meters put together will always add up to 20. This is (presumably) done deliberately so that when the meters are maxed out, there is always the same amount of total resources being produced regardless of focus (barring focus dependent bonuses, which further serve to discourage micromanagement). Since this is the case, one can think of the balanced focus as spreading the primary focus bonus over all five meters, i.e. Balanced Primary Focus Bonus = Single Resource Primary Focus Bonus / Total Resource Types. Since this is the case, having more resource types will always reduce the amount of each resource produced at the balanced setting. All my calculations were based on the current FO focus bonuses: 15 for Primary, 5 for secondary, 3 for Primary Balanced and 1 for Secondary Balanced.

When switching both foci from a specific resource to the balanced setting with only two resources, total max meter will remain constant and total current meter will be cut in half, because the original resource will have had its max meter cut in half and the desired resource would still need to grow. When switching both foci from a specific resource to the balanced setting with 5 resources, total max meter likewise remains constant, but current meter is reduced to one fifth. This is where the significant change in resource production comes from. (I'm not sure that having both primary and secondary focus makes a difference; I only did calculations for FOs current state - however, it is absolutely certain that having more resources and a corresponding decrease in balanced focus bonus makes a significant difference).

Quote:
My tests still illustrate that for some max meter values, there could still be benefit to using balanced focus as an intermediate, though, which could matter in some in-game situations. If there are some techs or buildings or specials that give bonuses to various resources when at balanced focus added to FreeOrion, which there should be, the actual in-game focus bonuses might in some cases be of appropriate relative scale to make balanced focus useful.
Any such bonuses would probably give a bonus to max meter when focusing on a specific resource of approximately the same proportions as the base difference in max meter for focus changes. Edit: Also, in a situation where bonuses to the balanced focus give an advantage to switching focus via the intermediate balanced stage, the player would also be getting more total resources per turn by just leaving his foci on balanced. This means that if the player values total resources more than the desired resource, he will just leave it on balanced, and if he values the desired resource more, he will set both foci directly to the desired resource to avoid the losses to that resource that occur due to gradually changing focus. /edit

Quote:
Also, the most gradual transition is probably:
1. P - Original, S - Original
2. P - Original, S - Balanced
3. P - Balanced, S - Original
4. P - Balanced, S - Balanced
5. P - Balanced, S - Desired
6. P - Desired, S - Balanced
7. P - Desired, S - Desired
You're right, I think; I doubt that those two steps would shift the balance in favour of micromanagement though, especially if growth = Max Meter / 10.

Edit: The correct sequence is

1. P - Original, S - Original
2. P - Original, S - Balanced
3. P - Original, S - Desired
4. P - Desired, S - Original
5. P - Desired, S - Balanced
6. P - Desired, S - Desired

By changing primary focus to balanced in step three, you're losing a lot of the original resource that is hardly made up for at all by next turns growth in the other resources.

Using current focus bonuses and meter growth of max meter / 10, your step three will give a total resource production on the next turn of 13.2, whereas switching secondary focus to the desired resource will give 16.5: 15 of the original and 1.5 of the desired resource.

I doubt the difference will be significant, but I'll do the calculations using those steps, to make sure. /edit

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Last edited by Bigjoe5 on Wed Oct 21, 2009 9:13 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Wed Oct 21, 2009 8:58 pm 
Offline
Space Kraken

Joined: Sun Sep 27, 2009 10:51 am
Posts: 162
Location: Moskow, RU
i'm sorry to post i here, but i have one question: how meter value correspond with resource value? if there are such dependence. and if there isn't - how can i find out how much of each resource planet can produce?


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Wed Oct 21, 2009 9:15 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
Resource production = Current Population * Current Resource Meter / 10

i.e. With a population of 10, resource production = current meter.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


Top
 Profile  
 
 Post subject: Re: Meter Growth
PostPosted: Wed Oct 21, 2009 11:13 pm 
Offline
Designer and Programmer
User avatar

Joined: Tue Aug 14, 2007 6:33 pm
Posts: 1772
Location: Orion
I found a glaring error in my calculations related to the fact that 16 * 10 is not equal to 120... :roll:

Anyway, using the recent series of steps I posted, I calculate that micromanagement gives a bonus of 23.6 total resources over a span of 28 turns (with Growth = Max Meter / 10). That is to say, changing focus gradually will take 28 turns, cost 66.4 total resources, and give much less of the desired resource. Changing focus directly takes 10 turns and costs 90 total resources, but gives much more of the desired resource. This is probably sufficient to discourage micromanagement, since the desired resource will be considered more valuable, and you get more of it and you get it a lot faster. What course of action do you suggest?

Edit: Also, giving a bonus of +1 growth to current meter for primary focus on the resource makes it more profitable to switch directly, but this wouldn't necessarily apply at higher max meter values.

_________________
Warning: Antarans in dimensional portal are closer than they appear.


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest


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 © 2000, 2002, 2005, 2007 phpBB Group