Algorithm::Evolutionary::Fitness::wP_Peaks - wP Peaks problem generator - weighted version of P_Peaks
my $number_of_bits = 32; my @weights = (1); for (my $i = 0; $i < 99; $i ++ ) { push @weights, 0.99; } my $wp_peaks = Algorithm::Evolutionary::Fitness::wP_Peaks->new( $number_of_bits, @weights ); #Number of peaks = scalar @weights # Or use an alternative ctor my $descriptor = { number_of_peaks => 100, weight => 0.99 }; my $wp_peaks = Algorithm::Evolutionary::Fitness::wP_Peaks->new( $number_of_bits, $descriptor)
wP-Peaks fitness function, weighted version of the P-Peaks fitness function, which has now a single peak
or new( $number_of_bits, $hash_with_number_of_peaks_and_weight )
Creates a new instance of the problem, with the said number of bits and peaks
Returns random string in the same style than the peaks. Useful for testing
Applies the instantiated problem to a string
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.