Changeset 3315 for trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs
- Timestamp:
- 04/12/10 23:39:40 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs
r3170 r3315 28 28 namespace HeuristicLab.Problems.TestFunctions { 29 29 /// <summary> 30 /// Ackley Function<br/> 31 /// Domain: [-32.768 , 32.768]^n <br/> 32 /// Optimum: 0.0 at (0, 0, ..., 0) 30 /// The Ackley function as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg 31 /// is highly multimodal. It has a single global minimum at the origin with value 0. 33 32 /// </summary 34 [Item("AckleyEvaluator", "Evaluates the Ackley function on a given point. The optimum of this function is 0 at the origin. ")]33 [Item("AckleyEvaluator", "Evaluates the Ackley function on a given point. The optimum of this function is 0 at the origin. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")] 35 34 [StorableClass] 36 35 public class AckleyEvaluator : SingleObjectiveTestFunctionProblemEvaluator { … … 78 77 for (int i = 0; i < point.Length; i++) 79 78 val += point[i] * point[i]; 80 val *= 1.0 / point.Length; 81 val = Math.Sqrt(val); 82 val *= -0.2; 79 val /= point.Length; 80 val = -0.2 * Math.Sqrt(val); 83 81 result -= 20 * Math.Exp(val); 84 82 … … 86 84 for (int i = 0; i < point.Length; i++) 87 85 val += Math.Cos(2 * Math.PI * point[i]); 88 val *= 1.0 /point.Length;86 val /= point.Length; 89 87 result -= Math.Exp(val); 90 88 return (result);
Note: See TracChangeset
for help on using the changeset viewer.