-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevolve.Rd
More file actions
32 lines (27 loc) · 1004 Bytes
/
evolve.Rd
File metadata and controls
32 lines (27 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/palette-fns.R
\name{evolve}
\alias{evolve}
\title{Evolve function}
\usage{
evolve(selected_parents, n_children, mutation_rate = 0.05, variation = 0.01)
}
\arguments{
\item{selected_parents}{List of selected parents.}
\item{n_children}{Number of children to spawn.}
\item{mutation_rate}{Mutation rate. Numeric (0-1).}
\item{variation}{Variation parameter. Controls the extent a single colour varies during mutation.}
}
\value{
}
\description{
Takes a set of parent palettes and spawns a given number of children.
}
\details{
It is possible to evolve only 1 selected parent. In this case crossover has no effect however random mutations can
still occur and the \code{variation} parameter will generate slight variations of the parent. Useful for tweaking a chosen palette.
If selecting 3 or more parents, two are chosen at random to spawn a single child. This is repeated \code{n_children} times.
}
\examples{
\dontrun{}
}