def size(self):
        '''Returns genome 'complexity', taken to be (number of nodes, number of enabled connections)'''
        num_enabled_connections = sum([1 for cg in self.connections.values() if cg.enabled is True])
        return len(self.nodes), num_enabled_connections
def size ( self ) : num_enabled_connections = sum ( [ 1 for cg in self . connections . values ( ) if cg . enabled is True ] ) return len ( self . nodes ) , num_enabled_connections
Returns genome 'complexity', taken to be (number of nodes, number of enabled connections)