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


NAME

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


SYNOPSIS

See the AI::Genetic manpage.


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 the AI::Genetic manpage.


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 the AI::Genetic manpage), it returns a list of the ON genes of the individual.

For LOL individuals (see GENES in the AI::Genetic manpage), 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.

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