AI::Genetic::Individual - Package for AI::Genetic Individuals.
See AI::Genetic.
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.
get_fittest()
The following are the public methods that can be used.
This returns the current fitness score of the individual.
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.
Ala Qumsieh aqumsieh@cpan.org
This module is distributed under the same terms as Perl itself.
To install AI::Genetic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AI::Genetic
CPAN shell
perl -MCPAN -e shell install AI::Genetic
For more information on module installation, please visit the detailed CPAN module installation guide.