Natural Computing

, Volume 10, Issue 1, pp 209–241 | Cite as

Grammar-based immune programming

  • Heder S. BernardinoEmail author
  • Helio J. C. Barbosa


This paper describes Grammar-based Immune Programming (GIP) for evolving programs in an arbitrary language by immunological inspiration. GIP is based on Grammatical Evolution (GE) in which a grammar is used to define a language and decode candidate solutions to a valid representation (program). However, by default, GE uses a Genetic Algorithm in the search process while GIP uses an artificial immune system. Some modifications are needed of an immune algorithm to use a grammar in order to efficiently decode antibodies into programs. Experiments are performed to analyze algorithm behavior over different aspects and compare it with GEVA, a well known GE implementation. The methods are applied to identify a causal model (an ordinary differential equation) from an observed data set, to symbolically regress an iterated function f(f(x)) = g(x), and to find a symbolic representation of a discontinuous function.


Artificial immune system Grammatical evolution Immune programming Symbolic regression Model inference 



The authors thank the support from CNPq (grants 140551/2008-5 and 311651/2006-2) and FAPERJ (grant E-26/100.101/2008).


  1. Amarteifio S, O’Neill M (2005) Coevolving antibodies with a rich representation of grammatical evolution. In: Corne D, Michalewicz Z, Dorigo M, Eiben G, Fogel D, Fonseca C, Greenwood G, Chen TK, Raidl G, Zalzala A, Lucas S, Paechter B, Willies J, Guervos JJM, Eberbach E, McKay B, Channon A, Tiwari A, Volkert LG, Ashlock D, Schoenauer M (eds) Proceedings of the 2005 IEEE Congress on Evolutionary Computation, IEEE Press, Edinburgh, UK, vol 1, pp 904–911Google Scholar
  2. Bernardino HS, Barbosa HJ (2009a) Grammar-based immune programming for symbolic regression. In: Proceedings of the 2009 International Conference on Artificial Immune Systems, LNCS 5666, Springer, Berlin Heidelberg, pp 274–287Google Scholar
  3. Bernardino HS, Barbosa HJ (2009b) Nature-inspired algorithms for optimisation. Springer, Berlin Heidelberg, chap Artificial Immune Systems for Optimization, pp 389–411Google Scholar
  4. Bielecki A, Strug B (2005) An evolutionary algorithm for solving the inverse problem for iterated function systems for a two dimensional image. In: Proceedings of the 4th International Conference on Computer Recognition Systems CORES 05, Springer, Berlin Heidelberg, pp 347–354Google Scholar
  5. Bielecki A, Strug B (2007) Finding an iterated function systems based representation for complex visual structures using an evolutionary algorihm. MG&V 16:171–189, Google Scholar
  6. Brown R (1999) On solving nonlinear functional, finite difference, composition, and iterated equations. Fractals 7:277–282MathSciNetzbMATHCrossRefGoogle Scholar
  7. Burnet FM (1959) The clonal selection theory of acquired immunity. Cambridge University Press, CambridgeGoogle Scholar
  8. de Castro LN, Timmis J (2002) An artificial immune network for multimodal function optimization. In: Proc. of the 2002 IEEE World Congress on Computational Intelligence, Honolulu, Hawaii, USA, vol I, pp 669–674Google Scholar
  9. de Castro LN, von Zuben FJ (2002) Learning and optimization using the clonal selection principle. IEEE Trans Evo Comp 6(3):239–251CrossRefGoogle Scholar
  10. Chomsky N (2002) Syntactic structures. Mouton de Gruyter, Berlin, New YorkCrossRefGoogle Scholar
  11. Ciccazzo A, Conca P, Nicosia G, Stracquadanio G (2008) An advanced clonal selection algorithm with ad-hoc network-based hypermutation operators for synthesis of topology and sizing of analog electrical circuits. In: Bentley PJ, Lee D, Jung S (eds) Proceedings of the international conference on artificial immune systems—ICARIS 2008, Springer, LNCS, vol 5132, pp 60–70Google Scholar
  12. Cramer NL (1985) A representation for the adaptive generation of simple sequential programs. In: Proceedings of the 1st international conference on genetic algorithms, L. Erlbaum Associates Inc., Hillsdale, NJ, USA, pp 183–187Google Scholar
  13. Cutello V, Narzisi G, Nicosia G, Pavone M (2005) Clonal selection algorithms: a comparative case study using effective mutation potentials. In: Proceedings of the international conference on artificial immune systems—ICARIS 2005, Springer, LNCS, vol 3627, pp 13–28Google Scholar
  14. Dasgupta D, Nino F (2008) Immunological computation: theory and applications. Auerbach Publications, Boston, MA, USACrossRefGoogle Scholar
  15. Elseth GD, Baumgardner KD (1995) Principles of modern genetics. Brooks Cole, Pacific Grove, CAGoogle Scholar
  16. Ferreira C (2001) Gene expression programming: a new adaptive algorithm for solving problems. ArXiv Computer Science e-prints arXiv:cs/0102027Google Scholar
  17. Gan Z, Chow TW, Chau W (2009a) Clone selection programming and its application to symbolic regression. Expert Syst Appl 36(2):3996–4005CrossRefGoogle Scholar
  18. Gan Z, Zhao MB, Chow TW (2009b) Induction machine fault detection using clone selection programming. Exp Syst Appl 36(4):8000–8012CrossRefGoogle Scholar
  19. Johnson CG (2003) Artificial immune system programming for symbolic regression. In: Proceedings of the 6th European conference on genetical programming—EuroGP 2003, pp 345–353Google Scholar
  20. Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection (complex adaptive systems). The MIT Press, Cambridge, MAGoogle Scholar
  21. Koza JR, Bennett III FH, Andre D, Keane MA (2000) Synthesis of topology and sizing of analog electrical circuits by means of genetic programming. Comput Methods Appl Mech Eng 186(2–4):459–482zbMATHCrossRefGoogle Scholar
  22. Lau A, Musilek P (2009) Immune programming models of cryptosporidium parvum inactivation by ozone and chlorine dioxide. Inf Sci 179(10):1469–1482CrossRefGoogle Scholar
  23. McKinney B, Tian D (2008) Grammatical immune system evolution for reverse engineering nonlinear dynamic bayesian models. Cancer Inform 6:433–447Google Scholar
  24. Musilek P, Lau A, Reformat M, Wyard-Scott L (2006) Immune programming. Inf Sci 176(8):972–1002MathSciNetzbMATHCrossRefGoogle Scholar
  25. O’Neill M, Brabazon A (2006) Grammatical differential evolution. In: Proceedings of the 2006 international conference on artificial intelligence—ICAI 2006, CSREA Press, Las Vegas, Nevada, USA, pp 231–236Google Scholar
  26. O’Neill M, Ryan C (2001) Grammatical evolution. IEEE Trans Evol Comput 5(4):349–358CrossRefGoogle Scholar
  27. O’Neill M, Ryan C (2003) Grammatical evolution: evolutionary automatic programming in an arbitrary language. Kluwer Academic Publishers, Boston, MAzbMATHGoogle Scholar
  28. O’Neill M, Brabazon A, Adley C (2004) The automatic generation of programs for classification problems with grammatical swarm. In: Congress on evolutionary computation—CEC 2004, vol 1, pp 104–110Google Scholar
  29. O’Neill M, Hemberg E, Gilligan C, Bartley E, McDermott J, Brabazon A (2008) Geva: grammatical evolution in java. SIGEVOlution 3:17–22 doi: 10.1145/1527063.1527066 Google Scholar
  30. Poli R, Langdon WB, McPhee NF (2008) A field guide to genetic programming.
  31. Ryan C, Collins J, Neill MO (1998) Grammatical evolution: evolving programs for an arbitrary language. In: LNCS 1391, Proceedings of the first European workshop on genetic programming, Springer-Verlag, pp 83–95Google Scholar
  32. Schmidt MD, Lipson H (2008) Data-mining dynamical systems: automated symbolic system identification for exploratory analysis. In: Proceedings of the Biennial ASME conference on engineering systems design and analysis—ESDA08, Haifa, IsraelGoogle Scholar
  33. Schmidt MD, Lipson H (2009) Solving iterated functions using genetic programming. In: Proceedings of the 11th annual conference companion on genetic and evolutionary computation conference: late breaking papers, ACM, New York, NY, USA, GECCO ’09, pp 2149–2154, doi: 10.1145/1570256.1570292
  34. Smith SF (1980) A learning system based on genetic adaptive algorithms. PhD thesis, University of Pittsburgh, Pittsburgh, PA, USAGoogle Scholar
  35. Smith SF (1983) Flexible learning of problem solving heuristics through adaptive search. In: IJCAI’83: Proceedings of the eighth international joint conference on artificial intelligence, Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, pp 422–425Google Scholar

Copyright information

© Springer Science+Business Media B.V. 2010

Authors and Affiliations

  1. 1.Laboratório Nacional de Computação CientíficaPetrópolisBrazil

Personalised recommendations