Ejemplo n.º 1
0
	def get_clone(self, genome):
		# Create a child
		child = Genome(weight_mutation=self.weight_mutation, input_nodes=self.inputs, output_nodes=self.outputs, genome_id=self.genome_id)
		self.genome_id += 1

		# Copy the parents genes to the child
		child.connection_genes = copy.deepcopy(genome.connection_genes)
		child.node_genes = copy.deepcopy(genome.node_genes)
		child.global_node_id = copy.copy(genome.global_node_id)

		# I dont have to mutate the child, it will be mutated all together.

		return child