The Concept

Darwin 2 uses Symbolic Regression Trees to calculate control values for an inverter system. These trees are evolved over time using an evolutionary algorithm, where their fitness is evaluated based on their performance in an Inverter Model. The better a tree performs the higher its chances of being selected for the next generation.
To train and evolve these trees, periodic recordings of both internal and environmental variables are collected. These may include data such as power consumption, energy costs, and time of day. This dataset in combination with genetic algorithmic provides the foundation for generating and refining new, more effective tree structures through successive generations.

Own Data-Structure for Symbolic Regression
Storing the Inverter controlling Equation into Trees

Parser for Tree-
Management
Parses an equation in infix-notation into our data structure

Offspring Selection Genetic Algorithm
The used genetic algorithm for creating better performing formulas
The Result
Our project successfully developed a comprehensive codebase for an Offspring Selection Genetic Algorithm (OSGA). This framework is designed for easy extensibility and reusability, thanks to its modular structure.
The final OSGA implementation is highly versatile. It can ingest an entire population of existing trees or randomly generate new trees as needed. Users can fine-tune the OSGA’s behavior by adjusting a wide range of parameters for selection, crossover, and mutation. Crucially, the underlying evaluation model is encapsulated and easily swappable, allowing for flexible adaptation to different problem domains. The resulting trees are saved and can be reused as a starting point for subsequent training runs.
Below, you can see the progress of an OSGA run. The best tree in the initial generation had a fitness of -1.2479. A significant improvement was observed in the first generation, with continuous enhancements thereafter. The left graph shows the median fitness, indicating that all trees improved. The right graph always displays the maximum fitness per generation. The final fitness reached in this example was 1.11144.
