Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSPopt()- genetic_alg- Malfunction in max_attempts #53

Open
arian-code opened this issue Aug 23, 2020 · 0 comments
Open

TSPopt()- genetic_alg- Malfunction in max_attempts #53

arian-code opened this issue Aug 23, 2020 · 0 comments

Comments

@arian-code
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant