Evolving High-Level Imperative Program Trees with Strongly Formed Genetic Programming

  • Tom Castle
  • Colin G. Johnson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7244)


We present a set of extensions to Montana’s popular Strongly Typed Genetic Programming system that introduce constraints on the structure of program trees. It is demonstrated that these constraints can be used to evolve programs with a naturally imperative structure, using common high-level imperative language constructs such as loops. A set of three problems including factorial and the general even-n-parity problem are used to test the system. Experimental results are presented which show success rates and required computational effort that compare favourably against other systems on these problems, while providing support for this imperative structure.


Genetic programming Imperative programming Loops 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Koza, J.R.: Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge (1992)zbMATHGoogle Scholar
  2. 2.
    Weimer, W., Nguyen, T., Le Goues, C., Forrest, S.: Automatically finding patches using genetic programming. In: Fickas, S., et al. (eds.) ICSE 2009, Vancouver, pp. 364–374 (2009)Google Scholar
  3. 3.
    Montana, D.J.: Strongly typed genetic programming. Evolutionary Computation 3, 199–230 (1995)CrossRefGoogle Scholar
  4. 4.
    Nordin, P.: A compiling genetic programming system that directly manipulates the machine code. In: Kinnear Jr., K.E. (ed.) Advances in Genetic Programming, pp. 311–331. MIT Press (1994)Google Scholar
  5. 5.
    Brameier, M., Banzhaf, W.: Linear Genetic Programming. Number XVI in Genetic and Evolutionary Computation. Springer, Heidelberg (2007)Google Scholar
  6. 6.
    Poli, R., Langdon, W.B., McPhee, N.F.: A Field Guide to Genetic Programing. (2008)Google Scholar
  7. 7.
    O’Neill, M., Ryan, C.: Evolving Multi-line Compilable C Programs. In: Langdon, W.B., Fogarty, T.C., Nordin, P., Poli, R. (eds.) EuroGP 1999. LNCS, vol. 1598, pp. 83–92. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  8. 8.
    Cleary, R., O’Neill, M.: An Attribute Grammar Decoder for the 01 MultiConstrained Knapsack Problem. In: Raidl, G.R., Gottlieb, J. (eds.) EvoCOP 2005. LNCS, vol. 3448, pp. 34–45. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    de la Cruz Echeandía, M., de la Puente, A.O., Alfonseca, M.: Attribute Grammar Evolution. In: Mira, J., Álvarez, J.R. (eds.) IWINAC 2005, Part II. LNCS, vol. 3562, pp. 182–191. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  10. 10.
    Ortega, A., de la Cruz, M., Alfonseca, M.: Christiansen grammar evolution: Grammatical evolution with semantics. IEEE Transactions on Evolutionary Computation 11, 77–90 (2007)CrossRefGoogle Scholar
  11. 11.
    Langdon, W.B., Harman, M.: Evolving a CUDA kernel from an nVidia template. In: Sobrevilla, P., et al. (eds.) 2010 IEEE World Congress on Computational Intelligence, Barcelona, pp. 2376–2383. IEEE Press (2010)Google Scholar
  12. 12.
    Ross, B.J.: Logic-based genetic programming with definite clause translation grammars. In: Banzhaf, W., Daida, J.M., Eiben, A.E., Garzon, M.H., Honavar, V., Jakiela, M.J., Smith, R.E. (eds.) GECCO 1999, Orlando, vol. 2, p. 1236. Morgan Kaufmann (1999)Google Scholar
  13. 13.
    Wong, M.L., Leung, K.S.: Combining genetic programming and inductive logic programming using logic grammars. In: 1995 IEEE Conference on Evolutionary Computation, vol. 2, Perth, pp. 733–736. IEEE Press (1995)Google Scholar
  14. 14.
    McGaughran, D., Zhang, M.: Evolving more representative programs with genetic programming. International Journal of Software Engineering and Knowledge Engineering 19, 1–22 (2009)CrossRefGoogle Scholar
  15. 15.
    Castle, T., Beadle, L.: Epochx: genetic programming software for research (2007),
  16. 16.
    Harding, S., Miller, J.F., Banzhaf, W.: Self Modifying Cartesian Genetic Programming: Fibonacci, Squares, Regression and Summing. In: Vanneschi, L., Gustafson, S., Moraglio, A., De Falco, I., Ebner, M. (eds.) EuroGP 2009. LNCS, vol. 5481, pp. 133–144. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  17. 17.
    Agapitos, A., Lucas, S.: Learning Recursive Functions with Object Oriented Genetic Programming. In: Collet, P., Tomassini, M., Ebner, M., Gustafson, S., Ekárt, A. (eds.) EuroGP 2006. LNCS, vol. 3905, pp. 166–177. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  18. 18.
    Wong, M.L., Leung, K.S.: Evolving recursive functions for the even-parity problem using genetic programming. In: Angeline, P.J., Kinnear Jr., K.E. (eds.) Advances in Genetic Programming, vol. 2, pp. 221–240. MIT Press, Cambridge (1996)Google Scholar
  19. 19.
    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)CrossRefGoogle Scholar
  20. 20.
    Harding, S., Miller, J.F., Banzhaf, W.: Self modifying cartesian genetic programming: Parity. In: Tyrrell, A., et al. (eds.) 2009 IEEE Congress on Evolutionary Computation, Trondheim, pp. 285–292. IEEE Press (2009)Google Scholar
  21. 21.
    Wilson, G., Heywood, M.: Learning recursive programs with cooperative coevolution of genetic code mapping and genotype. In: Thierens, D., et al. (eds.) GECCO 2007, London, vol. 1, pp. 1053–1061. ACM Press (2007)Google Scholar
  22. 22.
    Walker, M., Edwards, H., Messom, C.: Confidence Intervals for Computational Effort Comparisons. In: Ebner, M., O’Neill, M., Ekárt, A., Vanneschi, L., Esparcia-Alcázar, A.I. (eds.) EuroGP 2007. LNCS, vol. 4445, pp. 23–32. Springer, Heidelberg (2007)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Tom Castle
    • 1
  • Colin G. Johnson
    • 1
  1. 1.School of ComputingUniversity of KentCanterburyUK

Personalised recommendations