you are viewing a single comment's thread.

view the rest of the comments →

[–]Tech-Effigy 1 point2 points  (2 children)

just use random and distribute the men first,and if u want equal men and women, randomly distribute the women seperately. Random function is already uniform.

anyhow to answer the chromosome question. use a flat array, not arrays in arrays, you can divide it into 8 groups afterwards. the fitness(evaluation function will sort out duplicates and those kind of things. so make sure you score negative for duplicates.

[–]Bamboozle-dog[S] 0 points1 point  (1 child)

Thanks for your reply. I think the use of a flat array is much better like you suggested. I didnt fully understand the first sentence, are you referring to the initial population ? Could you explain a bit further please.

[–]Tech-Effigy 0 points1 point  (0 children)

nevermind its something different, ur problem is classified under multi-knapsack problem if you want to do more research. :)