Skip to content

Commit f877c6c

Browse files
committed
change Evolve scope
1 parent 2246b5f commit f877c6c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/function_minimization/initial_program.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ def search_algorithm(iterations=1000, bounds=(-5, 5)):
3131

3232
return best_x, best_y, best_value
3333

34+
# EVOLVE-BLOCK-END
35+
3436

37+
# This part remains fixed (not evolved)
3538
def evaluate_function(x, y):
3639
"""The complex function we're trying to minimize"""
3740
return np.sin(x) * np.cos(y) + np.sin(x * y) + (x**2 + y**2) / 20
3841

3942

40-
# EVOLVE-BLOCK-END
41-
42-
43-
# This part remains fixed (not evolved)
4443
def run_search():
4544
x, y, value = search_algorithm()
4645
return x, y, value

0 commit comments

Comments
 (0)