mirror of
https://github.com/nature-of-code/noc-book-2
synced 2024-11-17 07:49:05 +01:00
Merge pull request #834 from nature-of-code/notion-update-docs
[Notion] Update docs
This commit is contained in:
commit
9dc2c5379e
1 changed files with 1 additions and 1 deletions
|
@ -312,11 +312,11 @@ console.log(s);</pre>
|
|||
<figcaption>Figure 9.4: Two examples of crossover from a random midpoint </figcaption>
|
||||
</figure>
|
||||
<p>Another possibility is to randomly select a parent for each character in the child string, as in Figure 9.5. You can think of this as flipping a coin six times: heads, take a character from parent A; tails, from parent B. This yields even more possible outcomes: <em>codurg</em>, <em>natine</em>, <em>n</em><em>otune</em>, and so on.</p>
|
||||
<p>This strategy won’t significantly change the outcome from the random midpoint method; however, if the order of the genetic information plays a role in the fitness function, you may prefer one solution over the other. Other problems may benefit more from the randomness introduced by the coin-flipping approach.</p>
|
||||
<figure>
|
||||
<img src="images/09_ga/09_ga_6.png" alt="Figure 9.5: Crossover with a coin-flipping approach ">
|
||||
<figcaption>Figure 9.5: Crossover with a coin-flipping approach </figcaption>
|
||||
</figure>
|
||||
<p>This strategy won’t significantly change the outcome from the random midpoint method; however, if the order of the genetic information plays a role in the fitness function, you may prefer one solution over the other. Other problems may benefit more from the randomness introduced by the coin-flipping approach.</p>
|
||||
<p>Once the child DNA has been created via crossover, an extra, optional process can be applied before adding the child to the next generation: <strong>mutation</strong>. This second reproduction stage is unnecessary in some cases, but it exists to further uphold the Darwinian principle of variation. The initial population was created randomly, ensuring a variety of elements at the outset. However, this variation is limited by the size of the population, and the variation narrows over time by virtue of selection. Mutation introduces additional variety throughout the evolutionary process.</p>
|
||||
<div class="half-width-right">
|
||||
<figure>
|
||||
|
|
Loading…
Reference in a new issue