The Role of Syntactic and Semantic Locality of Crossover in Genetic Programming

  • Nguyen Quang Uy
  • Nguyen Xuan Hoai
  • Michael O’Neill
  • Bob McKay
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6239)


This paper investigates the role of syntactic locality and semantic locality of crossover in Genetic Programming (GP). First we propose a novel crossover using syntactic locality, Syntactic Similarity based Crossover (SySC). We test this crossover on a number of real-valued symbolic regression problems. A comparison is undertaken with Standard Crossover (SC), and a recently proposed crossover for improving semantic locality, Semantic Similarity based Crossover (SSC). The metrics analysed include GP performance, GP code bloat and the effect on the ability of GP to generalise. The results show that improving syntactic locality reduces code bloat, and that leads to a slight improvement of the ability to generalise. By comparison, improving semantic locality significantly enhances GP performance, reduces code bloat and substantially improves the ability of GP to generalise. These results comfirm the more important role of semantic locality for crossover in GP.


Genetic Programming Semantics Syntaxtic Crossover 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Banzhaf, W., Langdon, W.B.: Some considerations on the reason for bloat. Genetic Programming and Evolvable Machines 3(1), 81–91 (2002)zbMATHCrossRefGoogle Scholar
  2. 2.
    Beadle, L., Johnson, C.: Semantically driven crossover in genetic programming. In: Proceedings of the IEEE World Congress on Computational Intelligence, pp. 111–116. IEEE Press, Los Alamitos (2008)CrossRefGoogle Scholar
  3. 3.
    Cleary, R., O’Neill, M.: An attribute grammar decoder for the 01 multi-constrained knapsack problem. In: Proceedings of the Evolutionary Computation in Combinatorial Optimization, pp. 34–45. Springer, Heidelberg (April 2005)CrossRefGoogle Scholar
  4. 4.
    Costelloe, D., Ryan, C.: On improving generalisation in genetic programming. In: Vanneschi, L., Gustafson, S., Moraglio, A., De Falco, I., Ebner, M. (eds.) EuroGP 2009. LNCS, vol. 5481, pp. 61–72. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  5. 5.
    de la Cruz Echeanda, M., de la Puente, A.O., Alfonseca, M.: Attribute grammar evolution. In: Mira, J., Álvarez, J.R. (eds.) IWINAC 2005. LNCS, vol. 3562, pp. 182–191. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  6. 6.
    Bryant, R.E.: Graph-based algorithms for Boolean function manipulation. IEEE Transactions on Computers C-35, 677–691 (1986)CrossRefGoogle Scholar
  7. 7.
    Ekart, A., Nemeth, S.Z.: A metric for genetic programs and fitness sharing. In: Poli, R., Banzhaf, W., Langdon, W.B., Miller, J.F., Nordin, P., Fogarty, T.C. (eds.) EuroGP 2000. LNCS, vol. 1802, pp. 259–270. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  8. 8.
    Gagne, C., Schoenauer, M., Parizeau, M., Tomassini, M.: Genetic programming, validation sets, and parsimony pressure. In: Collet, P., Tomassini, M., Ebner, M., Gustafson, S., Ekárt, A. (eds.) EuroGP 2006. LNCS, vol. 3905, pp. 109–120. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  9. 9.
    Gottlieb, J., Raidl, G.: The effects of locality on the dynamics of decoder-based evolutionary search. In: Proceedings of the Genetic and Evolutionary Computation Conference, pp. 283–290. ACM, New York (2000)Google Scholar
  10. 10.
    Hoai, N.X., McKay, R.I., Essam, D.: Representation and structural difficulty in genetic programming. IEEE Transection on Evolutionary Computation 10(2), 157–166 (2006)CrossRefGoogle Scholar
  11. 11.
    Johnson, C.: Deriving genetic programming fitness properties by static analysis. In: Foster, J.A., Lutton, E., Miller, J., Ryan, C., Tettamanzi, A.G.B. (eds.) EuroGP 2002. LNCS, vol. 2278, pp. 298–308. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  12. 12.
    Johnson, C.: What can automatic programming learn from theoretical computer science. In: Proceedings of the UK Workshop on Computational Intelligence, University of Birmingham (2002)Google Scholar
  13. 13.
    Johnson, C.: Genetic programming with fitness based on model checking. In: Proceedings of the 10th European Conference on Genetic Programming (EuroGP 2002), pp. 114–124. Springer, Heidelberg (2007)Google Scholar
  14. 14.
    Katz, G., Peled, D.: Genetic programming and model checking: Synthesizing new mutual exclusion algorithms. In: Cha, S(S.), Choi, J.-Y., Kim, M., Lee, I., Viswanathan, M. (eds.) ATVA 2008. LNCS, vol. 5311, pp. 33–47. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Katz, G., Peled, D.: Model checking-based genetic programming with an application to mutual exclusion. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 141–156. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  16. 16.
    Langdon, W.B.: Size fair and homologous tree genetic programming crossovers. Genetic Programming and Evolvable Machines 1(1), 91–1119 (2000)Google Scholar
  17. 17.
    Levenshtein, V.I.: Binary Codes Capable of Correcting Deletions, Insertions, and Reversa ls. Soviet Physics Doklady 10, 707 (1966)MathSciNetGoogle Scholar
  18. 18.
    Mitchell, T.: Machine Learning. McGraw-Hill, New York (1996)zbMATHGoogle Scholar
  19. 19.
    Nguyen, Q.U., Nguyen, T.H., Nguyen, X.H., O’Neill, M.: Improving the generalisation ability of genetic programming with semantic similarity based crossover. In: Esparcia-Alcazar, A.I., Ekart, A., Silva, S., Dignum, S. (eds.) EuroGP 2010. LNCS, vol. 6021, pp. 184–195. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  20. 20.
    Rothlauf, F., Goldberg, D.: Redundant Representations in Evolutionary Algorithms. Evolutionary Computation 11(4), 381–415 (2003)CrossRefGoogle Scholar
  21. 21.
    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)CrossRefGoogle Scholar
  22. 22.
    Silva, S., Almeida, J.: Dynamic maximum tree depth: A simple technique for avoiding bloat in tree-based gp. In: Proceedings of the 5th Annual Conference on Genetic and Evolutionary Computation (GECCO), pp. 1776–1787. ACM Press, New York (2003)Google Scholar
  23. 23.
    Uy, N.Q., Hoai, N.X., O’Neill, M.: Semantic aware crossover for genetic programming: the case for real-valued function regression. In: Vanneschi, L., Gustafson, S., Moraglio, A., De Falco, I., Ebner, M. (eds.) EuroGP 2009. LNCS, vol. 5481, pp. 292–302. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  24. 24.
    Uy, N.Q., O’Neill, M., Hoai, N.X., McKay, B., Lopez, E.G.: Semantic similarity based crossover in GP: The case for real-valued function regression. In: Collet, P. (ed.) 9th International Conference on Evolution Artificielle. LNCS, pp. 13–24. Springer, Heidelberg (October 2009)Google Scholar
  25. 25.
    Vanneschi, L., Gustafson, S.: Using crossover based similarity measure to improve genetic programming generalization ability. In: GECCO 2009: Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, Montreal, July 8-12, pp. 1139–1146. ACM, New York (2009)CrossRefGoogle Scholar
  26. 26.
    Wong, M.L., Leung, K.S.: An induction system that learns programs in different programming languages using genetic programming and logic grammars. In: Proceedings of the 7th IEEE International Conference on Tools with Artificial Intelligence (1995)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Nguyen Quang Uy
    • 1
  • Nguyen Xuan Hoai
    • 2
  • Michael O’Neill
    • 1
  • Bob McKay
    • 3
  1. 1.Natural Computing Research & Applications GroupUniversity College DublinIreland
  2. 2.Department of Computer ScienceLe Quy Don UniversityVietnam
  3. 3.School of Computer Science and EngineeringSeoul National UniversityKorea

Personalised recommendations