Package Bio :: Package GA :: Package Mutation :: Module General :: Class SafeFitnessMutation
[show private | hide private]
[frames | no frames]

Class SafeFitnessMutation


Perform mutations, but do not allow decreases in organism fitness.

This doesn't actually do any mutation work, but just checks that newly create organisms do not have lower fitnesses.
Method Summary
  __init__(self, actual_mutation, accept_less)
Initialize to do safe mutations
  mutate(self, org)
Perform safe mutation of the specified organism.

Method Details

__init__(self, actual_mutation, accept_less=0.0)
(Constructor)

Initialize to do safe mutations

Arguments:

o actual_mutation - A Mutation class which actually implements mutation. functionality.

o accept_less - A probability to accept mutations which generate lower fitness. This allows you to accept some crossovers which reduce fitness, but not all of them.

mutate(self, org)

Perform safe mutation of the specified organism.

Generated by Epydoc 2.1 on Thu Jun 30 22:06:00 2005 http://epydoc.sf.net