Genetic Algorithm to generate Binary Code

6 次查看(过去 30 天)
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

回答(1 个)

Walter Roberson
Walter Roberson 2016-7-15
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.

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by