电场 大学_人工电场优化算法

本文探讨了人工电场优化算法,并将其应用于大学教学场景中,结合算法在python和java中的实现,展示了如何利用这种算法解决实际问题。同时,也提及了该算法在人工智能领域的潜在价值,特别是通过解决LeetCode等编程挑战来提升学生的能力。
摘要由CSDN通过智能技术生成

电场 大学

Artificial Electric Field Algorithm in short ‘AEFA’ is an artificially intelligent optimization algorithm for mathematical optimization, it is inspired by the Coulomb’s law of electrostatic force. AEFA is also a population-based optimization algorithm. Like other population-based search techniques, it also generates a random population as an initial solution. Then the generated population moves in the influence of the governing forces calculated from Coulomb’s law of electrostatic forces. To understand this algorithm, suppose, we wish to solve:

人工电场算法的简称“ AEFA”是一种用于数学优化的人工智能优化算法,它受到库仑 静电力 定律的启发。 AEFA还是基于人口的优化算法。 像其他基于人口的搜索技术一样,它还会生成一个随机人口作为初始解决方案。 然后,生成的种群在根据库仑静电力定律计算出的控制力的影响下移动。 假设要理解此算法,我们希望解决:

Image for post

Where each variable has some lower and upper bound. (It may be extended to constrained optimization problems as well).

每个变量都有上限和下限。 (它也可以扩展到受约束的优化问题)。

The following mechanism is used to generate the initial population is used:

以下机制用于生成使用的初始种群:

Image for post

Each generated solution is called here as a charged particle. Now the idea of AEFA is created from the following laws:

每个生成的溶液在此称为带电粒子。 现在,AEFA的概念是根据以下法律创建的:

Image for post
Image for post

This calculates the force of attraction or repulsion between two charged particles. Here K is the artificial designed Quolomb’s constant which is a function of the iter (current iteration)and the max iterations (maxiter)

这将计算两个带电粒子之间的吸引或排斥力。 这里K是人为设计的Quolomb常数,它是iter(当前迭代)和max迭代(maxiter)的函数

The generated electric field around any charge Q is calculated as

围绕电荷Q生成的电场计算为

Image for post

Finally, the acceleration can be calculated using Newton’s law of force (F=Ma)

最后,可以使用牛顿力定律(F = Ma)计算加速度

Image for post

In this way, one may calculate the acceleration of all the charged particles initially generated. This acceleration is going to be the major influence for the update of all the particles in every iteration.

以此方式,可以计算最初产生的所有带电粒子的加速度。 该加速度将成为每次迭代中所有粒子更新的主要影响力。

The influence of charged particles on other particles
The Influence of charged particle on other particles
带电粒子对其他粒子的影响

This influence can easily be understood as: suppose we generated five-positions randomly and named them Q1…Q5. Now using the above three equations one may calculate the exerted force of one charged particle on the other particles, i.e. we have the value of F generated by each charge and then by using E=F/Q and a=F/m we can calculate the acceleration of every charged particle. Since this concept is artificially used to generate influence for the movement of the positions, therefore, the artificial value of the charge is defined here which is

这种影响很容易理解为:假设我们随机生成五个位置,并将它们命名为Q1…Q5。 现在,使用以上三个方程式,可以计算一个带电粒子对其他粒子的作用力,即,我们具有每次电荷生成的F值,然后使用E = F / Q和a = F / m可以计算出每个带电粒子的加速度。 由于此概念是人为地用于对位置的移动产生影响,因此,此处定义了电荷的人为值,即

Image for post

where qi is the charge of each particle best is the best and worst are the best fit and worst fit charged particle which are very simple to calculate, if the problem is of minimization then the particle which has the minimal value in the generated solution is the best, similar for the worst and fit_pi is the fitness value of the ith particle for which we are calculating the charge.

其中qi是每个粒子的电荷最好的是最好的,最差的是最佳拟合和最差拟合的带电粒子,它们非常容易计算,如果问题是最小化,则在生成的溶液中值最小的粒子是最好,与最坏情况相似,fit_pi是我们要为其计算电荷的第i个粒子的适应度值。

Image for post
Pseudo Code of the AEFA
AEFA的伪代码
Image for post
The behavior of the Electric Field on the Various Benchmark functions
各种基准功能下的电场行为

The code scripts are:

代码脚本为:

The detailed code scripts are available at:

详细的代码脚本可在以下位置获得:

https://in.mathworks.com/matlabcentral/fileexchange/71218-aefa-artificial-electric-field-algorithm

https://in.mathworks.com/matlabcentral/fileexchange/71218-aefa-artificial-electric-field-algorithm

More details can be found at:

可以在以下位置找到更多详细信息:

Anita, and Anupam Yadav. “AEFA: Artificial Electric Field Algorithm for Global Optimization.” Swarm and Evolutionary Computation, vol. 48, Elsevier BV, Aug. 2019, pp. 93–108, doi:10.1016/j.swevo.2019.03.013.

Anita和Anupam Yadav。 “ AEFA:用于全局优化的人工电场算法。” 群与进化计算,第一卷。 48,Elsevier BV,2019年8月,第93-108页,doi:10.1016 / j.swevo.2019.03.013。

-Anupam

-阿努帕姆

翻译自: https://medium.com/artifical-mind/artificial-electric-field-algorithm-for-optimization-fb6f57f413b4

电场 大学

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值