Algorithm::Evolutionary::Fitness::ONEMAX - Fitness function for the ONEMAX or count-ones problem
my $onemax = new Algorithm::Evolutionary::Fitness::Knapsack; my $string = "1010101010101010"; print $onemax->apply($string);
ONEMAX is the classical count-ones optimization function. Fast to implement, and good for early prototyping of new evolutionary algorithms.
Computes the number of ones, using base class cache
This file is released under the GPL. See the LICENSE file included in this distribution, or go to http://www.fsf.org/licenses/gpl.txt
To install Algorithm::Evolutionary::Fitness, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Algorithm::Evolutionary::Fitness
CPAN shell
perl -MCPAN -e shell install Algorithm::Evolutionary::Fitness
For more information on module installation, please visit the detailed CPAN module installation guide.