code: public List<T> generateInitialPopulation(int populationSize, Random rng)
      {
          List<T> population = new ArrayList<T>(populationSize);
          for (int i = 0; i < populationSize; i++)
          {
              population.add(generateRandomCandidate(rng));
          }
          return Collections.unmodifiableList(population);
      }
docs: Randomly, create an initial population of candidates.  If some
  control is required over the composition of the initial population,
  consider the overloaded {@link #generateInitialPopulation(int,Collection,Random)}
  method.
  @param populationSize The number of candidates to randomly create.
  @param rng The random number generator to use when creating the random
  candidates.
  @return A randomly generated initial population of candidate solutions.