Crossover thumb|Genetic programming subtree crossover In Genetic Programming two fit individuals are chosen from the population to be parents for one or two children. In tree genetic programming, these parents are represented as inverted lisp like trees, with their root nodes at the top. In subtree crossover in each parent a subtree is randomly chosen. (Highlighted with yellow in the animation.) In the root donating parent (in the animation on the left) the chosen subtree is removed and replaced with a copy of the randomly chosen subtree from the other parent, to give a new child tree.
Crossover thumb|Genetic programming subtree crossover In Genetic Programming two fit individuals are chosen from the population to be parents for one or two children In tree genetic programming these parents are represented as inverted lisp like trees with their root nodes at the top In subtree crossover in each parent a subtree is randomly chosen (Highlighted with yellow in the animation) In the root donating parent (in the animation on the left) the chosen subtree is removed and replaced with a copy of the randomly chosen subtree from the other parent to give a new child tree