Last active
March 3, 2019 04:31
-
-
Save gkhayes/baf9b72c04c3ce1f2c42382468acf1c8 to your computer and use it in GitHub Desktop.
TSP Optimization Using a Genetic Algorithm - Attempt 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Solve problem using the genetic algorithm | |
| best_state, best_fitness = mlrose.genetic_alg(problem_fit, mutation_prob = 0.2, | |
| max_attempts = 100, random_state = 2) | |
| print('The best state found is: ', best_state) | |
| print('The fitness at the best state is: ', best_fitness) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment