[galib] best individual satisfying constraint

matthew wall mwall at oculustech.com
Wed Jul 13 14:35:37 EDT 2005


On 13 Jul 2005, at 12:11, Arthur Liew wrote:

> Dear all,
>
> Hi, I need to calculate the best genome for an constraint optimization
> problem. However, I notice the GAlib return the best genome for
> fittest individual which may not satisfy constraint. Any idea how to
> save the best genome satisfying constraint ? Or any idea which file
> this routine is done ? Thanks !
>
> Arthur.


arthur,

there are a few approaches to what you describe:

1) assign value to the amount to which a solution satisfies the  
constraints, and include that in the objective score.  you will have  
to figure out how to keep measurement of constrained-ness from  
confounding your measurement of goodness and vice-versa.

2) use a representation in which constraint violations are  
impossible, but you still get maximum coverage of the search space.   
you will probably have to write your own mutation and crossover  
operators.

3) use a repair operator that deterministically (or not) changes a  
constraint-violating solution into a properly-constrained solution.   
this is often done during genome evaluation, in the objective function.

and i'm sure you can imagine other variations...

m


More information about the galib mailing list