Skip to content

Instantly share code, notes, and snippets.

@gkhayes
Last active March 3, 2019 04:28
Show Gist options
  • Select an option

  • Save gkhayes/26af98cc153a46a1d5339dfb3ca16f6a to your computer and use it in GitHub Desktop.

Select an option

Save gkhayes/26af98cc153a46a1d5339dfb3ca16f6a to your computer and use it in GitHub Desktop.
8-Queens Optimization Using Simulated Annealing - Attempt 2
# Solve problem using simulated annealing
best_state, best_fitness = mlrose.simulated_annealing(problem, schedule = schedule,
max_attempts = 100, max_iters = 1000,
init_state = init_state, random_state = 1)
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