Fitness: Fitness: F(X)

Description Usage Arguments Value Examples

View source: R/Fitness.R

Description

Given an organism ran in the Game of Life. Evaluate it's fitness based on a fitness-function.

Usage

1
Fitness(inOrg, fun = "max_x")

Arguments

inOrg

The input organism-object

fun

A fitness-evaluation function to be applied to each organism

Value

fit A numeric vector of the fitness of each organism

Examples

1
2
3
4
organism_fitness <- Fitness(glider, "max_x")

# There is a wrapper function to apply to `populations` directly
gliders_G0@fitness <- popFitness(gliders_G0)

fransilvion/REvolution documentation built on Nov. 4, 2019, 12:57 p.m.