Skip to content
← All questions

How large should the genetic-algorithm population be according to the video?

The video recommends using a large population size to initialize with a rich set of solutions. It cites a common guideline of setting the population size to 30 to 60 times the number of cities (nn). In the demo, a population size of 1000 is used for 30 cities.

Conditions

  • nn is the number of cities.
  • This is a heuristic guideline mentioned in the video, not a theorem proved here.
  • The context is the genetic-algorithm TSP implementation.

Reasoning, step by step

  1. Identify the need for a rich initial set of solutions.
  2. State the guideline: population size should be 30 to 60 times nn.
  3. Note the example value: 1000 for 30 cities.

Example

The narrator says the implementation uses a very large population size of one thousand and that some people suggest using 30 to 60 times the number of cities. The genetic-programming input panel shows "population size: 1000" and "numberOfCities: 30".

Common misconceptions

  • Assuming a small initial population is sufficient for the genetic algorithm.
  • Thinking that the population size guideline is a strict mathematical requirement rather than a heuristic.

Watch the explanation

Explore next

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.