Algorithm-Evolutionary

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	* lib/Algorithm/Evolutionary/Op/VectorCrossover.pm (apply): Fixed
	bug: the incoming parent was modified along with the offspring. 

2012-07-10  Juan J. Merelo Guervós  <jjmerelo@gmail.com>

	* MANIFEST: Eliminating pod.t also in production code.

2012-07-09  Juan J. Merelo Guervós  <jjmerelo@gmail.com>

	* MANIFEST: Eliminated pod-coverage.t, which is not needed for
	production and causes errors in some systems. 

2012-07-08  Juan J. Merelo Guervós  <jjmerelo@gmail.com>

	* MANIFEST: Adding missing test files

	* lib/Algorithm/Evolutionary.pm: Starting a maintenance version,
	which will include the bugs fixed since last summer. 
	Since there's a bug fix, I think I'm going for full 0.78...

2012-05-21  Juan J. Merelo Guervós  <jjmerelo@gmail.com>

Changes  view on Meta::CPAN

	* lib/Algorithm/Evolutionary/Wheel.pm (spin): Changed spin
	implementation to make it faster and more efficient. It was
	sucking time out of mastermind EAs

2010-09-25  Juan J. Merelo  <jmerelo@sheldon>

	* lib/Algorithm/Evolutionary/Fitness/Rastrigin.pm (Rastrigin):
	Fixed formula

	* lib/Algorithm/Evolutionary.pm: Starting 0.74_1 with cosmetic
	changes and an attempt to fix sporadic test errors.  

2010-09-24  Juan Julian Merelo Guervos  <jmerelo@usuario-desktop>

	* lib/Algorithm/Evolutionary/Fitness/Rastrigin.pm (Rastrigin): Added first floating-point fitness func.

	* lib/Algorithm/Evolutionary/Utils.pm (random_number_array): Added this function

	* lib/Algorithm/Evolutionary/Individual/BitString.pm (from_string): Added from_string ctor

	* lib/Algorithm/Evolutionary/Individual/String.pm (from_string): Changed name and slightly modified

Changes  view on Meta::CPAN

	Starting documentation revision for developer releases.

	* lib/Algorithm/Evolutionary/Op/EDA_step.pm (apply): Added new
	module implementing estimation of distribution algorithms; added
	test and example in /examples

2009-07-30  Juan Julian Merelo Guervos  <jmerelo@geneura.ugr.es>

	* lib/Algorithm/Evolutionary.pm: Moved a GUI example to the
	scripts dir so that it's installed automatically. Expanded
	documentation to reflect that. Fixed also error (population
	explosion) in Easy_MO.

2009-07-28  Juan Julian Merelo Guervos  <jmerelo@geneura.ugr.es>

	* lib/Algorithm/Evolutionary.pm: Starting 0.70_1 with the
	classical documentation fixes. 

	* MANIFEST: 0.70 fixes a bug in Easy.pm and those derived from it:
	last population element was not eliminated. An animated GIF output
	has been added, and a bug in Makefile.PL that caused problems with

Changes  view on Meta::CPAN


	* lib/Algorithm/Evolutionary.pm (import): 0.69_1 fixed some
	problems with missing prerrequisites in the test programs, and
	some copy/paste stuff left from creating new modules. 0.70 starts
	with the intention of finally having a GUI.

2009-07-24    <jmerelo@localhost.localdomain>

	* lib/Algorithm/Evolutionary.pm: 0.68 was shortlived, but 0.69
	more or less the same. 0.69 included missing file and fixed some
	docs errors; 0.69_1 starts with the same objective, let's see how
	it ends.

2009-07-24  Juan Julian Merelo Guervos  <jmerelo@geneura.ugr.es>

	* TODO: 0.68 ends with several new test functions added (Trap,
	ECC), and finally a multiobjective evolutionary algorithm, not
	very good, but in working order.

2009-03-29    <jmerelo@localhost.localdomain>

lib/Algorithm/Evolutionary/Fitness/ECC.pm  view on Meta::CPAN

    my $min_distance = 1;
    my $p_peaks = Algorithm::Evolutionary::Fitness::ECC->new( $number_of_codewords, $min_distance );

