Home > Mobile >  Function that maps low values to [0,1]
Function that maps low values to [0,1]

Time:01-17

I'm currently working on a predator-prey simulation and have two codependent parameters, the attack rate, and the survival rate.

The attack rate is mutated within the simulation and determines the survival rate in the following way:

A high attack rate implies a more risky form of hunting, resulting in a lower survival rate.

The attack rate can be within 0 and 1, but mostly assumes only low values <0.06. The survival rate is also within 0 and 1 and can use the whole range.

Ultimately, I'm searching for a function that maps the attack rate to a sensible survival rate. My current function is very made up: (1-log2(attack rate 1))**10)

current function

CodePudding user response:

After some more research, I found a more fitting function, that looks less constructed and has less parameters:

exp(-x*attack_rate)

To map lower values onto the whole range of [0,1] the x must be in the range of 10.

  • Related