Abstract
This paper presents an Attribute Grammar with Lookahead (AG+LA) approach, a technique to solve heavily constrained Multiple Knapsack Problem. This approach incorporates a form of lookahead into the mapping process of Grammatical Evolution (GE) using Attribute Grammar (AG) to focus only on feasible solutions, thereby avoiding issues such as repeated remapping and introns, both of which are limitations of previous approaches based on AG. We also present AG+LAE (AG+LA with an efficiency measure to bias the search towards the most efficient, i.e., best value, objects), the successor of AG+LA where a biasing process is incorporated using problem specific knowledge to significantly improve the performance of its predecessor, both in terms of the number of evaluations required and the quality of solutions obtained. Degenerate code, as used in DNA, is code that uses redundancy, so that different codons can represent the same thing. Many developmental systems, such as GE, use a degenerate encoding to help promote neutral mutations, that is, minor genetic changes that do not result in a phenotypic change. While early work in GE suggested that some level of degeneracy was important, it does come at the cost of increasing the size of the search space. Duplicate Elimination techniques, as opposed to degenerate encoding, are employed in decoder-based Evolutionary Algorithms to ensure that the newly generated solutions are not already contained in the current population. The results and analysis show that it is crucial to incorporate duplicate elimination to improve the performance of both approaches, while the reduced level of degeneracy is crucial only for AG+LA.
Similar content being viewed by others
References
Aho AV, Lam MS, Sethi R, Ullman JD (2006) Compilers: principles, techniques, and tools, 2nd edn. Addison Wesley, Reading
Brabazon A, O’Neill M (2006) Biologically inspired algorithms for financial modelling, 1st edn. Springer, Berlin
Burbidge R, Walker J, Wilson M (2009) Grammatical evolution of a robot controller. In: International conference on intelligent robots and systems. pp 357–362
Chomsky N (1959) On certain formal properties of grammars. Inf Control 2(2):137–167
Christiansen H (1990) A survey of adaptable grammars. ACM SIGPLAN Not 25:35–44
Cleary R (2005) Extending grammatical evolution with attribute grammars: an application to knapsack problems. Master of science thesis in computer science, University of Limerick, Ireland
Colombo G, Mumford C (2005) Comparing algorithms, representations and operators for the multi-objective knapsack problem. In: Proceedings of the 2005 IEEE congress on evolutionary computation, vol 2, pp 1268–1275
Cotta C, Troya JM (1998) A hybrid genetic algorithm for the 0–1 multiple knapsack problem. In: Artificial neural nets and genetic algorithms 3. Springer, New York, pp 250–254
Dempsey I, O’Neill M, Brabazon A (2009) Foundations in grammatical evolution for dynamic environments, 1st edn. Springer, Berlin
Freville A, Plateau G (1990) Hard 0–1 multiknapsack test problems. Invest Oper 1:251–270
Freville A, Plateau G (1994) An efficient preprocessing procedure for the multidimensional 0/1 knapsack problem. Discret Appl Math 49:189–212
Grosan C, Oltean M, Dumitrescu D (2003) A new evolutionary algorithm for the multiobjective 0/1 knapsack problem. In: Proceedings of the international conference on theory and applications of mathematics and informatics. Alba Iulia, Romania, pp 233–237
Heitktter J (2001) Sac-94 suite of 0/1-multiple-knapsack problem instances. http://elib.zib.de/pub/Packages/mp-testdata/ip/sac94-suite
Hoover K, Marceau R, Harris T, Hardison N, Reif D, Motsinger-Reif A (2011) Optimization of grammatical evolution decision trees. In: Proceedings of the 13th annual conference companion on Genetic and evolutionary computation, GECCO ’11. ACM, New York, pp 35–36
Jun Y, Xiande L, Lu H (2003) Evolutionary game algorithm for multiple knapsack problem. In: Proceedings of IEEE/WIC international conference on intelligent agent technology. pp 424–427
Karim MR, Ryan C (2011) A new approach to solving 0–1 multiconstraint knapsack problems using attribute grammar with lookahead. In: Silva S, Foster JA, Nicolau M, Giacobini M, Machado P (eds) EuroGP 2011, LNCS, vol 6621. Springer, Turin, pp 251–262
Karim MR, Ryan C (2012) Degeneracy reduction or duplicate elimination? an analysis on the performance of attributed grammatical evolution with lookahead to solve the multiple knapsack problem. In: Pelta D, Krasnogor N, Dumitrescu D, Chira C, Lung R (eds) NICSO 2011, SCI, vol 387. Springer, Heidelberg, pp 247–266
Khuri S, Back T, Heitkotter J (1994) The zero/one multiple knapsack problem and genetic algorithms. In: Proceedings of the 1994 ACM symposium on applied computing. ACM Press, New York, pp 188–193
Kimbrough SO, Lu M, Wood DH, Wu DJ (2002) Exploring a two-market genetic algorithm. In: Proceedings of the genetic and evolutionary computation conference. Morgan Kaufmann, New York, pp 415–21
Knuth DE (1968) Semantics of context-free languages. Theory Comput Syst 2(2):127–145
Kumar V (1992) Algorithms for constraint satisfaction problems: a survey. AI Mag 13(1):32–44
Levenick JR (1991) Inserting introns improves genetic algorithm success rate: taking a cue from biology. In: Proceedings of the fourth international conference on genetic algorithms, Morgan Kaufmann, pp 123–127
Martello Silvano, Toth P (1990) Knapsack problems: algorithms and computer implementations. Wiley, New York
Nicolau M, Auger A, Ryan C (2003) Functional dependency and degeneracy: detailed analysis of the gauge system. In: Liardet P, Collet P, Fonlupt C, Lutton E, Schoenauer M (eds) EA2003, LNCS, vol 2936. Springer, Marseilles, pp 15–26
Nordin P, Banzhaf W, Francone FD (1997) Introns in nature and in simulated structure evolution. In: Bio-computation and emergent computation, Springer, Skovde, pp 1–2
O’Neill M, Cleary R, Nikolov N (2004) Solving knapsack problems with attribute grammars. In: Proceedings of the third grammatical evolution workshop
O’Neill M, Ryan C (1999) Genetic code degeneracy: implications for grammatical evolution and beyond. In: Floreano D, Nicoud JD, Mondada F (eds) Advances in artificial life, LNCS, vol 1674. Springer, Lausanne, pp 149–153
O’Neill M, Ryan C (2001) Grammatical evolution. IEEE Trans Evol Comput 5(4):349–358
Pisinger D (1995) Algorithms for knapsack problems. Ph.D. thesis, University of Copenhagen
Raidl GR, Gottlieb J (1999) On the importance of phenotypic duplicate elimination in decoder-based evolutionary algorithms. In: Brave S, Wu AS (eds) Late breaking papers at the 1999 genetic and evolutionary computation conference. Orlando, pp 204–211
Rohlfshagen P, Bullinaria J (2006) An exonic genetic algorithm with rna editing inspired repair function for the multiple knapsack problem. In: Proceedings of the UK workshop on computational intelligence
Rohlfshagen P, Bullinaria JA (2010) Nature inspired genetic algorithms for hard packing problems. Ann Oper Res 179(1):393–419
Ryan C, Azad RMA (2003) Sensible initialisation in grammatical evolution. In: Proceedings of the bird of a feather workshops, genetic and evolutionary computation conference. Chigaco, pp 142–145
Ryan C, Collins J, O’Neill M (1998) Grammatical evolution: evolving programs for an arbitrary language. In: Proceedings of the first european workshop on genetic programming. Springer, Heidelberg, pp 83–95
Streeter MJ (2003) The root causes of code growth in genetic programming. Springer, Berlin
Author information
Authors and Affiliations
Corresponding author
Additional information
Submitted for the special issue on the NICSO 2011 workshop.
Rights and permissions
About this article
Cite this article
Karim, M.R., Ryan, C. Attributed Grammatical Evolution with Lookahead for the Multiple Knapsack Problem. Memetic Comp. 4, 279–302 (2012). https://doi.org/10.1007/s12293-012-0097-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12293-012-0097-8