Fix Time Scaling Factor in Population Growth Code#1557
Open
g4nd41ph wants to merge 1 commit intopmotschmann:masterfrom
Open
Fix Time Scaling Factor in Population Growth Code#1557g4nd41ph wants to merge 1 commit intopmotschmann:masterfrom
g4nd41ph wants to merge 1 commit intopmotschmann:masterfrom
Conversation
It looks like there was a factor added to the population growth mechanics that was meant to scale the growth trate with changs in time_multiplier to keep the growth rate consistent in terms of growth per second. Unfortunately, the factor chosen does not do this. While it does scale population growth rate per check down as game speed increases, it does not do so at the correct rate to keep growth rates constant in terms of average propulation gained per second. The population growth is implemented as a set of checks over a period of time that are either a success (a pop is added) or a failure (a pop is not added) the probability of a success is not exactly fixed because it depends on the current population, but can be considered close enough to fixed with a small number of trials. This means that it can be modeled as a binomial distribution. Any binomial distribution is characterized by the probability of success p and the number of trials n. The mean output of the distribution is p * n. If we wish to keep the mean constant while varying the number of trials n (meaning that the game is running different numbers of checks as the game speed changes), we must set some value x such that p * 1 (The average growth at one trial per second) = (p/x)*n (The average growth at n trials per second). In words, we must scale down the probability of success p by some factor x when we are doing n checks in a second. Solving the abolve equation for x in terms of n and p, we get that x=n. Therefore, the correct factor to multiply the upper bound by to maintain the same growth rate as the time multiplier chagnes is to multiply it by the time multiplier value itself. Note that this change will cut population growth rates by a factor for more than two, because the current factor is roughly 1.8 with the current time multiplier setting of 4. But considering that maintaining a full population in Evolve has never been a serious difficulty, this is not likely to cause major issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It looks like there was a factor added to the population growth mechanics that was meant to scale the growth trate with changs in time_multiplier to keep the growth rate consistent in terms of growth per second.
Unfortunately, the factor chosen does not do this. While it does scale population growth rate per check down as game speed increases, it does not do so at the correct rate to keep growth rates constant in terms of average propulation gained per second.
The population growth is implemented as a set of checks over a period of time that are either a success (a pop is added) or a failure (a pop is not added) the probability of a success is not exactly fixed because it depends on the current population, but can be considered close enough to fixed with a small number of trials. This means that it can be modeled as a binomial distribution.
Any binomial distribution is characterized by the probability of success p and the number of trials n. The mean output of the distribution is p * n. If we wish to keep the mean constant while varying the number of trials n (meaning that the game is running different numbers of checks as the game speed changes), we must set some value x such that p * 1 (The average growth at one trial per second) = (p/x)*n (The average growth at n trials per second).
In words, we must scale down the probability of success p by some factor x when we are doing n checks in a second. Solving the abolve equation for x in terms of n and p, we get that x=n.
Therefore, the correct factor to multiply the upper bound by to maintain the same growth rate as the time multiplier chagnes is to multiply it by the time multiplier value itself.
Note that this change will cut population growth rates by a factor for more than two, because the current factor is roughly 1.8 with the current time multiplier setting of 4. But considering that maintaining a full population in Evolve has never been a serious difficulty, this is not likely to cause major issues.