From 8f5af40a5d84245fd51c9607c225928b5531b6b0 Mon Sep 17 00:00:00 2001 From: shiffman Date: Sun, 25 Feb 2024 02:08:46 +0000 Subject: [PATCH] Notion - Update docs --- content/09_ga.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/09_ga.html b/content/09_ga.html index f292d6e..d305bf3 100644 --- a/content/09_ga.html +++ b/content/09_ga.html @@ -312,11 +312,11 @@ console.log(s);
Figure 9.4: Two examples of crossover from a random midpoint 

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: codurg, natine, notune, and so on.

+

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.

Figure 9.5: Crossover with a coin-flipping approach 
Figure 9.5: Crossover with a coin-flipping approach 
-

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.

Once the child DNA has been created via crossover, an extra, optional process can be applied before adding the child to the next generation: mutation. 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.