Grammatical Evolution Using Tree Representation Learning

  • Shunya Maruta
  • Yi Zuo
  • Masahiro Nagao
  • Hideyuki Sugiura
  • Eisuke Kita
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10637)


Grammatical evolution (GE) is one of the evolutionary computations, which evolves genotype to map phenotype by using the Backus-Naur Form (BNF) syntax. GE has been widely employed to represent syntactic structure of a function or a program in order to satisfy the design objective. As the GE decoding process parses the genotype chromosome into array or list structures with left-order traversal, encoding process could change gene codons or orders after genetic operations. For improving this issue, this paper proposes a novel GE algorithm using tree representation learning (GETRL) and presents three contributions to the original GE, genetic algorithm (GA) and genetic programming (GP). Firstly, GETRL uses a tree-based structure to represent the functions and programs for practical problems. To be different from the traditional GA, GETRL adopts a genotype-to-phenotype encoding process, which transforms the genes structures for tree traversal. Secondly, a pointer allocation mechanism is introduced in this method, which allows the GETRL to pursue the genetic operations like typical GAs. To compare with the typical GP, however GETRL still generates a tree structure, our method adopts a phenotype-to-genotype decoding process, which allows the genetic operations be able to be apply into tree-based structure. Thirdly, due to each codon in GE has different expression meaning, genetic operations are quite different from GAs, in which all codons have the same meaning. In this study, we also suggest a multi-chromosome system and apply it into GETRL, which can prevent from overriding the codons for different objectives.


Grammatical evolution Tree representation Multiple chromosomes Pointer allocation Genotype-phenotype map 


  1. 1.
    Bäck, T., Schwefel, H.P.: An overview of evolutionary algorithms for parameter optimization. Evol. Comput. 1(1), 1–23 (1993)CrossRefGoogle Scholar
  2. 2.
    Brabazon, A., O’Neill, M.: Biologically Inspired Algorithms for Financial Modelling. Natural Computing Series. Springer-Verlag New York Inc., Secaucus (2006). doi: 10.1007/3-540-31307-9 MATHGoogle Scholar
  3. 3.
    Byrne, J., O’Neill, M., McDermott, J., Brabazon, A.: An analysis of the behaviour of 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. 14–25. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-12148-7_2 CrossRefGoogle Scholar
  4. 4.
    Holland, J.H.: Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control and Artificial Intelligence. MIT Press, Cambridge (1992)Google Scholar
  5. 5.
    Koza, J.R.: Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge (1992)MATHGoogle Scholar
  6. 6.
    Lourenço, N., Pereira, F.B., Costa, E.: Unveiling the properties of structured grammatical evolution. Genet. Program Evolvable Mach. 17(3), 251–289 (2016)CrossRefGoogle Scholar
  7. 7.
    Murphy, E., O’Neill, M., Galvan-Lopez, E., Brabazon, A.: Tree-adjunct grammatical evolution. In: IEEE Congress on Evolutionary Computation, pp. 1–8 (2010)Google Scholar
  8. 8.
    O’Neill, M., Ryan, C.: Grammatical evolution. IEEE Trans. Evol. Comput. 5(4), 349–358 (2001)CrossRefGoogle Scholar
  9. 9.
    O’Neill, M., Brabazon, A., Nicolau, M., Garraghy, S.M., Keenan, P.: \(\pi \)Grammatical evolution. In: Deb, K. (ed.) GECCO 2004. LNCS, vol. 3103, pp. 617–629. Springer, Heidelberg (2004). doi: 10.1007/978-3-540-24855-2_70 CrossRefGoogle Scholar
  10. 10.
    O’neill, M., Ryan, C., Keijzer, M., Cattolico, M.: Crossover in grammatical evolution. Genet. Program Evolvable Mach. 4(1), 67–93 (2003)CrossRefMATHGoogle Scholar
  11. 11.
    Ryan, C., Azad, A., Sheahan, A., O’Neill, M.: No coercion and no prohibition, a position independent encoding scheme for evolutionary algorithms – the Chorus system. In: Foster, J.A., Lutton, E., Miller, J., Ryan, C., Tettamanzi, A. (eds.) EuroGP 2002. LNCS, vol. 2278, pp. 131–141. Springer, Heidelberg (2002). doi: 10.1007/3-540-45984-7_13 CrossRefGoogle Scholar
  12. 12.
    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). doi: 10.1007/BFb0055930 CrossRefGoogle Scholar
  13. 13.
    Ryan, C., O’Neill, M., Collins, J.: Grammatical evolution: solving trigonometric identities. In: Proceedings of Mendel 1998: 4th International Conference on Genetic Algorithms, Optimization Problems, Fuzzy Logic, Neural Networks and Rough Sets, pp. 111–119 (1998)Google Scholar
  14. 14.
    Schwefel, H.P.P.: Evolution and Optimum Seeking: The Sixth Generation. Wiley, New York (1993)Google Scholar
  15. 15.
    Shaker, N., Nicolau, M., Yannakakis, G.N., Togelius, J., O’Neill, M.: Evolving levels for super mario bros using grammatical evolution. In: 2012 IEEE Conference on Computational Intelligence and Games (CIG), pp. 304–311 (2012)Google Scholar
  16. 16.
    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). doi: 10.1007/978-3-319-10762-2_46 Google Scholar
  17. 17.
    Whigham, P.A., Dick, G., Maclaurin, J., Owen, C.A.: Examining the “best of both worlds” of grammatical evolution. In: Proceedings of the 2015 Annual Conference on Genetic and Evolutionary Computation, GECCO 2015, pp. 1111–1118. ACM, New York (2015)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Shunya Maruta
    • 1
  • Yi Zuo
    • 2
  • Masahiro Nagao
    • 3
  • Hideyuki Sugiura
    • 1
  • Eisuke Kita
    • 1
  1. 1.Graduate School of Information SciencesNagoya UniversityNagoyaJapan
  2. 2.Institute of Innovation for Future SocietyNagoya UniversityNagoyaJapan
  3. 3.Graduate School of Environmental ScienceNagoya UniversityNagoyaJapan

Personalised recommendations