EvaluatorExample.py 181 B

12345678
  1. # evaluator example
  2. def evaluatorExample(solution):
  3. fitness = 0
  4. for index, elem in enumerate(solution.data):
  5. fitness = fitness + (elem * index)
  6. return fitness