Class StringReproduce

  • All Implemented Interfaces:
    Reproduce<Organism<java.lang.String>>

    public class StringReproduce
    extends java.lang.Object
    implements Reproduce<Organism<java.lang.String>>
    A class that contains the reproduction implementation for a string organism The a StringReproduce object should be used in conjunction with some sort of Organism class to create a working simulation involving Strings. The StringReproduce class is an implementation of the Reproduce interface, which means that it allows for the creation of a child organism with the input of two parent organisms. In the case of the StringReproduction, this means sequentially randomly selecting a character from either parent (given a 50/50 probability for each), and adding that character to the new child organism. The reproduction also includes a chance for Mutation, allowing for traits that were not found in the parent population or in an organisms specific parents to be evident in that organism.
    See Also:
    Reproduce
    • Constructor Detail

      • StringReproduce

        public StringReproduce()
    • Method Detail

      • setMutationRate

        public void setMutationRate​(double rate)