genome.py
def add_node_mutation(self):
        """
        This method adds a node by modifying connection genes.
        In the add node mutation an existing connection is split and the new node placed where the old
        connection used to be. The old connection is disabled and two new connections are added to the genotype.
        The new connection leading into the new node receives a weight of 1, and the new connection leading
        out receives the same weight as the old connection.
        """
        # Get new_node id
        new_node = self.add_node_gene('hidden')
        # Get a random existing connection
        existing_connection = self._get_rand_connection_gene()

        # Create two connections to replace existing connection with new node in the middle
        self.add_connection_gene(existing_connection.in_node_id, new_node.id, weight=1)
        self.add_connection_gene(new_node.id, existing_connection.out_node_id, weight=existing_connection.weight)

        # disable original connection
        existing_connection.is_enabled = False

        This method adds a node by modifying connection genes.
        In the add node mutation an existing connection is split and the new node placed where the old
        connection used to be. The old connection is disabled and two new connections are added to the genotype.
        The new connection leading into the new node receives a weight of 1, and the new connection leading
        out receives the same weight as the old connection.
        
This method adds a node by modifying connection genes.
In the add node mutation an existing connection is split and the new node placed where the old
connection used to be. The old connection is disabled and two new connections are added to the genotype.
The new connection leading into the new node receives a weight of 1, and the new connection leading
out receives the same weight as the old connection.
This method adds a node by modifying connection genes . In the add node mutation an existing connection is split and the new node placed where the old connection used to be . The old connection is disabled and two new connections are added to the genotype . The new connection leading into the new node receives a weight of 1 and the new connection leading out receives the same weight as the old connection .
def add_node_mutation(self):
        new_node = self.add_node_gene('hidden')
        existing_connection = self._get_rand_connection_gene()
        self.add_connection_gene(existing_connection.in_node_id, new_node.id, weight=1)
        self.add_connection_gene(new_node.id, existing_connection.out_node_id, weight=existing_connection.weight)
        existing_connection.is_enabled = False
def add_node_mutation ( self ) : new_node = self . add_node_gene ( 'hidden' ) existing_connection = self . _get_rand_connection_gene ( ) self . add_connection_gene ( existing_connection . in_node_id , new_node . id , weight = 1 ) self . add_connection_gene ( new_node . id , existing_connection . out_node_id , weight = existing_connection . weight ) existing_connection . is_enabled = False
This method adds a node by modifying connection genes.
This method adds a node by modifying connection genes .
"""
        This method adds a node by modifying connection genes.
        In the add node mutation an existing connection is split and the new node placed where the old
        connection used to be. The old connection is disabled and two new connections are added to the genotype.
        The new connection leading into the new node receives a weight of 1, and the new connection leading
        out receives the same weight as the old connection.
        """ # Get new_node id # Get a random existing connection # Create two connections to replace existing connection with new node in the middle # disable original connection
self