next up previous
Next: Evolutionary Algorithm Up: Evolving Brick structures Previous: Coding for 2D and

Mutation and Crossover

Mutation operates by either random modification of a brick's parameters (size, position, orientation) or addition of a random brick.

The crossover operator involves two parent trees out of which random subtrees are selected. As in GP, the offspring generated has the first subtree removed and replaced by the second.

After mutation or crossover operators are applied, a new, possibly invalid specification tree is obtained. The result is expanded one node at a time and overlapping is checked. Whenever an overlap is found the tree is pruned at that site. With this procedure, a maximum spatially valid subtree is built from a crossover or mutation. Branches that could not be expanded are discarded.

The following mutation of 2.9, for example, is illegal because two bricks would share the same physical space (z = -1 after the second brick means that the third one goes below it, but the first brick is already there).


 \begin{displaymath}
(1\times 4\, (((3,0,1)\, 90^{o}\, (1\times 2\, (((0,0,-1)\, ...
... {nil})(((1,0,1)\, 270^{o}\, (1\times 2\, \text {nil})))))))))
\end{displaymath} (2.10)

The tree will be pruned then at the site, yielding just three bricks

 \begin{displaymath}
(1\times 4\, (((3,0,1)\, 90^{o}\, (1\times 2\, (((1,0,1)\, 270^{o}\, (1\times 2\, \text {nil})))))))))
\end{displaymath} (2.11)

Once a valid tree has been obtained, the simulator is called to test for stability. Fitness is evaluated and the new individual is added to the population.


next up previous
Next: Evolutionary Algorithm Up: Evolving Brick structures Previous: Coding for 2D and
Pablo Funes
2001-05-08