diff --git a/src/genetic_algorithm.py b/src/genetic_algorithm.py index 5c96427..90f68fe 100644 --- a/src/genetic_algorithm.py +++ b/src/genetic_algorithm.py @@ -2,7 +2,7 @@ from numpy import put, sum, append, where, zeros from numpy.random import choice, seed -def get_first_random_solution(n, m): +def generate_first_solution(n, m): seed(42) solution = zeros(shape=n, dtype=bool) random_indices = choice(n, size=m, replace=False) @@ -63,7 +63,7 @@ def explore_neighbourhood(element, data, max_iterations=100000): def genetic_algorithm(n, m, data): - first_solution = get_first_random_solution(n=n, m=m) + first_solution = generate_first_solution(n=n, m=m) best_solution = explore_neighbourhood( element=first_solution, data=data, max_iterations=100 )