@@ -183,11 +183,11 @@ print(sphere({"x0": 0, "x1": 0, "x2": 0, "x3": 0, "x4": 0})) # Optimum: 0
183183
184184# Highly multimodal function with many local optima
185185rastrigin = RastriginFunction(n_dim = 3 )
186- print (f " Search space bounds: { rastrigin.bounds } " )
186+ print (f " Search space bounds: { rastrigin.default_bounds } " )
187187
188188# Challenging function with a narrow global basin
189189ackley = AckleyFunction() # 2D by default
190- print (f " Global optimum at: { ackley.global_optimum } " )
190+ print (f " Global optimum at: { ackley.x_global } " )
191191```
192192
193193</details >
@@ -301,16 +301,16 @@ result_fast = func_fast({"n_neighbors": 5, "algorithm": "auto"}) # ~0.1ms
301301
302302``` python
303303from surfaces.test_functions.benchmark.bbob import (
304- SphereFunction as BBOBSphere,
305- RosenbrockFunction as BBOBRosenbrock,
304+ Sphere as BBOBSphere,
305+ RosenbrockOriginal as BBOBRosenbrock,
306306)
307307
308308# BBOB (Black-Box Optimization Benchmarking) functions
309309# Used in COCO platform for algorithm comparison
310310bbob_sphere = BBOBSphere(n_dim = 10 )
311311bbob_rosenbrock = BBOBRosenbrock(n_dim = 10 )
312312
313- print (f " BBOB Sphere optimum : { bbob_sphere.optimal_value } " )
313+ print (f " BBOB Sphere f_global : { bbob_sphere.f_global } " )
314314```
315315
316316</details >
@@ -327,12 +327,15 @@ from surfaces.test_functions.algebraic.multi_objective import (
327327)
328328
329329# ZDT1: Two-objective problem with convex Pareto front
330- zdt1 = ZDT1(n_dim = 30 )
331- objectives = zdt1({" x0" : 0.5 , " x1" : 0.0 , " x2" : 0.0 }) # Returns tuple of objectives
330+ zdt1 = ZDT1(n_dim = 3 )
331+ params = {f " x { i} " : 0.5 for i in range (3 )}
332+ objectives = zdt1(params) # Returns tuple of objectives
333+ print (f " ZDT1 objectives: { objectives} " )
332334
333335# Kursawe: Non-convex Pareto front
334336kursawe = Kursawe()
335337f1, f2 = kursawe({" x0" : 0.0 , " x1" : 0.0 , " x2" : 0.0 })
338+ print (f " Kursawe objectives: f1= { f1:.4f } , f2= { f2:.4f } " )
336339```
337340
338341</details >
0 commit comments