Commit 6bb2adb1 authored by David A.. Werner's avatar David A.. Werner
Browse files

Complex Manduca used 7 legs when it was meant to use 5

parent 0e777f1a
......@@ -30,6 +30,14 @@ try:
histories.append(simulator.history)
simulator.update_fitness()
simulator.population[0].save('fittest_manduca_{}.npz'.format(idx))
# Run a simulation with Manduca rather than SimpleManduca
simulator = EvolutionSimulator(random_manduca, pool=pool,
evolution_parameters = evolution_parameters,
random_number_generator=rng, random_seed=0xBAD)
simulator.run_simulation(NUM_GENERATIONS)
simulator.update_fitness()
simulator.population[0].save('fittest_manduca_complex.npz')
# Run a simulation with other number of legs
for num_legs in [2,3,7]:
simulator = EvolutionSimulator(random_simple_manduca, pool=pool,
......@@ -38,13 +46,6 @@ try:
simulator.run_simulation(NUM_GENERATIONS)
simulator.update_fitness()
simulator.population[0].save('fittest_manduca_legs_{}.npz'.format(num_legs))
simulator = EvolutionSimulator(random_manduca, pool=pool,
evolution_parameters = evolution_parameters,
random_number_generator=rng, random_seed=0xBAD)
simulator.run_simulation(NUM_GENERATIONS)
simulator.update_fitness()
simulator.population[0].save('fittest_manduca_complex.npz')
finally:
pool.close()
pool.join()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment