moonlander_gp

Function random_population

Source
pub fn random_population<P: RandNode + Clone + Sync, F: Fitness + Sized + Send, R: Rng>(
    n: usize,
    max_depth: usize,
    rng: &mut R,
) -> Population<P, F>
Expand description

Generate a random population of size N.

Trees of various depths will be generated in a uniform fashion between 1 and max_depth.