Skip to main content

On the Influence of Grammars on Crossover in Grammatical Evolution

  • Conference paper
  • First Online:
Genetic Programming (EuroGP 2021)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12691))

Included in the following conference series:

Abstract

Standard grammatical evolution (GE) uses a one-point crossover (“ripple crossover”) that exchanges codons between two genotypes. The two resulting genotypes are then mapped to their respective phenotypes using a Backus-Naur form grammar. This article studies how different types of grammars affect the resulting individuals of a ripple crossover. We distinguish different grammars based on the expected number of non-terminals chosen when mapping genotype codons to phenotypes, \(B_{avg}\). The grammars only differ in \(B_{avg}\) but can express the same phenotypes. We perform crossover operations on the genotypes and find that grammars with \(B_{avg} > 1\) lead to high numbers of either very small trees or invalid individuals. Due to the re-sampling of the invalid individuals, the algorithmic runtime is higher compared to grammars with a small \(B_{avg}\), despite being able to express the same phenotypes. In grammars with \(B_{avg} \le 1\), the bias towards small trees is reduced and instead, the frequency of valid large trees is increased. Our results give insights on favorable grammar designs and underline the central role of grammar design in GE.

Parts of this research were conducted using the supercomputer Mogon offered by Johannes Gutenberg University Mainz (hpc.uni-mainz.de). The authors gratefully acknowledge the computing time granted on Mogon.

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

Access this chapter

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 EPUB and 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

Institutional subscriptions

Notes

  1. 1.

    Unlike genetic programming [10], in GE no function set exists, but functions are defined by sequences of terminals and non-terminals.

