def neutral_mutation(self, mutation_rate=0.01):
    for n in range((self.net_info.node_num + self.net_info.out_num)):
        t = self.gene[n][0]
        type_num = (self.net_info.func_type_num if (n < self.net_info.node_num) else self.net_info.out_type_num)
        if ((not self.is_active[n]) and (np.random.rand() < mutation_rate) and (type_num > 1)):
            self.gene[n][0] = self.__mutate(self.gene[n][0], 0, type_num)
        col = np.min((int((n / self.net_info.rows)), self.net_info.cols))
        max_connect_id = ((col * self.net_info.rows) + self.net_info.input_num)
        min_connect_id = ((((col - self.net_info.level_back) * self.net_info.rows) + self.net_info.input_num) if ((col - self.net_info.level_back) >= 0) else 0)
        in_num = (self.net_info.func_in_num[t] if (n < self.net_info.node_num) else self.net_info.out_in_num[t])
        for i in range(self.net_info.max_in_num):
            if (((not self.is_active[n]) or (i >= in_num)) and (np.random.rand() < mutation_rate) and ((max_connect_id - min_connect_id) > 1)):
                self.gene[n][(i + 1)] = self.__mutate(self.gene[n][(i + 1)], min_connect_id, max_connect_id)
    self.check_active()
    return False
def neutral_mutation(self, mutation_rate=0.01):
    for n in range((self.net_info.node_num + self.net_info.out_num)):
        t = self.gene[n][0]
        type_num = (self.net_info.func_type_num if (n < self.net_info.node_num) else self.net_info.out_type_num)
        if ((not self.is_active[n]) and (np.random.rand() < mutation_rate) and (type_num > 1)):
            self.gene[n][0] = self.__mutate(self.gene[n][0], 0, type_num)
        col = np.min((int((n / self.net_info.rows)), self.net_info.cols))
        max_connect_id = ((col * self.net_info.rows) + self.net_info.input_num)
        min_connect_id = ((((col - self.net_info.level_back) * self.net_info.rows) + self.net_info.input_num) if ((col - self.net_info.level_back) >= 0) else 0)
        in_num = (self.net_info.func_in_num[t] if (n < self.net_info.node_num) else self.net_info.out_in_num[t])
        for i in range(self.net_info.max_in_num):
            if (((not self.is_active[n]) or (i >= in_num)) and (np.random.rand() < mutation_rate) and ((max_connect_id - min_connect_id) > 1)):
                self.gene[n][(i + 1)] = self.__mutate(self.gene[n][(i + 1)], min_connect_id, max_connect_id)
    self.check_active()
    return False