Skip to content

Commit

Permalink
fix(benchmarks): correct power operator
Browse files Browse the repository at this point in the history
Fixes #13
  • Loading branch information
sanjayankur31 committed Nov 21, 2023
1 parent 78a8166 commit 9ecbbe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inspyred/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def evaluator(self, candidates, args):
fitness = []
for c in candidates:
f1 = sum([-10 * math.exp(-0.2 * math.sqrt(c[i]**2 + c[i+1]**2)) for i in range(len(c) - 1)])
f2 = sum([math.pow(abs(x), 0.8) + 5 * math.sin(x)**3 for x in c])
f2 = sum([math.pow(abs(x), 0.8) + 5 * math.sin(x**3) for x in c])
fitness.append(emo.Pareto([f1, f2]))
return fitness

Expand Down

0 comments on commit 9ecbbe3

Please sign in to comment.