Rutger Vos
and 1 contributors

NAME

Algorithm::Genetic::Diploid::Gene - a gene with an expressible function

METHODS

new

Constructor takes named arguments, sets a default value of 1 for the weight

function

The gene function is a subroutine ref that results in a gene product (representing some component of fitness) based on environmental input

express

A gene is expressed based on environmental input, upon which a gene product is returned

mutate

Re-weights the gene in proportion to the mutation rate

weight

Getter and setter for the weight of this gene product in the total phenotype