Answers.Body: <p>Yes, you select the same individual multiple times, according to the distribution of fitness values. Typically, you have at least as many offspring as parents, so if you didn't replace parents in the pool to be potentially selected again, you'd just have every parent being selected once, which defeats the purpose of selection. You want fitter parents to be selected more often so that you drive the average fitness higher across generations.</p>
  
  <p>That said, there are no iron clad rules. There are algorithms that create selection pressure in other ways, and you can do whatever works for you. But in the canonical version of a GA, you do selection with replacement. Though, many people find other selection schemes like tournament selection perform better across a pretty wide range of problems than roulette wheel anyway.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-22T16:48:58.490Z
Answers.Text: ok thanks, but then if the parents are selected multiple times then they might crossover with themselves resulting in variation... is that also ok? i am programming my second ever genetic algorithm and im quite new at ai so sorry for the many questions but i have another one. So im making a tic tac toe ai just to like show the power of ai anyway what im doing is picking 2 random creatures at a time and then having them play against each other and add to their score according to how the play and then wanting to apply roulette selection, crossover the selected until i have a full population*
Answers.UserDisplayName: Philogy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-22T16:49:48.913Z
Answers.Text: *and repeat is this a good way of doing it?
Answers.UserDisplayName: Philogy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-23T17:49:22.740Z
Answers.Text: Yep, they very well might crossover with themselves, in which case you get offspring equal to the parents. That's fine. It's also fine to prohibit that though. There are common motifs in GAs, but there's no strict guidelines other than "do whatever works" based on experience and experimentation. A simple GA that uses roulette wheel with replacement, simple crossovers like 1-point or 2-point, and bitwise mutation is a very common starting point. Just note there are likely to be many better performing options once you get more of a grounding in the area.
Answers.UserDisplayName: deong
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-22T16:41:36.730Z
Answers.LastActivityDate: 2017-10-22T16:41:36.730Z
Answers.UserDisplayName: deong
Body: <p>Does <em>fitness proportionate selection</em> select multiple individuals?</p>
  <p>So, I read on Wikipedia and on multiple Stack Exchange threads about fitness proportionate selection or rather <em>roulette selection</em>, but what I don't understand is, how do I not select multiple times the same individuals? Should I pop them from my array and recalculate the probabilities or after selection remove duplicates? Or is there some sort of purpose for having multiple of the same selected?</p>
  
Tags: <genetic-algorithms><evolutionary-algorithms><genetic-operators><selection-operators><fitness-proportionate-selection>
Title: Does fitness proportionate selection select multiple individuals?
UserDisplayName: Philogy
ThreadText: # Does fitness proportionate selection select multiple individuals?
  
  (Asked by: username_0 on 2017-10-22)
  
  Does *fitness proportionate selection* select multiple individuals?
  
  So, I read on Wikipedia and on multiple Stack Exchange threads about fitness proportionate selection or rather *roulette selection*, but what I don't understand is, how do I not select multiple times the same individuals? Should I pop them from my array and recalculate the probabilities or after selection remove duplicates? Or is there some sort of purpose for having multiple of the same selected?
  
  **Tags:** genetic-algorithms, evolutionary-algorithms, genetic-operators, selection-operators, fitness-proportionate-selection
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-10-22. Score: 2 | Accepted answer
  
  Yes, you select the same individual multiple times, according to the distribution of fitness values. Typically, you have at least as many offspring as parents, so if you didn't replace parents in the pool to be potentially selected again, you'd just have every parent being selected once, which defeats the purpose of selection. You want fitter parents to be selected more often so that you drive the average fitness higher across generations.
  
  That said, there are no iron clad rules. There are algorithms that create selection pressure in other ways, and you can do whatever works for you. But in the canonical version of a GA, you do selection with replacement. Though, many people find other selection schemes like tournament selection perform better across a pretty wide range of problems than roulette wheel anyway.
  
  > **Comments:**
  > **username_0**: ok thanks, but then if the parents are selected multiple times then they might crossover with themselves resulting in variation... is that also ok? i am programming my second ever genetic algorithm and im quite new at ai so sorry for the many questions but i have another one. So im making a tic tac toe ai just to like show the power of ai anyway what im doing is picking 2 random creatures at a time and then having them play against each other and add to their score according to how the play and then wanting to apply roulette selection, crossover the selected until i have a full population*  
  > **username_0**: *and repeat is this a good way of doing it?  
  > **username_1**: Yep, they very well might crossover with themselves, in which case you get offspring equal to the parents. That's fine. It's also fine to prohibit that though. There are common motifs in GAs, but there's no strict guidelines other than "do whatever works" based on experience and experimentation. A simple GA that uses roulette wheel with replacement, simple crossovers like 1-point or 2-point, and bitwise mutation is a very common starting point. Just note there are likely to be many better performing options once you get more of a grounding in the area.  
  
  ---
  
  