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::RUN (3)

.ds Aq ’

NAME

Algorithm::Evolutionary::Run - Class for setting up an experiment with algorithms and population

CONTENTS

SYNOPSIS



  use Algorithm::Evolutionary::Run;

  my $algorithm = new Algorithm::Evolutionary::Run conf.yaml;
  #or
  my $conf = {
    fitness => {
      class => MMDP
    },
    crossover => {
      priority => 3,
      points => 2
     },
    max_generations => 1000,
    mutation => {
      priority => 2,
      rate => 0.1
    },
    length => 120,
    max_fitness => 20,
    pop_size => 1024,
    selection_rate => 0.1
  };

  my $algorithm = new Algorithm::Evolutionary::Run $conf;

  #Run it to the end
  $algorithm->run();
 
  #Print results
  $algorithm->results();
 
  #A single step
  $algorithm->step();



DESCRIPTION

This is a no-fuss class to have everything needed to run an algorithm
in a single place, although for the time being it’s reduced to
fitness functions in the A::E::F namespace, and binary
strings. Mostly for demo purposes, but can be an example of class
for other stuff.

METHODS

new( CW$algorithm_description )

Creates the whole stuff needed to run an algorithm. Can be called from a hash with t
options, as per the example. All of them are compulsory. See also the examples subdir for examples of the YAML conf file.

population_size( CW$new_size )

Resets the population size to the $new_size. It does not do anything to the actual population, just resests the number. You should do a reset_population afterwards.

reset_population()

Resets population, creating a new one; resets fitness counter to 0

step()

Runs a single step of the algorithm, that is, a single generation

run()

Applies the different operators in the order that they appear; returns the population as a ref-to-array.

random_member()

Returns a random guy from the population

results()

Returns results in a hash that contains the best, total time so far
and the number of evaluations.

evaluated_population()

Returns the portion of population that has been evaluated (all but the new ones)

compute_average_distance( CW$individual )

Computes the average hamming distance to the population

compute_min_distance( CW$individual )

Computes the average hamming distance to the population

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



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


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

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