Evolutionary algorithm: Difference between revisions

Content deleted Content added
Christian (talk | contribs)
m →‎{{header|R}}: = to <-; = is ok too, but elsewhere is used <-, and it is more "compatible"
Line 1,380:
 
## Easier if the string is a character vector
target =<- unlist(strsplit("METHINKS IT IS LIKE A WEASEL", ""))
 
charset =<- c(LETTERS, " ")
parent =<- sample(charset, length(target), replace=TRUE)
 
mutaterate <- 0.01