lineage

Values

pub fn main() -> Nil

Entry point for the garden pea population simulation.

Simulates a population of garden peas over a number of generations, then writes the result to disk: the full population as JSON, plus a phenotype and a compact-genotype SVG family tree centered on a randomly chosen individual. See write_output.

Usage

gleam run -- <size> <iterations>

Arguments

  • size - The number of individuals in the population.
  • iterations - The number of generations to simulate.

Defaults

If no arguments are provided, the simulation runs with a population size of 10 over 10 generations.

Examples

gleam run -- 100 50

Errors

Prints an error to stderr and exits if size or iterations cannot be parsed as integers.

Search Document