AI-Genetic

 view release on metacpan or  search on metacpan

Genetic.pm  view on Meta::CPAN


In this step, each individual is given the chance to mutate
based on the mutation probability specified. If an individual
is to mutate, each of its genes is given the chance to randomly
switch its value to some other state.

=back

=head1 CLASS METHODS

Here are the public methods.

=over 4

=item I<$ga>-E<gt>B<new>(I<options>)

This is the constructor. It accepts options in the form of
hash-value pairs. These are:

=over 8

Genetic/Individual.pm  view on Meta::CPAN

It provides basic methods required by AI::Genetic for correct evolution.
Furthermore, it can be very easily used as a base class for additional
types of individuals. AI::Genetic comes with three individual types that
inherit from this class. These are I<IndBitVector>, I<IndListVector>,
and I<IndRangeVector>.

See L</CREATING YOUR OWN INDIVIDUAL CLASS> for more details.

=head1 CLASS METHODS

The following methods are accessible publicly. They are not meant to
be over-ridden:

=over

=item I<$individual>                -E<gt>B<new(options)>

=item I<AI::Genetic::IndBitVector>  -E<gt>B<new(options)>

=item I<AI::Genetic::IndListVector> -E<gt>B<new(options)>

README  view on Meta::CPAN

        contains genes common to both parents. New individuals are injected
        into the current population.

    3. Mutation
        In this step, each individual is given the chance to mutate based on
        the mutation probability specified. If an individual is to mutate,
        each of its genes is given the chance to randomly switch its value
        to some other state.

CLASS METHODS
    Here are the public methods.

    *$ga*->new(*options*)
        This is the constructor. It accepts options in the form of
        hash-value pairs. These are:

        -population
                This defines the size of the population, i.e. how many
                individuals to simultaneously exist at each generation.
                Defaults to 100.



( run in 0.548 second using v1.01-cache-2.11-cpan-64827b87656 )