Evolution of new algorithms for the binary knapsack problem Lucas Parada • Carlos Herrera • Mauricio Sepu ´ lveda • Vı ´ctor Parada Ó Springer Science+Business Media Dordrecht 2015 Abstract Due to its NP-hard nature, it is still difficult to find an optimal solution for instances of the binary knap- sack problem as small as 100 variables. In this paper, we developed a three-level hyper-heuristic framework to generate algorithms for the problem. From elementary components and multiple sets of problem instances, algo- rithms are generated. The best algorithms are selected to go through a second step process, where they are evaluated with problem instances that differ in size and difficulty. The problem instances are generated according to methods that are found in the literature. In all of the larger problem instances, the generated algorithms have less than 1 % error with respect to the optimal solution. Additionally, generated algorithms are efficient, taking on average frac- tions of a second to find a solution for any instance, with a standard deviation of 1 s. In terms of structure, hyper- heuristic algorithms are compact in size compared with those in the literature, allowing an in-depth analysis of their structure and their presentation to the scientific world. Keywords Automatic generation of algorithms Combinatorial optimization Evolutionary computation Genetic programming Hyper-heuristic Knapsack problem Abbreviations BKP Binary knapsack problem GP Genetic programming GPC?? Genetic programming platform for evolving tree structures of code IKL In the knapsack list; data structure used by the evolved algorithms OKL Out of knapsack list; data structure used by the evolved algorithms UC Uncorrelated instance of the binary knapsack problem WC Weakly correlated instance of the binary knapsack problem SC Strongly correlated instance of the binary knapsack problem SS Subset sum instance of the binary knapsack problem FC Fitness cases i.e. problem instances of the binary knapsack problem used to evolve algorithms 1 Introduction The search for efficient algorithms for combinatorial optimi- zation problems is a central goal of research in the field of optimization. Difficult problems arise from real-world situa- tions in management and information systems. To address such problems in general, some simplifications are made, giving rise to theoretical problems that are difficult to solve computationally because they belong to the NP-complete L. Parada (&) C. Herrera Departamento de Ingenierı ´a Industrial, Universidad de Concepcio ´n, Calle Edmundo Larenas 215, Concepcio ´n, Chile e-mail: lucasparada20@gmail.com; lucasparada@udec.cl C. Herrera e-mail: cherreral@udec.cl M. Sepu ´lveda V. Parada Departamento de Ingenierı ´a Informa ´tica, Universidad de Santiago de Chile, Av. Ecuador 3659, Santiago, Chile e-mail: mauricio.sepulveda@usach.cl V. Parada e-mail: victor.parada@usach.cl 123 Nat Comput DOI 10.1007/s11047-015-9483-8