def test_make_generation(): pop = initialize_population(3) gen = make_generation(pop, 3) assert len(gen) == 12 print gen for bot in gen: simulator.pprint_bot(bot) return gen
def test_make_generation(): pop = initialize_population(3) gen = make_generation(pop,3) assert len(gen) == 12 print gen for bot in gen: simulator.pprint_bot(bot) return gen
def test_bot_maker(): random.seed(103) bot = create_bot(genome_stop_probability=0.3) simulator.pprint_bot(bot) bot = funcname_mut(bot) simulator.pprint_bot(bot) bot = stockname_mut(bot) simulator.pprint_bot(bot) bot = wt_mut(bot) simulator.pprint_bot(bot) bot = remove_chromosone(bot) simulator.pprint_bot(bot)
def test_initialize_population(): pop = initialize_population(3) for bot in pop: simulator.pprint_bot(bot)