The first condition (a+b+c+d+e=1
) can be satisfied by having shorter chromosomes, with only a,b,c,d
. The e
value can then be represented (in the fitness function or for later use) by e:=1-a-b-c-d
.
EDIT:
Another way to satisfy the first condition would be to normalize the values:
sum:= a+b+c+d+e
a:= a/sum;
b:= b/sum;
c:= c/sum;
d:= d/sum;
e:= e/sum;
The new sum will then be 1.
For the second condition (a,b,c,d,e>=0
), you can add an approval phase for the new offspring chromosomes (generated by mutation and/or crossover) before throwing them into the gene pool (and allowing them to breed), and reject those who dont satisfy the condition.