Answers.Body: <blockquote>
    <p>What is the order of the genetic operations in NEAT?</p>
  </blockquote>
  
  <ol>
  <li>You start by evaluating all of the initial neural networks and compute their initial fitness. </li>
  <li>Then you speciate, </li>
  <li>kill off the worst neural networks,</li>
  <li>mutate and crossover to produce offspring, and</li>
  <li>evaluate again. </li>
  </ol>
  
  <p>The order of events is described on page 109 onwards <a href="http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf" rel="nofollow noreferrer">in the original NEAT paper</a>.</p>
  
  <blockquote>
    <p>Which neural networks are killed (or not) at each generation?</p>
  </blockquote>
  
  <p>The neural networks with the worst performance are killed off after speciation. None of the neural networks survive - the entire population is replaced with the offspring of the nets remaining after the culling stage. That said, you can implement <a href="https://en.wikipedia.org/wiki/Genetic_algorithm#Elitism" rel="nofollow noreferrer">elitism</a>, where you keep some small portion of the best-performing nets and carry them over to the next generation without mutating them, but that is optional.</p>
  
  <blockquote>
    <p>Who is being mutated and at what point?</p>
  </blockquote>
  
  <p>At the end of each generation, after speciation and culling. To produce offspring, some of the remaining nets are subjected to mutation (think asexual reproduction - like single-celled organisms - but the offspring is mutated so that it differs from the parent). The rest are subjected to crossover in random pairs, so this would be the equivalent of sexual reproduction where you need two parents.</p>
  
  <p>Hope that helps.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-26T10:35:12.123Z
Answers.LastActivityDate: 2019-10-13T01:27:44.530Z
Answers.LastEditDate: 2019-10-13T01:27:44.530Z
Answers.UserDisplayName: cantordust
Body: <p>I was trying to implement NEAT, but I got stuck at the speciating of my clients/genomes.</p>
  
  <p>What I got so far is:</p>
  
  <ol>
  <li>the distance function implemented,</li>
  <li>each genome can mutate nodes/connections,</li>
  <li>two genomes can give birth to a new genome.</li>
  </ol>
  
  <p>I've read a few papers, but none explicitly explains in what order what step is done. What is the order of the genetic operations in NEAT?</p>
  
  <p>I know that for each generation, all the similar genomes will be put together into one species. </p>
  
  <p>I have other questions related to NEAT.</p>
  
  <p>Which neural networks are killed (or not) at each generation?</p>
  
  <p>Who is being mutated and at what point?</p>
  
  <p>I know that these are a lot of questions, but I would be very happy if someone could help me :)</p>
  
Tags: <evolutionary-algorithms><neat><neuroevolution>
Title: What is the order of the genetic operations in NEAT?
UserDisplayName: Finn Eggers
ThreadText: # What is the order of the genetic operations in NEAT?
  
  (Asked by: username_0 on 2018-06-20)
  
  I was trying to implement NEAT, but I got stuck at the speciating of my clients/genomes.
  
  What I got so far is:
  
  1. the distance function implemented,
  2. each genome can mutate nodes/connections,
  3. two genomes can give birth to a new genome.
  
  I've read a few papers, but none explicitly explains in what order what step is done. What is the order of the genetic operations in NEAT?
  
  I know that for each generation, all the similar genomes will be put together into one species.
  
  I have other questions related to NEAT.
  
  Which neural networks are killed (or not) at each generation?
  
  Who is being mutated and at what point?
  
  I know that these are a lot of questions, but I would be very happy if someone could help me :)
  
  **Tags:** evolutionary-algorithms, neat, neuroevolution
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-06-26. Score: 0 | Accepted answer
  
  > What is the order of the genetic operations in NEAT?
  
  1. You start by evaluating all of the initial neural networks and compute their initial fitness.
  2. Then you speciate,
  3. kill off the worst neural networks,
  4. mutate and crossover to produce offspring, and
  5. evaluate again.
  
  The order of events is described on page 109 onwards [in the original NEAT paper](http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf).
  
  > Which neural networks are killed (or not) at each generation?
  
  The neural networks with the worst performance are killed off after speciation. None of the neural networks survive - the entire population is replaced with the offspring of the nets remaining after the culling stage. That said, you can implement [elitism](https://en.wikipedia.org/wiki/Genetic_algorithm#Elitism), where you keep some small portion of the best-performing nets and carry them over to the next generation without mutating them, but that is optional.
  
  > Who is being mutated and at what point?
  
  At the end of each generation, after speciation and culling. To produce offspring, some of the remaining nets are subjected to mutation (think asexual reproduction - like single-celled organisms - but the offspring is mutated so that it differs from the parent). The rest are subjected to crossover in random pairs, so this would be the equivalent of sexual reproduction where you need two parents.
  
  Hope that helps.
  
  
  ---
  
  