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
Genetic::OpCrossover(3) User Contributed Perl Documentation Genetic::OpCrossover(3)

AI::Genetic::OpCrossover - A class that implements various crossover operators.

See AI::Genetic.

This package implements a few crossover mechanisms that can be used in user-defined strategies. The methods in this class are to be called as static class methods, rather than instance methods, which means you must call them as such:

  AI::Genetic::OpCrossover::MethodName(arguments)

The following crossover operators are defined:
Single Point
In single point crossover, a point is selected along the choromosomes of both parents. The chromosomes are then split at that point, and the head of one parent chromosome is joined with the tail of the other and vice versa, creating two child chromosomes. The following method is defined:
vectorSinglePoint(Xprob, parent1, parent2)
The first argument is the crossover rate. The second and third arguments are anonymous lists that define the genes of the parents (not AI::Genetic::Individual objects, but the return value of the genes() method in scalar context). If mating occurs, two anonymous lists of genes are returned corresponding to the two new children. If no mating occurs, 0 is returned.
Two Point
In two point crossover, two points are selected along the choromosomes of both parents. The chromosomes are then cut at those points, and the middle parts are swapped, creating two child chromosomes. The following method is defined:
vectorTwoPoint(Xprob, parent1, parent2)
The first argument is the crossover rate. The second and third arguments are anonymous lists that define the genes of the parents (not AI::Genetic::Individual objects, but the return value of the genes() method in scalar context). If mating occurs, two anonymous lists of genes are returned corresponding to the two new children. If no mating occurs, 0 is returned.
Uniform
In uniform crossover, two child chromosomes are created by looking at each gene in both parents, and randomly selecting which one to go with each child. The following method is defined:
vectorUniform(Xprob, parent1, parent2)
The first argument is the crossover rate. The second and third arguments are anonymous lists that define the genes of the parents (not AI::Genetic::Individual objects, but the return value of the genes() method in scalar context). If mating occurs, two anonymous lists of genes are returned corresponding to the two new children. If no mating occurs, 0 is returned.

Written by Ala Qumsieh aqumsieh@cpan.org.

(c) 2003,2004 Ala Qumsieh. All rights reserved. This module is distributed under the same terms as Perl itself.
2005-03-04 perl v5.32.1

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

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