Genetic Algorithm
- GA(Fitness, Fitness-threshold, $p, r, m$)
- Initialize: $P \leftarrow p$ random
hypotheses.
- Evaluate: for each $h$ in $P$, compute
$Fitness(h)$
- While [$max_{h}$ Fitness(h)] < Fitness-threshold do
- Select: Probabilistically select $(1-r)p$ members of $P$ to add to $P_{S}$, select each $h_i$ with probability
\[ \Pr(h_{i}) = \frac{Fitness(h_{i})}{\sum_{j=1}^{p} Fitness(h_{j})}
\]
- Crossover: Probabilistically select $\frac{r
\cdot p}{2}$ pairs of hypotheses from $P$. For each pair,
$\langle h_{1}, h_{2} \rangle$, produce two offspring by
applying the Crossover operator. Add all offspring to
$P_{s}$.
- Mutate: Invert a randomly selected bit in
$m\cdot p$ random members of $P_{s}$. $m$ is the mutation rate.
- Update: $P \leftarrow P_{s}$
- Evaluate: for each $h$ in $P$, compute $Fitness(h)$
- Return the hypothesis from $P$ that has the highest fitness.
José M. Vidal
.
2 of 18