=head1 DESCRIPTION

Extracted from article "Effects of scale-free and small-world topologies on binary coded self-adaptive CEA", by Giacobini et al [Ga]. Quoting:
"                                                    The ECC problem was presented in
[MW]. We will consider a three-tuple (n, M, d), where n is the length of each codeword
(number of bits), M is the number of codewords, and d is the minimum Hamming
distance between any pair of codewords. Our objective will be to find a code which
has a value for d as large as possible (reflecting greater tolerance to noise and errors),
given previously fixed values for n and M . The problem we have studied is a simplified
version of that in [MW]. In our case we search half of the codewords (M/2) that will
compose the code, and the other half is made up by the complement of the codewords
computed by the algorithm"

[Ga] Mario Giacobini, Mike Preuss, Marco Tomassini: Effects of Scale-Free and Small-World Topologies on Binary Coded Self-adaptive CEA. EvoCOP 2006: 86-98.

[MW] F. J. MacWilliams and N. J. A. Sloane. The Theory of Error-Correcting Codes. North-
    Holland, Amsterdam, 1977.

lib/Algorithm/Evolutionary/Individual/Base.pm  view on Meta::CPAN

on to the object of the class when it iss initialized.

=cut

sub new {
  my $class = shift;
  if ( $class !~ /Algorithm::Evolutionary/ ) {
      $class = "Algorithm::Evolutionary::Individual::$class";
  }
  my $options = shift;
  my $self = { _fitness => undef }; # Avoid error
  bless $self, $class; # And bless it

  #If the class is not loaded, we load it. 
  if ( !$INC{"$class\.pm"} ) {
      eval "require $class" || croak "Can't find $class Module";
  }
  if ( $options ) {
      $self->set( $options );
  }

lib/Algorithm/Evolutionary/Op/CX.pm  view on Meta::CPAN

use strict;
use warnings;

use lib qw( ../../../../lib ); # mainly to avoid syntax errors when saving

=head1 NAME

Algorithm::Evolutionary::Op::CX (Cycle crossover) - 2-point crossover operator; Builds offspring in such a way
    that each gene comes from one of the parents. Preserves the absolute position of the elements 
    in the parent sequence

=head1 SYNOPSIS

  my $op4 = new Algorithm::Evolutionary::Op::CX 3;

lib/Algorithm/Evolutionary/Op/IncMutation.pm  view on Meta::CPAN

Applies mutation operator to a "Chromosome", a string, really. Can be
applied only to I<victims> with the C<_str> instance variable; but
it checks before application that both operands are of the required
type. The chosen character is changed to the next or previous in
the array of chars used for coding the the string
    my $strChrom = new Algorithm::Evolutionary::Individual::String ['a','c','g','t'] 10;
    my $xmen = new Algorithm::Evolutionary::Op::IncMutation;
    $xmen->apply( $strChrom ) # will change 'acgt' into 'aagt' or
			      # 'aggt', for instance

Issues an error if there is no C<_chars> array, which is needed for computing the next.

=cut

sub apply ($;$){
  my $self = shift;
  my $arg = shift || croak "No victim here!";
  my $victim = clone( $arg );
  croak "Incorrect type ".(ref $victim) if ! $self->check( $victim );
  my $rnd = int (rand( length( $victim->{_str} ) ));
  my $char = $victim->Atom( $rnd );

lib/Algorithm/Evolutionary/Op/SimulatedAnnealing.pm  view on Meta::CPAN

use strict;
use warnings;

use lib qw( ../../../../lib ); # mainly to avoid syntax errors when saving

=head1 NAME

SimulatedAnnealing - An operator that performs the simulated annealing algorithm
                          on an individual, using an external freezing schedule

=head1 SYNOPSIS

  #Define an algorithm
  my $m  = new Algorithm::Evolutionary::Op::BitFlip; #Changes a single bit



( run in 0.391 second using v1.01-cache-2.11-cpan-65fba6d93b7 )