Skip to content

Commit

Permalink
Test fitness batch calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedfgad committed Nov 8, 2023
1 parent 99fd037 commit 28fa28e
Show file tree
Hide file tree
Showing 2 changed files with 221 additions and 41 deletions.
3 changes: 2 additions & 1 deletion tests/test_lifecycle_callbacks_calls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pygad
import random

num_generations = 100

Expand All @@ -9,7 +10,7 @@ def number_lifecycle_callback_functions_calls(stop_criteria=None,
actual_num_callbacks_calls = 0

def fitness_func(ga_instanse, solution, solution_idx):
return 1
return random.random()

def on_start(ga_instance):
nonlocal actual_num_callbacks_calls
Expand Down
Loading

0 comments on commit 28fa28e

Please sign in to comment.