DEV Community

Cover image for From here Genetic Algorithms looks easieršŸ¤”
ProCode
ProCode

Posted on • Updated on

From here Genetic Algorithms looks easieršŸ¤”

In this writing I have tried to notedown the process of writing your first basic GAā€™sĀ Rather than going into the details.I have assumed that you have resources for learning it..If not stay tuned as I will be writing my next thing(whatever it is) with the details of Basic GA and its implementations.

[if you donā€™t know whatā€™s GA there are some links at the bottom you might be looking for]

Sometimes people find it very hard to understand the working this algorithm from an abstract view..but believe me it can be more interesting once you Understand the concept behind it..which includes the knowing its significanceĀ , its application and etcā€¦

Imagine a bunch of objects made by you is evolving and eventually growing a brain of themselves just infront of you..

Gave a grandpa kinda feelingĀ , didnā€™t it šŸ˜‚ā€¦seeing you grandchildren grow up!

=>The steps you should follow to master this algorithm!

(I assume you have done a pretty good homework about GA and know what is basically is.)
..First of all never try to mug up a singleĀ calculationĀ inĀ it!!!

Understand the core concepts of genetic algorithmā€¦You can google about the DARWINIAN GENETIC ALGORITHM and clear your concepts.

1 . After its done and you feel confident about it..Its time to get the first shock..TRY TO CODE OUT WHAT YOU JUST LEARNED IN THE DARWINIAN ALGORITHMā€¦

2 .I assume you are stuck nowā€¦.(if not good jobā€¦Iā€™m clapping šŸ‘ go to the bottom to see some interesting videos on genetic algorithms)

3 . Here comes the saviour step now!! Leave whatever project you are onĀ ..watch this type of videos in the provided link well for me this is the simplest you can refer to. https://youtu.be/bGz7mv2vD6g

  1. While watching the video try to compare that with your own project. Generally you can relate easilyĀ ā€¦Do same kinda stuff he is doing in this videoā€¦

5 . Note down every step and understand the purpose..

6 . While Writing your code, you can have a tons of error working with multiple classes..One thing you should never do is doubt the framework you are usingā€¦

7 . Try and debug the whole code. the time of completion can vary from several minutes to days depending on you effort and efficiencyā€¦

8 . But always imagine the moment you are done with the code and the objects are actually evolving infrontof you!! And eventually you will get to the end point..

9 . But to have a check on yourselves if you have understand it or not.. Write some other code using Genetic algoā€™s with other variations you can think of..

IF YOU MADE TO THE END

CONGRATULATIONS šŸŽ‰

Happy codingšŸ˜„šŸ˜„

Some interesting GA videos on YouTube..

1 . https://youtu.be/FKbarpAlBkw

2 . https://youtu.be/bGz7mv2vD6g

3 . https://youtu.be/9zfeTw-uFCw

4 . https://youtu.be/VnwjxityDLQ

Top comments (0)