On the Avoidance of Fruitless Wraps in Grammatical Evolution

  • Conor Ryan
  • Maarten Keijzer
  • Miguel Nicolau
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2724)


Grammatical Evolution (GE) is an evolutionary system that employs variable length linear chromosomes to represent computer programs. GE uses the individuals to produce derivation trees that adhere to a Backus Naur Form grammar, which are then mapped onto a program. One unusual characteristic of the system is the manner in which chromosomes can be “wrapped”, that is, if an individual has used up all of its genes before a program is completely mapped, the chromosome is reread. While this doesn’t guarantee that an individual will map, prior work suggested that wrapping is beneficial for the system, both in terms of increased success rates and a reduced number of invalid individuals. However, there has been no research into the number of times an individual should be wrapped before the system gives up, and an arbitrary upper limit is usually chosen.

This paper discusses the different types of grammars that could be used with this system, and indicates the circumstances under which individuals will fail. It then presents a heuristic to minimize the number of wraps that have to be made before the system can determine that an individual will fail. It is shown that this can drastically reduce the amount of wrapping on a pathologically difficult problem, as well as on two classes of grammar often used by the system.


Context Free Grammar Symbolic Regression Grammatical Evolution Increase Success Rate Shape Graph 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Keijzer M. Scientific Discovery using Genetic Programming PhD Thesis, Danish Hydraulic Institute, 2001.Google Scholar
  2. 2.
    Koza, J.R., Genetic Programming: On the Programming of Computers by Means of Natural Evolution, MIT Press, Cambridge, MA, 1992.Google Scholar
  3. 3.
    Keijzer M., Ryan C., O’Neill M., Cattolico M., and Babovic V. Ripple crossover in genetic programming. In Proceedings of EuroGP 2001, 2001.Google Scholar
  4. 4.
    M. O’Neill. Automatic Programming in an Arbitrary Language: Evolving Programs with Grammatical Evolution. PhD thesis, University Of Limerick, 2001.Google Scholar
  5. 5.
    O’Neill M. and Ryan C. Genetic code degeneracy: Implications for grammatical evolution and beyond. In ECAL’99: Proc. of the Fifth European Conference on Artificial Life, Lausanne, Switzerland, 1999.Google Scholar
  6. 6.
    O’Neill M. and Ryan C. Grammatical Evolution. IEEE Transactions on Evolutionary Computation. 2001.Google Scholar
  7. 7.
    O’Sullivan, J., and Ryan, C., An Investigation into the Use of Different Search Strategies with Grammatical Evolution. In the proceedings of European Conference on Genetic Programming (EuroGP2002) (pp. 268–277), Springer, 2002.Google Scholar
  8. 8.
    Ryan, C., and Azad, R.M.A., Sensible Initialisation in Chorus. Accepted for European Conference on Genetic Programming (EuroGP 2003).Google Scholar
  9. 9.
    Ryan, C., Azad, A., Sheahan, A., and O’Neill, M., No Coercion and No Prohibition, A Position Independent Encoding Scheme for Evolutionary Algorithms-The Chorus System. In the Proceedings of European Conference on Genetic Programming (EuroGP 2002) (pp. 131–141), Springer, 2002.Google Scholar
  10. 10.
    Ryan, C., Collins, J.J., and O’Neill, M., Grammatical Evolution: Evolving Programs for an Arbitrary Language, in EuroGP’98: Proc. of the First European Workshop on Genetic Programming (Lecture Notes in Computer Science 1391, pp-83–95), Springer, Paris, France, 1998.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Conor Ryan
    • 1
  • Maarten Keijzer
    • 2
  • Miguel Nicolau
    • 1
  1. 1.Department Of Computer Science And Information SystemsUniversity of LimerickIreland
  2. 2.CS Dept.Free UniversityAmsterdam

Personalised recommendations