References

  1. Castle, T., Johnson, C.G.: Positional effect of crossover and mutation in grammatical evolution. In: Esparcia-Alcázar, A.I., Ekárt, A., Silva, S., Dignum, S., Uyar, A.Ş. (eds.) EuroGP 2010. LNCS, vol. 6021, pp. 26–37. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-12148-7_3

    Chapter  Google Scholar 

  2. Fenton, M., McDermott, J., Fagan, D., Forstenlechner, S., Hemberg, E., O’Neill, M.: PonyGE2: grammatical Evolution in Python. In: Proceedings of the Genetic and Evolutionary Computation Conference Companion, pp. 1194–1201 (2017)

    Google Scholar 

  3. Francone, F.D., Conrads, M., Banzhaf, W., Nordin, P.: Homologous crossover in genetic programming. In: Proceedings of the 1st Annual Conference on Genetic and Evolutionary Computation - Volume 2, GECCO 1999, pp. 1021–1026. Morgan Kaufmann Publishers Inc., San Francisco (1999)

    Google Scholar 

  4. Harper, R.: GE, explosive grammars and the lasting legacy of bad initialisation. In: Proceedings of the IEEE Congress on Evolutionary Computation, CEC 2010, pp. 1–8. IEEE Press (2010)

    Google Scholar 

  5. Harper, R., Blair, A.: A structure preserving crossover in grammatical evolution. In: 2005 IEEE Congress on Evolutionary Computation, Edinburgh, vol. 3, pp. 2537–2544. IEEE (2005)

    Google Scholar 

  6. Harper, R., Blair, A.: A self-selecting crossover operator. In: 2006 IEEE International Conference on Evolutionary Computation, pp. 1420–1427. IEEE (2006)

    Google Scholar 

  7. Hemberg, E.: An exploration of grammars in grammatical evolution. Ph.D. thesis, University College Dublin (2010)

    Google Scholar 

  8. Hemberg, E., McPhee, N., O’Neill, M., Brabazon, A.: Pre-, in- and postfix grammars for symbolic regression in grammatical evolution. In: McGinnity, T.M. (ed.) IEEE Workshop and Summer School on Evolutionary Computing, pp. 18–22. IEEE (2008)

    Google Scholar 

  9. Keijzer, M., Ryan, C., O’Neill, M., Cattolico, M., Babovic, V.: Ripple Crossover in Genetic Programming. In: Miller, J., Tomassini, M., Lanzi, P.L., Ryan, C., Tettamanzi, A.G.B., Langdon, W.B. (eds.) EuroGP 2001. LNCS, vol. 2038, pp. 74–86. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45355-5_7

    Chapter  Google Scholar 

  10. Koza, J.R.: Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge (1992)

    MATH  Google Scholar 

  11. Luke, S.: Two fast tree-creation algorithms for genetic programming. IEEE Trans. Evol. Comput. 4(3), 274–283 (2000)

    Article  Google Scholar 

  12. Medvet, E.: A comparative analysis of dynamic locality and redundancy in grammatical evolution. In: McDermott, J., Castelli, M., Sekanina, L., Haasdijk, E., García-Sánchez, P. (eds.) EuroGP 2017. LNCS, vol. 10196, pp. 326–342. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-55696-3_21

    Chapter  Google Scholar 

  13. Nicolau, M.: Automatic grammar complexity reduction in grammatical evolution. In: The 3rd Grammatical Evolution Workshop (GECCO 2004), Seattle, Washington (2004)

    Google Scholar 

  14. Nicolau, M.: Understanding Grammatical Evolution: Initialisation. Genet. Program. Evolvable Mach. 18(4), 467–507 (2017). https://doi.org/10.1007/s10710-017-9309-9

    Article  Google Scholar 

  15. Nicolau, M., Agapitos, A.: Understanding grammatical evolution: grammar design. In: Ryan, C., O’Neill, M., Collins, J.J. (eds.) Handbook of Grammatical Evolution. LNCS, pp. 23–53. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-78717-6_2

    Chapter  Google Scholar 

  16. Nicolau, M., O’Neill, M., Brabazon, A.: Termination in grammatical evolution: grammar design, wrapping, and tails. In: Proceedings of the IEEE Congress on Evolutionary Computation (CEC2012), Brisbane. IEEE (2012)

    Google Scholar 

  17. Nicolau, M., Slattery, D.: libGE - grammatical evolution library (2006)

    Google Scholar 

  18. O’Neill, M., Hemberg, E., Gilligan, C., Bartley, E., McDermott, J., Brabazon, A.: GEVA: grammatical evolution in Java. SIGEVOlution 3(2), 17–22 (2008)

    Article  Google Scholar 

  19. O’Neill, M., Ryan, C.: Genetic code degeneracy: implications for grammatical evolution and beyond. In: Floreano, D., Nicoud, J.-D., Mondada, F. (eds.) ECAL 1999. LNCS (LNAI), vol. 1674, pp. 149–153. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48304-7_21

    Chapter  Google Scholar 

  20. O’Neill, M., Ryan, C.: Under the hood of grammatical evolution. In: Banzhaf, W., et al. (eds.) Proceedings of the 1st Annual Conference on Genetic and Evolutionary Computation, GECCO 1999. Morgan Kaufmann (1999)

    Google Scholar 

  21. O’Neill, M., Ryan, C.: Crossover in grammatical evolution: a smooth operator? In: Poli, R., Banzhaf, W., Langdon, W.B., Miller, J., Nordin, P., Fogarty, T.C. (eds.) EuroGP 2000. LNCS, vol. 1802, pp. 149–162. Springer, Heidelberg (2000). https://doi.org/10.1007/978-3-540-46239-2_11

    Chapter  Google Scholar 

  22. O’Neill, M., Ryan, C.: Grammatical evolution. IEEE Trans. Evol. Comput. 5(4), 349–358 (2001)

    Article  Google Scholar 

  23. O’Neill, M., Ryan, C.: Grammatical evolution: evolutionary automatic programming in an arbitrary language. In: Genetic Programming Series. Springer, New York (2003). https://doi.org/10.1007/978-1-4615-0447-4

  24. O’Neill, M., Ryan, C., Keijzer, M., Cattolico, M.: Crossover in Grammatical Evolution: The Search Continues. In: Miller, J., Tomassini, M., Lanzi, P.L., Ryan, C., Tettamanzi, A.G.B., Langdon, W.B. (eds.) EuroGP 2001. LNCS, vol. 2038, pp. 337–347. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45355-5_27

    Chapter  Google Scholar 

  25. O’Neill, M., Ryan, C., Keijzer, M., Cattolico, M.: Crossover in grammatical evolution. Genet. Program. Evolvable Mach. 4(1), 67–93 (2003). https://doi.org/10.1023/A:1021877127167

    Article  MATH  Google Scholar 

  26. O’Neill, M., Ryan, C., Nicolau, M.: Grammar defined introns: an investigation into grammars, introns, and bias in grammatical evolution. In: Spector, L., et al. (eds.) Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2001, pp. 97–103. Morgan Kaufmann, San Francisco (2001)

    Google Scholar 

  27. Rothlauf, F., Oetzel, M.: On the locality of grammatical evolution. In: Collet, P., Tomassini, M., Ebner, M., Gustafson, S., Ekárt, A. (eds.) EuroGP 2006. LNCS, vol. 3905, pp. 320–330. Springer, Heidelberg (2006). https://doi.org/10.1007/11729976_29

    Chapter  Google Scholar 

  28. Ryan, C., Azad, R.M.A.: Sensible initialisation in grammatical evolution. In: Barry, A.M. (ed.) Proceedings of the Bird of a Feather Workshops, Genetic and Evolutionary Computation Conference, GECCO 2003, Chigaco, pp. 142–145. AAAI (2003)

    Google Scholar 

  29. Ryan, C., Collins, J.J., Neill, M.O.: Grammatical evolution: evolving programs for an arbitrary language. In: Banzhaf, W., Poli, R., Schoenauer, M., Fogarty, T.C. (eds.) EuroGP 1998. LNCS, vol. 1391, pp. 83–96. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0055930

    Chapter  Google Scholar 

  30. Ryan, C., Keijzer, M., Nicolau, M.: On the avoidance of fruitless wraps in grammatical evolution. In: Cantú-Paz, E., et al. (eds.) GECCO 2003. LNCS, vol. 2724, pp. 1752–1763. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-45110-2_67

    Chapter  Google Scholar 

  31. Schweim, D., Thorhauer, A., Rothlauf, F.: On the non-uniform redundancy of representations for grammatical evolution: the influence of grammars. In: Ryan, C., O’Neill, M., Collins, J.J. (eds.) Handbook of Grammatical Evolution, pp. 55–78. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-78717-6_3

    Chapter  Google Scholar 

  32. Thorhauer, A.: On the non-uniform redundancy in grammatical evolution. In: Handl, J., Hart, E., Lewis, P.R., López-Ibáñez, M., Ochoa, G., Paechter, B. (eds.) PPSN 2016. LNCS, vol. 9921, pp. 292–302. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-45823-6_27

    Chapter  Google Scholar 

  33. Thorhauer, A., Rothlauf, F.: On the locality of standard search operators in grammatical evolution. In: Bartz-Beielstein, T., Branke, J., Filipič, B., Smith, J. (eds.) PPSN 2014. LNCS, vol. 8672, pp. 465–475. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10762-2_46

    Chapter  Google Scholar 

  34. Thorhauer, A., Rothlauf, F.: On the bias of syntactic geometric recombination in genetic programming and grammatical evolution. In: Silva, S. (ed.) Proceedings of the 2015 Annual Conference on Genetic and Evolutionary Computation (GECCO 2015), pp. 1103–1110. ACM Press, New York (2015)

    Google Scholar 

  35. Wilson, D., Kaur, D.: Search, neutral evolution, and mapping in evolutionary computing: a case study of grammatical evolution. IEEE Trans. Evol. Comput. 13(3), 566–590 (2009)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dirk Schweim .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Schweim, D. (2021). On the Influence of Grammars on Crossover in Grammatical Evolution. In: Hu, T., Lourenço, N., Medvet, E. (eds) Genetic Programming. EuroGP 2021. Lecture Notes in Computer Science(), vol 12691. Springer, Cham. https://doi.org/10.1007/978-3-030-72812-0_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-72812-0_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-72811-3

  • Online ISBN: 978-3-030-72812-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics