gramEvol: Grammatical Evolution for R

This package includes source code and documentation of gramEvol: Grammatical Evolution for R.

gramEvol implements grammatical evolution (GE) in native R syntax. It allows discovering programs that can achieve a desired goal, by performing an evolutionary optimization over a population of R expressions generated via a user-defined grammar. Functions are provided for creating and manipulating context-free grammars (CFGs), random search, exhaustive search, and evolutionary optimization. Users are only required to define their program structure via a grammar, and a cost function to evaluate the fitness of each program.

More information regarding the grammatical evolution is brought in the package's vignette.

Contact Information

Release and Development

The latest release and developmental versions of this package are available on:


All files in this package, including the documentation and vignettes, are distributed under GNU GPL v2.0 or later license. For full terms of this license visit