Copyright © 2009 Pavel Suchmann, please see the LICENSE file.
GERET is the toolkit & library designed to explore the potential of the Grammatical Evolution.
Grammatical Evolution is a system which can be used to automatically generate programs or solutions in any language.
Please see the inventors’ pages:
or read the general introduction:
or purchase the book written by GE creators:
- multiple objectives optimisation
- human-readable yaml-based configuration
- ABNF conformance
- various GE mappers (bucket rule, positional independence, several node expansion strategies, wrapping…)
- attribute grammars support (mapping with semantics of context-free grammars)
- various genetic operators (ripple & LHS crossover, nodal/structural mutations)
- various search algorithms (SPEA2, NSGA2, ALPS… easily extensible by new ones)
- simple & efficient interface to the domain-specific task
See the library documentation.
The library itself is written in pure Ruby, no gem dependencies needed.
Ruby versions tested: 2.4.0p0
Samples require various software (tcc compiler, Java VM, GHDL simulator). Please read a particular sample/*/README.
There are no special installation steps at this moment. Please clone the git repo:
git clone git://github.com/bver/GERET.git cd GERET ruby test/ts_all.rb # check the library ruby test/integration.rb # check tools & sample runs -- (a long run)
(To be changed in the future.)
Run:
ruby tools/evolve.rb sample/task/algorithm.yaml
for evolution of a task sample using a search algorithm.
ls sample/ # shows all existing sample tasks. ls sample/task/*.yaml # lists all algorithms available for the specific _task_. ls sample/*/*.yaml # gives all possible task/algorithm combinations.
Interrupt the run by ^C. Repeated evolve.rb invocation loads algorithm.store and continues evolving.
Remove algorithm.store if you want to start population(s) from scratch.
(Note – repeated invocation may not work for WorkPipes evaluator, see configuration).
Tune algorithm.yaml files to see some experiments failing. :-)
For example:
ruby tools/evolve.rb sample/santa_fe_ant_trail/generational.yaml
Try various tools/*
For instance:
# generate the genotype: ruby tools/sensible_init.rb sample/santa_fe_ant_trail/generational.yaml > genotype.txt # see the genotype: cat genotype.txt # see the phenotype: ruby tools/gpmap.rb sample/santa_fe_ant_trail/generational.yaml < genotype.txt
See algorithm/* for various search algorithms.
Look at lib/* for reusable classes.
Generate the class documentation:
cd lib/ rdoc your-favourite-browser doc/index.html &
Hack your own grammar.abnf files.
Try to write your own pipe.rb tasks (or pipe.py, pipe.java, /usr/local/bin/pipe… )
…
GERET is the exploratory software.
The functionality of the package nor the stability of interfaces is not guaranteed at this stage of development.
If you have an interesting idea for GERET usage give me know: bver at geret.org