Genetic Algorithm to generate Binary Code

3 visualizaciones (últimos 30 días)
Stefania
Stefania el 15 de Jul. de 2016
Comentada: Stefania el 19 de Jul. de 2016
Hello,
I am using GA to generate an optimal binary shutter sequence for a coded exposure camera. Since I want to generate a code of 0 and 1, I used IntCon to force all the components of my vector to be integers and set lower bound 0 and upper bound 1 for the elements. However, using IntCon restricts the range of functions I can use for Mutation, Selection, Creation and so on. At the moment, I am trying to reproduce the method the authors use in this paper: "Optimal binary sequences for coded exposure photography using genetic algorithm" K.Huang, J.Hou, J.Zhang, published in IEEE 2014
They say, quote, "we used the stochastic uniform selection function, scatted crossover function and adapt feasible mutation function in GA." But some of these are overridden by ga in integer problems. Moreover, the ga automatically uses a penalty function instead of the fitness function...
Is there any way I can restrict the components of my vector to just 0 and 1 without using IntCon, such that I can use the same methods as the paper above?
Many thanks,
Stefania

Respuestas (1)

Walter Roberson
Walter Roberson el 15 de Jul. de 2016
I cannot seem to find it now, but I recently saw someone answer a related question. The solution in that case was to not specify integer constraints, because doing that restricts what you can do. Instead, the way to proceed was to provide your own custom functions for initial population and mutation and crossover which always return integer results according to your needs.

Categorías

Más información sobre Genetic Algorithm en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by