Skip to main content

Evolving Multi-line Compilable C Programs

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1598))

Abstract

We describe a Genetic Algorithm called Grammatical Evolution (GE) that can evolve complete programs in an arbitrary language using a variable length linear genome. The binary genome determines which production rules in a Backus Naur Form grammar definition are used in a genotype to phenotype mapping process to a program. Expressions and programs of arbitrary complexity may be evolved using this system.

Since first describing this system, GE has been applied to other problem domains, and during this time GE has undergone some evolution. This paper serves to report these changes, and also describes how we evolved multi-line C-code to solve a version of the Santa Fe Ant Trail. The results obtained are then compared to results produced by Genetic Programming, and it is found that GE outperforms GP on this problem.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Elseth Gerald D., Baumgardner Kandy D. Principles of Modern Genetics. West Publishing Company

    Google Scholar 

  2. Fraser Adam, Weinbrenner Thomas. 1997. The Genetic Programming Kernel Version 0.5.2.

    Google Scholar 

  3. Freeman, J. J. A Linear Representation for GP using Context Free Grammars. In Proceeding of Genetic Programming 1998, pages 72–77. MIT Press.

    Google Scholar 

  4. Horner, H A C++ class library for GP. Vienna University of Economics.

    Google Scholar 

  5. Keller, R. E. & Banzhaf, W. 1996. Genetic Programming using Genotype-Phenotype Mapping from Linear Genomes into Linear Phenotypes. In Genetic Programming 1996, pages 116–122. MIT Press.

    Google Scholar 

  6. Koza, J. 1992. Genetic Programming. MIT Press.

    Google Scholar 

  7. Langdon, W. & Poli, R. Why Ant’s Are Hard. In Proceedings of Genetic Programming 1998, pages 193–201.

    Google Scholar 

  8. Levenick, James. R. Inserting Introns Improves Genetic Algorithm Success Rate: Taking a Cue from Biology. In Proceedings of the Fourth International Conference on Genetic Algorithms 1991, pages 123–127.

    Google Scholar 

  9. Paterson, N & Livesey, M. 1997. Evolving caching algorithms in C by GP. In Genetic Programming 1997, pages 262–267. MIT Press.

    Google Scholar 

  10. Ryan C., Collins J.J., O’Neill M. 1998. Grammatical Evolution: Evolving Programs for an Arbitrary Language. Lecture Notes in Computer Science 1391, Proceedings of the First European Workshop on Genetic Programming, pages 83–95. Springer-Verlag.

    Google Scholar 

  11. Ryan C., O’Neill M., Collins J.J. 1998. Grammatical Evolution: Solving Trigonometric Identities. In Proceedings of Mendel ’98: 4th International Conference on Genetic Algorithms, Optimization Problems, Fuzzy Logic, Neural Networks and Rough Sets, pages 111–119.

    Google Scholar 

  12. Ryan C., O’Neill M. Grammatical Evolution: A Steady State Approach. In Late Breaking Papers, Genetic Programming 1998, pages 180–185.

    Google Scholar 

  13. Whigham, P. 1995. Grammatically-based Genetic Programming. In Proceedings of the Workshop on Genetic Programming: From Theory to Real-World Applications, pages 3–41. Morgan Kaufmann Pub.

    Google Scholar 

  14. Wong, M. and Leung, K. 1995. Applying logic grammars to induce subfunctions in genetic programming. In Proceedings of the 1995 IEEE conference on Evolutionary Computation, pages 737–740. USA: IEEE Press.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

O’Neill, M., Ryan, C. (1999). Evolving Multi-line Compilable C Programs. In: Poli, R., Nordin, P., Langdon, W.B., Fogarty, T.C. (eds) Genetic Programming. EuroGP 1999. Lecture Notes in Computer Science, vol 1598. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48885-5_7

Download citation

  • DOI: https://doi.org/10.1007/3-540-48885-5_7

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65899-3

  • Online ISBN: 978-3-540-48885-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics