Convenience function that combines parent selection, replication, and mutation.
Character vector of symbolic molecular sequences.
Number of molecules in the next generation.
Character vector used to build molecular sequences.
Probability that a copied character mutates.
Strength of fitness-based selection. Use 0 for neutral drift.
A character vector of next-generation molecules.
evolve_generation(c("AUGC", "UUUU"), n_molecules = 10)
#> [1] "UUUU" "UUUU" "UUUU" "AUGC" "AUGC" "UUUU" "AUGC" "UUUU" "UUUU" "AUGC"