Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Easily Implementation of a Genetic Algorithm Mutation function
Replies: 2   Last Post: Dec 28, 2012 11:32 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Michael Doukas

Posts: 12
Registered: 12/26/12
Easily Implementation of a Genetic Algorithm Mutation function
Posted: Dec 28, 2012 8:31 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello everybody,

I am developing a simple Genetic Algorithm for a project of mine and i have reached the point where i want to mutate the current individuals of the population.

With help from this forum, i have created a script that generates the initial population. The script is as follows:

init_val_of_columns = [1,4,6,9,13,24,26,28,41,54];
N = length(init_val_of_columns)-1;
M = 40;
Individuals = floor(repmat(diff(init_val_of_columns),M,1).*rand(M,N))+repmat(init_val_of_columns(1:N),M,1);

The script generates a 40x9 matrix, with values constrained for each cell (columnwise) as defined by variable init_val_of_columns.

Therefore, for that population i want the mutation to happen (with probability mutP=0.8/N for each element of the each row), and store the resulting offsprings in a matrix called e.g. NewChromosomes.

What i want is for the resulting chromosomes to obey the ranges imposed by init_val_of_columns (in order to have feasible solutions).

Thank you in advance,
Mike



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.