code: def _update_pop(self, pop_size):
          
          self.toolbox.generate()
          # simple bound checking
          for i in range(len(self.population)):
              for j in range(len(self.population[i])):
                  if self.population[i][j] > 1:
                      self.population[i][j] = 1
                  if self.population[i][j] < -1:
                      self.population[i][j] = -1
          self.assign_fitnesses(self.population)
          self.toolbox.update(self.population)
          self._model_count += len(self.population)
          return
docs: Updates population according to crossover and fitness criteria.