Closed TetoTheSquirrelFox closed 4 years ago
Don’t do screenshots of text. How do you expect anybody to copy and paste the text? Post the text itself.
I did that because it's easier to read the differences, as the correction can be made in less than 1 minute if I'm correct ?
OK, the commit, properly formatted :
def generate_parameter(val, random_value, preserve_phenotype=False):
if preserve_phenotype:
if val > 0.5:
if val > 0.8:
new_value = 0.8 + 0.2*random.random()
else:
new_value = 0.5+random.random()*random_value
else:
if val < 0.2:
new_value = 0.2*random.random()
else:
new_value = 0.5-random.random()*random_value
else:
r = random.random()
if r > 0.5:
new_value = min(1.0, 0.5+r*random_value)
else:
new_value = max(0.0, 0.5-r*random_value)
return new_value
Sorry for the delay.
Will change this code soon :)
Describe the bug In the function generate_parameter(val, random_value, preserve_phenotype=False)
I think that it is written wrong. We have this :![image](https://user-images.githubusercontent.com/59537161/71846433-d4352080-30ca-11ea-8392-7c9d1a7a3f14.png)
I think that this is more correct (?):![image](https://user-images.githubusercontent.com/59537161/71846514-0e9ebd80-30cb-11ea-8422-d1fd77b7fda3.png)