You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using TSPopt() to solve simple TSP example with following code:-
->best_state, best_fitness, fittness_curve = mlrose.genetic_alg(problem_fit2, mutation_prob = 0.2, max_attempts = max_attempt, random_state = 2, curve=True)
I iterate max_attempt from 1 to 50, and get following size of fittness_curve:-
Output:-
Max attempts = 1; size of fittness curve = 2
Max attempts = 2; size of fittness curve = 3
Max attempts = 3; size of fittness curve = 4
Max attempts = 4; size of fittness curve = 5
Max attempts = 5; size of fittness curve = 6
Max attempts = 6; size of fittness curve = 7 Max attempts = 7; size of fittness curve = 15
Max attempts = 8; size of fittness curve = 16
Max attempts = 9; size of fittness curve = 17
Max attempts = 10; size of fittness curve = 18 Max attempts = 11; size of fittness curve = 32
Max attempts = 12; size of fittness curve = 33
Max attempts = 13; size of fittness curve = 34
Max attempts = 14; size of fittness curve = 35
Max attempts = 15; size of fittness curve = 36
Max attempts = 16; size of fittness curve = 37
Max attempts = 17; size of fittness curve = 38
Max attempts = 18; size of fittness curve = 39
Max attempts = 19; size of fittness curve = 40
Max attempts = 20; size of fittness curve = 41
It seems that more attempts are being made by the library than passed at parameters and the problem exist at values 7 and 11.
I am using TSPopt() to solve simple TSP example with following code:-
->best_state, best_fitness, fittness_curve = mlrose.genetic_alg(problem_fit2, mutation_prob = 0.2, max_attempts = max_attempt, random_state = 2, curve=True)
I iterate max_attempt from 1 to 50, and get following size of fittness_curve:-
Output:-
Max attempts = 1; size of fittness curve = 2
Max attempts = 2; size of fittness curve = 3
Max attempts = 3; size of fittness curve = 4
Max attempts = 4; size of fittness curve = 5
Max attempts = 5; size of fittness curve = 6
Max attempts = 6; size of fittness curve = 7
Max attempts = 7; size of fittness curve = 15
Max attempts = 8; size of fittness curve = 16
Max attempts = 9; size of fittness curve = 17
Max attempts = 10; size of fittness curve = 18
Max attempts = 11; size of fittness curve = 32
Max attempts = 12; size of fittness curve = 33
Max attempts = 13; size of fittness curve = 34
Max attempts = 14; size of fittness curve = 35
Max attempts = 15; size of fittness curve = 36
Max attempts = 16; size of fittness curve = 37
Max attempts = 17; size of fittness curve = 38
Max attempts = 18; size of fittness curve = 39
Max attempts = 19; size of fittness curve = 40
Max attempts = 20; size of fittness curve = 41
It seems that more attempts are being made by the library than passed at parameters and the problem exist at values 7 and 11.
Kindly help to improve my understanding please.
tsp_mlrose-distance.py.pdf
The text was updated successfully, but these errors were encountered: