public class TNichedMutation extends java.lang.Object implements TernaryMutation
This class applies the niched mutation. So, the changes made in the classifier cannot result in another classifier that does not match with the environment (we can change a don't care for the value of the parent, or a value for a don't care value, but, for example, we would never changer a '0' for a '1').
Constructor and Description |
---|
TNichedMutation() |
Modifier and Type | Method and Description |
---|---|
char |
mutate(char pos,
char currentState)
Mutates the character.
|
public char mutate(char pos, char currentState)
Mutates the character.
mutate
in interface TernaryMutation
pos
- is the value of the classifier allele.
currentState
- is the value of that classifier position in the
environment. It in needed for the niched mutation.