The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

AI::Genetic::Individual - Package for AI::Genetic Individuals.

SYNOPSIS

See AI::Genetic.

DESCRIPTION

This class implements an AI::Genetic::Individual object. Those are used by the AI::Genetic (GA) module. They are the "organisms", if you will, that the GA module evolves. They are accessible via the get_fittest() method defined in the AI::Genetic class. Please consult AI::Genetic.

CLASS METHODS

The following are the public methods that can be used.

$ind->score()

This returns the current fitness score of the individual.

$ind->genes()

This returns the list of genes for the individual.

For LIST individuals (see "GENES" in AI::Genetic), it returns a list of the ON genes of the individual.

For LOL individuals (see "GENES" in AI::Genetic), it returns an anonymous hash. The keys of this hash are the the genes, and the values are the values of the genes. At this point, AI::Genetic passes the same reference that it is storing inside of it. So, if you modify this hash, it will affect the actual individual. Please be careful.

AUTHOR

Ala Qumsieh aqumsieh@cpan.org

COPYRIGHTS

This module is distributed under the same terms as Perl itself.