Grammar-guided genetic programming
Evolve programs in any context-free language for any quantifiable goal
This website contains an example gallery created with a preliminary prototype of
two grammar-guided genetic programming methods:
CFG-GP
and
GE.
Two proposals for Deep Funding aim to extend this prototype considerably and
apply it to a hard optimization problem from practice:
The plan is to improve the two existing methods in the prototype and additionally implement three more recent ones that claim to have better performance:
piGE
,
DSGE
and
WHGE
.
Once all five methods are stable, suitable benchmark problems will be collected according to
guidelines
developed by the genetic programming community.
This will allow to compare the methods objectively,
analyze their sensitivity to hyperparameter settings
and identify the best choice of method and parameter combination for tackling different use cases.
All that functionality will be integrated and provided in form of an
open-source software package on GitHub and PyPI.
The most performant method will then be onboarded on the
SingularityNET platform
as general-purpose optimization service that can be used to solve
hard optimization problems in a wide range of domains.
The plan is to apply the best grammar-guided genetic programming method in a
real-world setting: evolutionary search for robust trading strategies,
presumably many of which can not be designed by human traders or
other machine-learning approaches.
This essentially requires the formulation of
1) context-free grammars to define search spaces of candidate strategies and
2) an objective functions to correctly evaluate the quality of candidate strategies.
The second task is suspected to be the main challenge, because properly
evaluating candidate trading strategies requires a non-trivial setup
of backtesting simulations together with proper statistical evaluation techniques
to prevent overfitting and suitable risk-adjusted performance metrics
to optimize the correct goal. Only if that setup is done right, the evolved
trading strategies will have good performance both on the training data but more
importantly also on future data in live markets.
If you click on an image you are redirected to a Jupyter notebook that shows prototype code and the results it produced.
Please note that some of the prototype examples are still fairly simple toy problems, which
shall primarily demonstrate the flexiblity of grammar-guided genetic programming to operate in various search spaces,
such as subsets of the
Python,
Rust,
Atomese (for OpenCog)
and
MeTTa (for OpenCog Hyperon)
language as well as user-created
domain-specific languages.
Beyond such simple demonstrations, there is a long list of real-world applications
where evolutionary algorithms have produced
human-competitive results,
including methods from classical genetic programming and more recent
grammar-guided genetic programming (e.g. under the names "grammatical evolution" and
"structured grammatical evolution" in the list, both covered by proposal 1).