title: How can a sorting network for 10 elements be built by using genetic algorithm?
body: <p>Optimizing for number of comparisons, while sorting correctly, I thought</p>
  
  <pre><code>Parameter 0: number of comparisons
  
  Parameter 1: index of element 1 to compare 0
  Parameter 2: index of element 2 to compare 0
  Parameter 3: index of element 1 to compare 1
  Parameter 4: index of element 2 to compare 1
  ..
  Parameter 997: index of element 1 to compare N-1
  Parameter 998: index of element 2 to compare N-1
  </code></pre>
  
  <p>should work if compare-and-swap is done from top to bottom in fitness function but there are many unused parameters if parameter 0 is around 15-20. What can be an efficient way to pick parameters such that they both control number of comparisons and not leave anything unused? Or does it need manually picking number of comparisons(and parameters) and check if it can find a minima?</p>
  
  <p>Also I'm not sure if a genetic algorithm can optimize another genetic algorithm when search space limits are unknown or become much slower than trying manually optimizing genetic algorithm.</p>