Function PGAFitnessMinCmax

Function Documentation

static void PGAFitnessMinCmax(PGAContext *ctx, PGAIndividual *pop)

Calculate fitness in the case of a minimization problem by subtracting the worst evaluation function value from each evaluation function.

Description

This is a dynamic linear fitness function \(u(x) = a f(x) + b(t)\) with \(a=-1, b(t) = 1.1 * \max f(x)\)

Parameters
  • ctx – context variable

  • pop – population pointer to calculate fitness for

Returns

Calculates the fitness for each string in the population via side effect