Memory-Based Memetic Algorithms
Total Page:16
File Type:pdf, Size:1020Kb
Memory-based Memetic Algorithms Marco Wiering Intelligent Systems Group Institute of Information and Computing Sciences Utrecht University [email protected] Abstract ing some individuals (Hart, 1994). Local search Memetic algorithms combine genetic algorithms can be very efficient for solving particular (sim- with local search; each time a new individual ple) problems, but usually suffers from quickly is generated by the genetic algorithm, a sim- becoming trapped in local maxima. Multiple ple local search procedure brings it (closer) to restart local search algorithms such as GRASP a local maximum. Although memetic algo- (Feo and Resende, 1995) deal with this prob- rithms have been shown to work well for par- lem by iteratively constructing random starting ticular combinatorial optimization problems, points after which local search brings the in- they may sometimes suffer from early conver- dividuals to their local maxima. However, for gence to a local maximum. This paper de- large state spaces with many local maxima, the scribes (steady-state) memory-based memetic use of random starting points may be far from algorithms, which search more efficiently by in- efficient. Therefore memetic algorithms evolve creasing the diversity of the population. Each a population of individuals in which genetic op- time a new individual is created, it is brought to erators are used to create new individuals which its local maximum using local search, and then are all brought (closer) to their local maximum the algorithm checks whether the individual has using local search. This may provide us with already been found before. If that is the case, much better candidate starting points for local the lowest possible fitness value is assigned, search to improve. so that the individual will be replaced during Comparisons between memetic algo- the next iteration. The experiments compare rithms and other algorithms. Memetic al- memory-based memetic algorithms to memetic gorithms have already been compared to GAs algorithms, genetic algorithms and multiple- on a number of combinatorial optimization restart local search on deceptive problems. The problems such as the traveling salesman prob- results indicate that the memory-based memetic lem (TSP) (Radcliffe and Surry, 1994) and ex- algorithm finds the global optimum much more perimental results indicated that the memetic often than the normal memetic algorithm, and algorithms found much better solutions than performs about the same as genetic algorithms standard genetic algorithms. Memetic algo- on the chosen test problems which are very dif- rithms have also been compared to the Ant ficult for conventional local search algorithms. Colony System (Dorigo et al., 1996), (Dorigo and Gambardella, 1997) and to Tabu Search 1 Introduction (Glover and Laguna, 1997) and results indicated Memetic algorithms (Radcliffe and Surry, 1994; that memetic algorithms outperformed both of Merz and Freisleben, 1997) combine genetic them on the Quadratic Assignment Problem algorithms (GAs) (Holland, 1975; Goldberg, (Merz and Freisleben, 1999). Thus, memetic al- 1989) with local search (LS). Often local search gorithms provide us with a powerful method for is applied to every individual until it cannot solving complex problems, and more research on be improved anymore by the local search op- these promising algorithms should be done to erators, although some researchers have shown find their advantages and disadvantages com- benefits on particular problems by only par- pared to other algorithms. For this reason, we tially updating each individual or only updat- perform experiments with deceptive problems containing many local maxima which makes Coping with large memory require- them difficult for local search and memetic al- ments. We only use the memory implemented gorithms. in the hash-table to assign a fitness of 0 to al- Memory-based memetic algorithms. ready found solutions, we never use the memory One of the problems of local search, as stated to select parents for recombination. Note also above, is that they usually end up in local that by only storing local maxima, we strongly maxima. By keeping a population of individu- reduce the size of the memory. Although for als, memetic algorithms tend to cope with that very large problems involving many local max- problem, but it may happen that the popula- ima, the storage space will become very large, it tion converges quite fast to a single individual will grow less fast than the computational time which takes over the whole population. Al- needed to generate them. Furthermore, since though in this case, the algorithm may of course we use steady-state algorithms, we do not have be restarted or additional random solutions may to store individuals below the lowest fitness of be inserted in the population, we opt for an- an individual in the population, thereby making other approach. In our approach, we preserve the hash-tables much smaller and more memory diversity by keeping all found (local maxima) efficient. solutions in memory. When we generate a new Outline of this paper. We will discuss individual and bring it to its maximum using memetic algorithms in section 2. In section 3, local search, we check whether we already have we describe memory-based memetic algorithms. seen this solution, and it this is the case, we Experimental results comparing memetic algo- assign a fitness of 0 (the worst possible fitness rithms, memory-based memetic algorithms, ge- value) to the individual. In this way, we do not netic algorithms, and local search on deceptive keep the same solution in the population a long problems are presented and discussed in section time.1 By using hash-tables, checking whether 4. Finally, section 5 concludes this paper. we already have found an individual can be effi- ciently implemented, since operations like stor- 2 Memetic Algorithms ing an individual with hash-tables consumes as Memetic algorithms combine genetic algorithms much time as a mutation or crossover opera- with local search. Memetic algorithms are tor. Note that although we could use the com- inspired by memes (Dawkins, 1976), pieces plete updated hash-table for representing the of mental ideas, like stories, ideas, and gos- population and for generating offspring, we keep sip, which reproduce (propagate) themselves track of a separate limited population which is through a population of meme carriers. Cor- evolved. responding to the selfish gene idea (Dawkins, Steady state algorithms. We will use 1976) in this mechanism each meme uses the steady state algorithms, in which at each time host (the individual) to propagate itself further step we produce one offspring, bring it to its lo- through the population, and in this way com- cal maximum, check whether we already found petes with different memes for the limited re- this solution, and if not we store it in mem- sources (there is always limited memory and ory, and we replace the worst individual in the time for knowing and telling all ideas and sto- population by the newly found solution. In this ries). way, the population always contains the best Memetic evolution. The difference be- individuals found so far, and the population is tween genes and memes is that the first are in- maximally diverse (i.e., it is not likely to con- spired by biological evolution and the second tain any duplicates). Using the crossover oper- by cultural evolution. Cultural evolution is dif- ator we hope to be able to fruitfully combine ferent because Lamarckian learning is possible individuals in the population to generate new in this model. That means that each transmit- ones. ted meme can be changed according to receiving more information from the environment. This 1It can happen that the same solution is stored twice, makes it possible to locally optimize each dif- but one of these will be replaced during the next time- ferent meme before it is transmitted to other step. individuals. Although optimization of trans- mitted memes before they are propagated fur- for recombination and mutation is applied to ther seems an efficient way for knowledge prop- the new individual. Then local hillclimbing is agation or population-based optimization, the applied to the new individual and the worst in- question is how we can optimize a meme or in- dividual is replaced by the new individual. dividual. For this we can combine genetic al- gorithms with different optimization methods. Memetic Algorithm The optimization technique we use in this pa- per is a simple local hillclimber, but others have 1) Make a population of random also proposed different techniques such as Tabu individuals. ∀ individuals i Search. Because we use a local hillclimber, 2) do: each individual is not truly optimized, but only 3) Ind(i) = Local-Hillclimbing(Ind(i)) brought to its local maximum. If we would be 4) Parent1 = Select-Parent(Population) able to fully optimize the individual, we would 5) Parent2 = Select-Parent(Population) not need a genetic algorithm at all. 6) Offspr = Crossover(Parent1,Parent2) 7) Offspr = Mutate(Offspr) First-visit local hillclimbing. We use local 8) Offspr = Local-Hillclimbing(Offspr) hillclimbing on each newly created individual. 9) Replace worst individual by Offspr This local hillclimber is a first-visit method; the 10) If termination criterion not met first change which improves the individual is goto 4. used. We use binary strings for the individ- uals in our experiments and use the simplest 3 Memory-based Memetic neighbourhood function as possible which con- Algorithms tains only individuals generated by a mutation Although memetic algorithms can be quite effi- of a single bit. Of course, this is an impor- cient on their own, the whole population may tant choice, but we did not want to optimize converge quite quickly to a (bad) local max- the neighbourhood function, since this would imum. The reason is that the same build- require a-priori knowledge or a lot of testing ing blocks can be quickly found in all indi- from which only the memetic algorithms could viduals, and mutation to escape local maxima profit and not the genetic algorithms to which may not be very useful in combination with they are compared.