Relation between fitness function, fitness score and weights

Skip to first unread message


Apr 19, 2023, 1:31:59 PM4/19/23
to deap-users

I'm using Deap to do a multi-objective optimization and it is grate . I don't understand the relation between the output of the fitness functions, the weights and the fitness score. Let's say i have two fitness functions that theoretically can give these outputs (maximize):

  • Fitness function 1 output: 0-1
  • Fitness function 2 output: 0-10

Let's also assume that is "exponentially more difficult" to get a 1 for the first fitness function the closer to 1 you get and it is more of a linear from fitness function 2. What should the weights be in Deap? How much impact do the weights have?

I have done several tests but have not reach a conclusion h0w to set the weights.

1. creator.create("FitnessMax", base.Fitness, weights=(10.0, 1.0)) 

2. creator.create("FitnessMax", base.Fitness, weights=(1.0, 1.0)) 

3. Something else?


François-Michel De Rainville

Apr 19, 2023, 1:36:48 PM4/19/23
to deap-users
Weights are: first, a way to set minimization or maximization; second, a way to normalize them into comparable ranges. For that latter use, it depends on the algorithm used, for example NSGA doesn't need such normalization. It that case (1, 10) will have very similar result than (1, 1). Some other algorithms might need weighting.

You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages