Algorithm::Evolutionary::Fitness::P_Peaks - P Peaks problem generator
my $number_of_peaks = 100; my $number_of_bits = 32; my $p_peaks = Algorithm::Evolutionary::Fitness::P_Peaks->new( $number_of_peaks, $number_of_bits );
P_Peaks fitness function; optimizes the distance to the closest in a series of peaks. The P-Peaks problem was proposed by Kennedy and Spears in
@conference{kennedy1998matching, title={{Matching algorithms to problems: an experimental test of the particle swarm and some genetic algorithms on the multimodal problem generator}}, author={Kennedy, J. and Spears, W.M.}, booktitle={Evolutionary Computation Proceedings, 1998. IEEE World Congress on Computational Intelligence., The 1998 IEEE International Conference on}, pages={78--83}, isbn={0780348699}, year={1998}, organization={IEEE} }
And the optimum is 1.0. By default, result is cached, so be careful when working with long strings and/or big populations
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 chromosome. Intended for internal use.
Returns the distance to the closest bitstring
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, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Algorithm::Evolutionary
CPAN shell
perl -MCPAN -e shell install Algorithm::Evolutionary
For more information on module installation, please visit the detailed CPAN module installation guide.