def test_sigma(self): generation = Generation() genome_1 = Genome(generation, 1, 1) genome_2 = genome_1.copy_genome() # genome_1._add_node() genome_1._mutate_weights() genome_2._mutate_weights() for con in genome_1.connections(): print(con) print('-' * 20) for con in genome_2.connections(): print(con) print(sigma(genome_1, genome_2))
def test_excesses_and_disjoints(self): generation = Generation() genome_1 = Genome(generation, 1, 2) genome_2 = genome_1.copy_genome() viz.construct(genome_1, 'First Before') genome_1._add_node() genome_1._add_connection() for con in genome_1.connections(): print(con) viz.construct(genome_1, 'First') genome_2._add_node() viz.construct(genome_2, 'Second') E, D = _excesses_disjoints(genome_1, genome_2) print('-' * 20) for con in genome_2.connections(): print(con) print(f'Excesses: {E}') print(f'Disjoints: {D}')