Jido.Evolve.Crossover.MapUniform (Jido Evolve v1.0.0)

Copy Markdown View Source

Uniform crossover for map genomes.

Selects each key's value from one of the parents randomly. For numeric lists, performs one-point crossover on the list.

Handles asymmetric parent keys by taking the union of all keys. Missing keys are treated as nil during crossover.

Example

parent1 = %{lr: 0.01, layers: [128, 64], act: :relu}
parent2 = %{lr: 0.001, layers: [256, 128, 64], act: :tanh}

# Possible child:
%{lr: 0.001, layers: [128, 64, 64], act: :relu}