def init_gene(self):
    for n in range((self.net_info.node_num + self.net_info.out_num)):
        type_num = (self.net_info.func_type_num if (n < self.net_info.node_num) else self.net_info.out_type_num)
        self.gene[n][0] = np.random.randint(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)
        for i in range(self.net_info.max_in_num):
            self.gene[n][(i + 1)] = (min_connect_id + np.random.randint((max_connect_id - min_connect_id)))
    self.check_active()
def init_gene(self):
    for n in range((self.net_info.node_num + self.net_info.out_num)):
        type_num = (self.net_info.func_type_num if (n < self.net_info.node_num) else self.net_info.out_type_num)
        self.gene[n][0] = np.random.randint(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)
        for i in range(self.net_info.max_in_num):
            self.gene[n][(i + 1)] = (min_connect_id + np.random.randint((max_connect_id - min_connect_id)))
    self.check_active()