def initialize_pop(self):
        """Assigns indices to individuals in population."""
        self.toolbox.register("individual", self.generate)
        self.toolbox.register("population", tools.initRepeat,
                              list, self.toolbox.individual)
        self.population = self.toolbox.population(n=self._params['popsize'])
        if self._params['neighbours']:
            for i in range(len(self.population)):
                self.population[i].ident = i
                self.population[i].neighbours = list(
                    set(
                        [(i - x) % len(self.population)
                         for x in range(1, self._params['neighbours'] + 1)] +
                        [(i + x) % len(self.population)
                         for x in range(1, self._params['neighbours'] + 1)]
                    ))
        self.assign_fitnesses(self.population)