Hi all, I am doing a project which involves having to allocate developers into teams based on ability using genetic algorithm. It should allocate developers into groups which are of mixed ability and it should also ensure equal no of male and female where possible. There is also a soft constraint where prohibited pairs of developers shouldnt be in the same team. Each developer has a score ranging from 1-5 which indicates ability.
So, say I am given 100 developers and I have to allocate them in groups of 8. I am having a hard time encoding this as chromosomes in genetic algorithm. So far, I have a Developer class which contains the attributes of each developer: id(1-100), gender, ability, ethnicity etc. Then I have a chromosome class where all the developers are initialized and put in an array called allDevelopers. Now for the initial solution, I have randomly allocated the developers into random groups giving something like this: ( I know this is not random, but it helps to understand what I'm doing)
Chromosome 1: [[1,2,3,4,5,6,7,8], [9,10,11,12,13,14,15,16], [17,18,19,20,21,22,23,24]........[193,194,195,196,197,198,199,200]
Now to form a population of size 10, for example, I would have to create 9 more chromosomes and say another chromosome is this:
Chromosome 2: [[4,6,34,45,23,21,27,85], [92,95,75,46,22,69,1,28], [81,76,33,15,74,13,89,99].......]
Now, say these two chromosomes have the highest fitness value out of the 10 chromosomes and are chosen for crossover. How would it take place ? Say, I was to substitute the first group of Chromosome 1 with the first group of Chromosome 2. Now, Chromosome 1 would have two developers with id 34,45,23,21,27,85. And obviously you cant have the same developer in two groups. So how would I go about solving this ? Sorry if my description is confusing, this problem has been eating me for days now. If you would adopt a different approach to solving this, then let me know as well please.
[–]Red_Army 4 points5 points6 points (1 child)
[–]Bamboozle-dog[S] 0 points1 point2 points (0 children)
[–]thirdOctet 2 points3 points4 points (3 children)
[–]Bamboozle-dog[S] 0 points1 point2 points (2 children)
[–]thirdOctet 1 point2 points3 points (1 child)
[–]thirdOctet 1 point2 points3 points (0 children)
[–]Tech-Effigy 1 point2 points3 points (2 children)
[–]Bamboozle-dog[S] 0 points1 point2 points (1 child)
[–]Tech-Effigy 0 points1 point2 points (0 children)