# List to store the best objective value for each number of iterations best_obj_list = [] # Range of number of iterations to test num_iterations_range = np.logspace(0, 6, 20).astype(int) # Run the greedy algorithm for each number of iterations and store the best objective value for num_iterations in num_iterations_range: _, best_obj = greedy_optimization(TOTAL_BUDGET, alphas, betas, num_iterations) best_obj_list.append(best_obj)