Simulating Natural selection through a population of predators and prey
Note - The frequency distribution between the mean and the variation is given by a Gaussian distribution
Note: Where a
float
is given, it means any decimal numer,decimal
means any number between 0 and 1
length
- int - The number of 'turns' the sim hasbreedTurns
- int - After how many turns the animals breed
doChange
- boolean Whether or not to change a value after n turnschangeTurns
- int - After how many turns does the value changekeyCategory
- string - The category of the key of the value to be changed (food
,prey
, etc)key
- string - The specific key of the value to be changedchangeAmount
- any - Number added to the value every change turn
boardSizeX
- int - The width of the board the animals inhabitboardSizeY
- int - The height of the boardfullThreshold
- decimal - The percentage of the board that needs to have be occupied before the sim auto ends
foodCount
- int - The number of food sources that spawnmeanEnergy
- decimal - The mean amount of energy provided by a food sourcesenergyVariation
- decimal - The variation of amount of energy providedspawnThreshold
- decimal The number multiplied by the total population to get when the food sources need replenishing
Both health and energy are values between 0 and 1, with 1 being full and 0 being empty (duh)
preyCount
- int - The number of prey that spawn at the startinitEnergy
- decimal - The amount of energy prey will spawn withmeanSpeed
- float - The mean of the speed value a prey will havespeedVariation
- float How much the speed value will be varieddayCost
- float - How strongly prey is penalized at the start of each daymeanSensingRange
- float - The mean range an animal can sense (see)sensingRangeVariation
- float - The variation of the sensing rangebreedThreshold
- decimal - The mininimum amount of energy for a prey to breed at the end of a turn
predatorCount
- int - The number of predators that spawn at the startinitEnergy
- decimal - The amount of energy prey will spawn withmeanSpeed
- float - The mean of the speed value a predator will have at the startspeedVariation
- float - How much the speed value will be varieddayCost
- float - How strongly prey is penalized at the start of each daymeanSensingRange
- float - The mean range an animal can sense (see)sensingRangeVariation
- float - The variation of the sensing rangebreedThreshold
- decimal - The mininimum amount of energy for a prey to breed at the end of a turn
- Efficiency = log(speed + 1) / 20
- Energy Cost from movement = distance * (3 - Efficiency)
Column Letter | Column A | Column B | Column C | Column D | Column E |
---|---|---|---|---|---|
Description | Turn Number | Total Prey Population | Average Speed | Average Sensing Range | Number of new prey born THAT turn |