Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
def test_initialize_population():
    pop = initialize_population(3)
    for bot in pop:
        simulator.pprint_bot(bot)
Ejemplo n.º 6
0
def test_initialize_population():
    pop = initialize_population(3)
    for bot in pop:
        simulator.pprint_bot(bot)