遗传算法训练神经网络
Many people use genetic algorithms as unsupervised algorithms, to optimize agents in certain environments, but do not realize that the implementation of neural networks into the agents as a possibility.
许多人将遗传算法用作无监督算法,以在某些环境中优化代理,但没有意识到将神经网络实施到代理中的可能性。
什么是遗传算法? (What are genetic algorithms?)
Genetic Algorithms are a type of learning algorithm, that uses the idea that crossing over the weights of two good neural networks, would result in a better neural network.
遗传算法是一种学习算法,其使用这样的思想:跨越两个良好的神经网络的权重将产生一个更好的神经网络。
The reason that genetic algorithms are so effective is because there is no direct optimization algorithm, allowing for the possibility to have extremely varied results. Additionally, they often come up with very interesting solutions that often give valuable insight into the problem.
遗传算法之所以如此有效,是因为没有直接的优化算法,从而可能产生极为不同的结果。 此外,他们经常想出非常有趣的解决方案,这些解决方案通常可以为问题提供有价值的见解。
它们如何工作? (How do they work?)
A set of random weights are generated. This is the neural network of the first agent. A set of tests are performed on the agent. The agent receives a score based on the tests. Repeat this several times to create a population.Select the top 10% of the population to be available to crossover. Two random parents are chosen from the top 10% and their weights are crossover. Every time a crossover occurs, there is a small chance of mutation: That is a random value that is in neither of the parent’s weights.
生成一组随机权重。 这是第一个代理的神经网络。 在代理上执行了一组测试。 代理会根据测试获得分数。 重复几次以创建种群。选择种群的前10%以进行交叉。 从最高的10%中选择两个随机的父母,他们的权重是交叉的。 每次发生交叉时,发生突变的可能性都很小:这是一个随机值,它不受父母的影响。
This process slowly optimizes the agent’s performance, as the agents slowly adapt to the environment.
随着代理慢慢适应环境,此过程将缓慢优化代理的性能。
的优点和缺点: (Advantages and Disadvantages:)
Advantages:
优点:
- Computationally not intensive 计算不密集
There are no linear algebra calculations to be done. The only machine learning calculations necessary are forward passes through the neural networks. Because of this, the system requirements are very broad, as compared to Deep Neural Networks.
没有线性代数计算要完成。 唯一必要的机器学习计算是通过神经网络的正向传递。 因此,与深度神经网络相比,系统要求非常广泛。
- Adaptable 适应性强
One could adapt and insert many different tests and ways to manipulate the flexible nature of genetic algorithms. One could