Skip to content

juanchristensen/GERET

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grammatical Evolution Ruby Exploratory Toolkit (GERET)

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:

Features

  • 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.

Requirements

The library itself is written in pure Ruby (version 1.8 works but 1.9 is substantially faster), no gem dependencies needed.
However, samples require various software (tcc compiler, Java VM, GHDL simulator).

Please read a particular sample/*/README before running the sample.

Installation

There are no special installation steps at this moment. Please clone the git repo:

git clone git://github.com/bver/GERET.git
cd GERET
test/ts_all.rb                # check the library
test/integration.rb           # check tools & sample runs -- (slow!)

(To be changed in the future.)

Play Now

Run:

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:
tools/evolve.rb sample/santa_fe_ant_trail/generational.yaml

Other implementations of GE

More Advanced Games

Try various tools/*
For instance:

# generate the genotype:
tools/sensible_init.rb sample/santa_fe_ant_trail/generational.yaml > genotype.txt

# see the genotype:
cat genotype.txt

# see the phenotype:
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… )

No Guarantees

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

About

Grammatical Evolution Ruby Exploratory Toolkit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published