Skip to content

Instantly share code, notes, and snippets.

@fedden
Created December 11, 2017 00:39
Show Gist options
  • Save fedden/a4ae1555cb7be03c8f2f16bbdec892c1 to your computer and use it in GitHub Desktop.
Save fedden/a4ae1555cb7be03c8f2f16bbdec892c1 to your computer and use it in GitHub Desktop.
population_size = 100
mutation_rate = 0.1
amount_iterations = 1000
amount_experiments = 50
elitism = 0.1
data = run_experiments(population_size,
mutation_rate,
elitism,
amount_iterations,
amount_experiments)
amount_iters_to_complete = [d[1] for d in data]
print("var:", np.var(amount_iters_to_complete))
plt.hist(amount_iters_to_complete, bins=25)
plt.title("Histogram of steady state GA")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment