Answers.Body: <blockquote>
  <p>Should I have all paths as the population,</p>
  </blockquote>
  <p>No, this is not usually possible for more realistic problems where a population that covered all possibilities would be far too large to manage.</p>
  <blockquote>
  <p>or should I create a population same size as the nodes(17).</p>
  </blockquote>
  <p>No, there is no need to link the population size to other properties of the problem so directly.</p>
  <p>If your path must pass through all 17 nodes (like a travelling salesman problem) then your genome coding might have 17 elements to it, and could simply be the path through the nodes. That's not the only way to address even the TSP, and may not be the case here. However, I mention it because it is common that numerical features of the problem will influence the design of the genomes.</p>
  <p>The population size is a hyperparameter for the solution, along with mutation rate, rules for recombination etc. It is something you will want to experiment with.</p>
  <p>With 3000 combinations to assess, a direct search of all combinations would be fast and effective (and probably easier to code). My understanding is therefore that this is a learning exercise. Your eventual goal might be to have the genetic algorithm find a good solution with less than 3000 evaluations of the path. Finding a good solution in any number of iterations is also a reasonable start to demonstrate you have understood the basics of genetic algorithms.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-03T12:58:33.027Z
Answers.LastActivityDate: 2021-07-03T12:58:33.027Z
Answers.UserDisplayName: Neil Slater
Body: <p>I have 17 nodes in my network with 3000 different paths in total. I have to select the path with highest available bandwidth, using genetic algorithm. I'm confused about the approach! Should I have all paths as the population, or should I create a population same size as the nodes(17).</p>
  
Tags: <genetic-algorithms><genetic-programming><path-finding>
Title: What exactly is the population in the problem of finding the best path in a network of nodes using genetic algorithms?
UserDisplayName: shadi
ThreadText: # What exactly is the population in the problem of finding the best path in a network of nodes using genetic algorithms?
  
  (Asked by: username_0 on 2021-07-03)
  
  I have 17 nodes in my network with 3000 different paths in total. I have to select the path with highest available bandwidth, using genetic algorithm. I'm confused about the approach! Should I have all paths as the population, or should I create a population same size as the nodes(17).
  
  **Tags:** genetic-algorithms, genetic-programming, path-finding
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-07-03. Score: 1
  
  > Should I have all paths as the population,
  
  No, this is not usually possible for more realistic problems where a population that covered all possibilities would be far too large to manage.
  
  > or should I create a population same size as the nodes(17).
  
  No, there is no need to link the population size to other properties of the problem so directly.
  
  If your path must pass through all 17 nodes (like a travelling salesman problem) then your genome coding might have 17 elements to it, and could simply be the path through the nodes. That's not the only way to address even the TSP, and may not be the case here. However, I mention it because it is common that numerical features of the problem will influence the design of the genomes.
  
  The population size is a hyperparameter for the solution, along with mutation rate, rules for recombination etc. It is something you will want to experiment with.
  
  With 3000 combinations to assess, a direct search of all combinations would be fast and effective (and probably easier to code). My understanding is therefore that this is a learning exercise. Your eventual goal might be to have the genetic algorithm find a good solution with less than 3000 evaluations of the path. Finding a good solution in any number of iterations is also a reasonable start to demonstrate you have understood the basics of genetic algorithms.
  
  
  ---
  
  