org.artoflife.gp.genome
Class ReplaceParameterMutator

java.lang.Object
  |
  +--org.artoflife.gp.genome.ReplaceParameterMutator
All Implemented Interfaces:
GpMutator

public class ReplaceParameterMutator
extends java.lang.Object
implements GpMutator

Mutates a FunctionGene by replacing one of its parameters with a new random parameter gene.

Author:
Steve Meyfroidt

Constructor Summary
ReplaceParameterMutator()
           
 
Method Summary
 void mutate(java.lang.String geneSelectionId, GpTreeNode gene)
          Replace a parameter of this gene with a random one from the {GeneFactory}, using a configured probability of choosing from only the terminals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplaceParameterMutator

public ReplaceParameterMutator()
Method Detail

mutate

public void mutate(java.lang.String geneSelectionId,
                   GpTreeNode gene)
Replace a parameter of this gene with a random one from the {GeneFactory}, using a configured probability of choosing from only the terminals.

Specified by:
mutate in interface GpMutator
Parameters:
gene - the non-null gene to mutate
geneSelectionId - ID of allowed genes that can be created for this mutation

artoflife pre0.1.0-dev

Copyright © 2002 the Art Of Life team. All Rights Reserved.