Genetic Algorithm to Optimise Schaffer's F6 Function

버전 1.2.0.0 (219 KB) 작성자: Dean Kayton
A basic GA with a real-time plotting of evaluation funtion inputs and outputs
다운로드 수: 1.7K
업데이트 날짜: 2013/4/14

라이선스 보기

I'm pretty sure I have this working correctly. Please fiddle with the GA inputs to tweak the speed of convergence, etc. And let me know if it runs correctly.

I'm really new to MATLAB (and all programming really). This Genetic Algorithm (GA) was used to validate the one I used in my university final year project (I will update that when it's done, just having difficulties with penalty functions or equivalent procedures).

**For those unfamiliar with genetic algorithms...**

My humble offering is one of the most basic genetic algorithms, a foundation to what's being researched at the moment. [You can learn the basics of GAs in 5-minutes](http://www.obitko.com/tutorials/genetic-algorithms/). There are many more advanced tweaks which have been developed through the years (One of the most established adapted GAs goes by the name NSGA-II by [Deb, et al](http://www.iitk.ac.in/kangal/deb_research.shtml). If you would like to see more current GA (and more generally Multi-Objective Evolutionary Algorithms) I recommend looking at [Coello Coello's Repository](http://delta.cs.cinvestav.mx/~ccoello/EMOO/EMOOsoftware.html)

Shaffer's F6 function is a testing function which includes many oscillations/peaks which is difficult for hill-climbing techniques to converge to (the peaks are known as local optima). The F6 function is designed to have its peak at the origin with a value of one. Included in the download is 'f6Surfaces.m' which includes a 3D surface (x-parameter, y-parameter and evaluation function values) as well as a 2D plot (y-value set to equal it's optimal zero, with x-values being plotted against evaluation function values).

Please, if anyone can find an error or a way to speed up my code, I'd be very grateful. Any questions, I'll try my best to answer. If there's anything I've left out or you would like me to include, please let me know and I'll update this description or get in contact with you.

**EDIT** Code updated to include subplots (just worked it out) so everything looks a little more suave (**as can be seen in the snapshot or accessed as part of the submission**). I have also plotted each population and evaluation function values with reference to the 2D and 3D evaluation function surface plot so you can see how the population evolves over the generations.

인용 양식

Dean Kayton (2024). Genetic Algorithm to Optimise Schaffer's F6 Function (https://www.mathworks.com/matlabcentral/fileexchange/41252-genetic-algorithm-to-optimise-schaffer-s-f6-function), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Genetic Algorithm에 대해 자세히 알아보기
도움

받음: dec2gc.m, gc2dec

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Activated ranking which is shown to decrease convergence times for this application

1.1.0.0

Added an aside - linking to an example of a more compicated algorithm created by someone else

1.0.0.0