GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ALGORITHM::EVOLUTIONARY::OP::EDA_STEP (3)

.ds Aq ’

NAME

Algorithm::Evolutionary::Op::EDA_step - Single step for a Estimation of Distribution Algorithm

CONTENTS

SYNOPSIS



    use Algorithm::Evolutionary qw( Individual::BitString
                                Op::Mutation Op::Crossover
                                Op::RouletteWheel
                                Fitness::ONEMAX Op::EDA_step
                                Op::Replace_Worst);

    use Algorithm::Evolutionary::Utils qw(average);

    my $onemax = new Algorithm::Evolutionary::Fitness::ONEMAX;

    my @pop;
    my $number_of_bits = 20;
    my $population_size = 20;
    my $replacement_rate = 0.5;
    for ( 1..$population_size ) {
      my $indi = new Algorithm::Evolutionary::Individual::BitString $number_of_bits ; #Creates random individual
      $indi->evaluate( $onemax );
      push( @pop, $indi );
    }

    my $selector = new Algorithm::Evolutionary::Op::RouletteWheel $population_size; #One of the possible selectors

    my $generation =
      new Algorithm::Evolutionary::Op::EDA_step( $onemax, $selector, $replacement_rate );

    my @sortPop = sort { $b->Fitness() <=> $a->Fitness() } @pop;
    my $bestIndi = $sortPop[0];
    my $previous_average = average( \@sortPop );
    $generation->apply( \@sortPop );



Base Class

Algorithm::Evolutionary::Op::Base

DESCRIPTION

Estimation of Distribution Algorithms shun operators and instead try to model the distribution of good solutions in the population. This version corresponds to the most basic one.

METHODS

new( CW$evaluation_function, CW$replacement_rate )

Creates an algorithm, with no defaults except for the default replacement operator (defaults to Algorithm::Evolutionary::Op::ReplaceWorst)

set( CW$ref_to_params_hash, CW$ref_to_code_hash, CW$ref_to_operators_hash )

Sets the instance variables. Takes a ref-to-hash as input. Not intended to be used from outside the class

reset( CW$population )

Start all over again by resetting the population

apply( CW$population )

Applies the algorithm to the population, which should have been evaluated first; checks that it receives a ref-to-array as input, croaks if it does not. Returns a sorted, culled, evaluated population for next generation.

SEE ALSO

More or less in the same ballpark, alternatives to this one
o Algorithm::Evolutionary::Op::GeneralGeneration

Copyright



  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

  CVS Info: $Date: 2009/09/30 16:01:28 $
  $Header: /media/Backup/Repos/opeal/opeal/Algorithm-Evolutionary/lib/Algorithm/Evolutionary/Op/EDA_step.pm,v 1.5 2009/09/30 16:01:28 jmerelo Exp $
  $Author: jmerelo $
  $Revision: 1.5 $



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 ALGORITHM::EVOLUTIONARY::OP::EDA_STEP (3) 2014-10-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.