• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

alpsayin/genetic-algorithm-matlab: A very simple Genetic Algorithm implementatio ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

alpsayin/genetic-algorithm-matlab

开源软件地址(OpenSource Url):

https://github.com/alpsayin/genetic-algorithm-matlab

开源编程语言(OpenSource Language):

MATLAB 100.0%

开源软件介绍(OpenSource Introduction):

genetic-algorithm-matlab

A very simple Genetic Algorithm implementation for matlab, easy to use, easy to modify and runs fast. Even has some visualization too.

To Run

Run the FunctionOptimization script.

To Modify Optimization Function

Replace your own function into EvaluateIndividual.m script. Note that this genetic algorithm tries to maximise the output so invert your function according to your needs. Right now it tries to locate the peak of a double variable function. It can be adjusted to optimize for more than two variable functions.

To Modify Genetic Algorithm Parameters

  • All the parameters are located in the FunctionOptimization.m script.
  • populationSize -> number of individuals in a population
  • numberOfGenes -> number of bits per chromosome
  • crossoverProbability -> probability that a crossover will happen between two individuals
  • mutationProbability -> probability that a mutation will occur in an individual
  • tournamentSelectionParameter -> parameter that's used to calculate the probabilities for individuals to be chosen in a tournament -> 'p*(1-p)^k' where k denotes the k'th worst individual in the tournament pool
  • variableRange -> the range in which the genes will be decoded into. basically minimum and maximum values of the parameters
  • numberOfGenerations -> number of iterations to run genetic algorithm
  • numberOfVariables -> number of variables stored in one chromosome
  • tournamentSize -> this value determines the number of individuals to be taken into a tournament. an individual of this pool is then chosen for mating with a probability calculated from tournamentSelectionParameter
  • numberOfReplications -> after a generation is run, this number of best individuals are copied back into the population to ensure the solution quality does not degrade
  • verbose -> if true; progress is printed
  • draw_plots -> if true; progress is plotted

Unit Tests

They are simply there to test the individual methods/steps of the genetic algorithm. Can be used for debugging.

Licensing Stuff

Please dont remove my name from the codes.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
kuhnLIN/GA_PSO: MATLAB发布时间:2022-08-17
下一篇:
jschwizer99/plot2svg: Save MATLAB plots as svg files发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap