https://dl.acm.org/doi/10.1145/1274000.1274125
Genetic Algorithm Theory
Simple genetic Algorithm
at any time-step ( generation )
there is a population ( size N ) of binary strings 二进制串 ( length l )
use genetic operators(遗传算子) selection(选择) crossover(交叉) mutation(突变) to produce the next population
Producing the next population
- Select two items from the population.
- Cross them over to form an offspring 将它们杂交形成后代
- Mutate the offspring 使后代发生变异
- Insert the result into the new population
Markov chains 马尔科夫链
There are a finite number of possible populations of size N. The probability of producing a particular population in one generation,depends only on the population at the previous generation.
在一代中产生特定种群的概率只取决于上一代的种群。
This kind of random process is called a Markov chain. It can becharacterised by a transition matrix Q.(转移概率矩阵Q)
Populations as distributions
We can think of a population p as a distribution over the search space Ω.
p
k
p_k
pk is the proportion of copies of item k in the population.
p
k
p_k
pk是项目k的副本在种群中的比例。
That is, it is the number of copies of k divided by N.
The heuristic function 启发函数
If the current population is
p
p
p, then there is a certain probability of producing item k in the next generation.Call this probability
G
(
p
)
k
\mathcal{G}(p)_k
G(p)k.That is,
G
(
p
)
\mathcal{G}(p)
G(p)∈
Λ
\Lambda
Λ and
Λ
\Lambda
Λ can be thought of as a map
G
\mathcal{G}
G:
Λ
\Lambda
Λ →
Λ
\Lambda
Λ
which we call the heuristic function.
Random Heuristic Search 随机启发式搜索
An equivalent way of characterising a single generation of the Simple Genetic Algorithm is as follows:
- p p p is the current population
- Calculate G ( p ) \mathcal{G}(p) G(p).计算概率 G ( p ) \mathcal{G}(p) G(p)
- Take N random samples from G ( p ) \mathcal{G}(p) G(p).
- The sample is the next population.
The transition matrix 转移矩阵
If we know the heuristic function
G
\mathcal{G}
G, we can write down the transition matrix.
Q
q
,
p
=
N
!
∏
k
∈
Ω
(
G
(
p
)
k
)
N
q
k
(
N
q
k
)
!
Q_{q,p}=N!\prod_{k\in\Omega}\frac {(\mathcal{G}(p)_k)^{N_{q_k}}}{(N_{q_k})!}
Qq,p=N!∏k∈Ω(Nqk)!(G(p)k)Nqk
This is called a multinomial distribution.多项分布
The expected next population
The next population is a random variable. If
p
p
p is the current population,then we can calculate what the expected next population is.
This turns out to be simply
G
(
p
)
\mathcal{G}(p)
G(p).
The variance 方差
We can also ask for the variance of the distribution. It is:
1
−
G
(
p
)
T
G
(
p
)
N
\frac{1-\mathcal{G}(p)^\mathsf{T}\mathcal{G}(p)}{N}
N1−G(p)TG(p)
You can see that the variance decreases as N increases.
That means that for large population sizes,the next generation is likely to be close to
G
(
p
)
\mathcal{G}(p)
G(p).
To be continued…