# Evolving expression trees to approximate an unknown function

I started a small toy project[0], that given a black box function: $$\mathbb{R}^n \to \mathbb{R}$$ tries to find a good approximation (if not exact solution) by evolving expression trees. These expression trees consist of three different kinds of nodes:

• function inputs ($$n$$)
• functions (addition, multiplication, division, exponentiation, ...)
• constants

Expression trees are randomly generated, those that have a low average error when comparing their output with the unknown function by random sampling are copied and randomly mutated several times, then selected again.

Possible transformations:

• node insertion
• node mutation (changing a constant, or function)
• node deletion

This approach seems to reconstruct simple functions very quickly.