3 Growing and breeding🔗ℹ

(random-tree depth #:method method) -> tree?

  method : (or/c 'grow 'full)

(crossover parent-a parent-b) -> (values tree? tree?)

(mutate tree) -> tree?

grow allows early leaves (irregular shapes); full builds complete trees. Crossover swaps randomly chosen subtrees; mutation replaces a random subtree with freshly grown material sized to the remaining depth budget.