Thanks for stopping by! Today we will encounter a problem we can't easily solve with our normal algorithmic tools so we deep dive into a class of algorithms called: GENETIC ALGORITHMS! I hope you find it as interesting as I do. *What would you use them for?*
@DevOpsDirective4 жыл бұрын
I first learned about evolutionary algorithms from this TED talk www.ted.com/talks/bill_gross_a_solar_energy_system_that_tracks_the_sun/ Since then I have wanted to use them to write a program that attempts to learn how to write brainf***. BF seems like a good language choice since there are only a handful of symbols and writing/instrumenting an interpreter to also evaluate an objective function to feed back into the evolutionary algorithm would be simple! I haven't gotten around to it yet, but perhaps soon!
@Stopinvadingmyhardware Жыл бұрын
Thanks, you just helped me solved a vector problem I was having. Oddly, I didn’t even use an algorithm.
@rickyricardo753 ай бұрын
very interesting ! let us know if you applied this to trading !
@kx94733 жыл бұрын
This guy explained everything from 2 weeks long boring lecture in under 12 minutes with extremely clear explanation. I love you because you just saved my degree.
@KieCodes3 жыл бұрын
You are more than welcome my friend. 🙏 Rock on! 🚀
@Vaderir Жыл бұрын
2 hour’s lecture in 12mins how about that .
@Terra_Cognita Жыл бұрын
Do you know how he calculated the total number of combinations in a naive brute force approach? I did permutations and combinations and the values were not equal.
@Terra_Cognita Жыл бұрын
Never mind I figured it out, It is the sum of all possible (N chooses k) combinations k = 0, 1,..N which simplifies to 2^N
@mr.boomguy7 ай бұрын
This is why I love watching KZbin. Sure, 95% of the time is trivia and entertainment, but then you stumble upon things you either where looking for or not, and you learn them in minutes instead of the years it takes from professional lecturing. (Granted, processing that information is a whole other ordeal, but at least you have it on hand)
@xandrovich59763 жыл бұрын
I must say - the quality of this video is top-notch. The crisp editing, sound, and illustrations do a great job of demonstrating the point.
@KieCodes3 жыл бұрын
Thank you so much! 🙏
@sergioseco98354 жыл бұрын
this deserves a million views
@KieCodes4 жыл бұрын
Thanks Sergio 🙏
@michaelfekadu61163 жыл бұрын
I agree
@KieCodes3 жыл бұрын
Thank you. 🙏
@matt-g-recovers3 жыл бұрын
not joking!
@KieCodes3 жыл бұрын
@@matt-g-recovers Thanks as well! 😅
@evrmk2 жыл бұрын
Three 1.5-hour-long lectures in my university explained in 11 minutes. Thanks!
@abdullahsheriff_2 жыл бұрын
According to me, his video is THE BEST explanation on KZbin on Genetic Algorithms. My mates and I understood Genetic Algorithms like never before, loved it, and implemented it in our University Course Project. Thank you, Kie.
@KieCodes2 жыл бұрын
You are more than welcome! Enjoy your studies!
@adityagarg2185 Жыл бұрын
This video was AMAZING. I can't believe the amount of time and effort you took to explain this topic so clearly. It sucks that you stopped making videos. What can I do to motivate you to make an algorithm series?
@eddazzo3 жыл бұрын
Im a computer science degree student and this helps me to understand better on my final year project's topic! Thank you very much sir!
@KieCodes3 жыл бұрын
You are more than welcome my friend. 🙏 Rock on! 🚀
@willboler8303 жыл бұрын
Excellent video! One of the better selection algorithms and more typical is a tournament selection. Rather than choosing the best fitness genes for the next generation, each gene is given a probability of selection based on their fitness. Better genes have a higher probability of selection, and worse genes have a lower probability of selection, but the odds of selection are not 100% and 0% respectively. This takes a bit longer when it comes to finding a solution, but it gives a better search of the solution space.
@lohithkandukuri55792 жыл бұрын
SOOOOOOOO gooood.... Nobody could have been more concise and informative at the same time.
@KieCodes2 жыл бұрын
Thank you very much! 🙏🙏🙏
@subpixelsalt76484 жыл бұрын
Great video! I've been facinated by genetic algorithms after seeing people use it to beat levels in Super Mario Bros. There's just something so fascinating about watching a computer "learn" how to get better at doing something.
@KieCodes4 жыл бұрын
Thank you! I totally feel the same. It is modern magic. 🙃
@BehniaFB3 жыл бұрын
Every second I that goes, I realize more how complete this video is ! This vid should definitely have more than a million views .
@KieCodes3 жыл бұрын
Thank you so much!
@zacrobyte3 жыл бұрын
Yo dude, this is some next level way of teaching your channel should've had atleast 1 mil already
@KieCodes3 жыл бұрын
Thank you. 🙏 Maybe some day. Thanks again for the motivating words.
@kritagyagupta86193 жыл бұрын
Dude, Your videos are higher quality then Pewdiepie and Dream combined Not exaggerated I have literally understood a concept u have tried to learn from past 10 months
@KieCodes3 жыл бұрын
Thank you. 🙏 I am glad I could help. And thanks for your nice words. ☺️
@CristalMediumBlue Жыл бұрын
Toll. Das ist das beste Video, das ich bisher zu diesem Thema gesehen habe
@BehniaFB3 жыл бұрын
I've never imagined that one day Seth Rogen will be teaching me Algorithms😂 (Jokes aside this video was amazing and well-made; GOOD JOB!❤)
@colinmignot63093 жыл бұрын
you're great teacher. taking time to edit engaging videos with visuals like you do is very effective to help ppl grasp concepts
@KieCodes3 жыл бұрын
Thank you. 🙏
@TarunRavi4 жыл бұрын
Wow your video is awesome! You explained a pretty complex algorithm in a simple way. I've always wanted to use genetic algorithms for one of my videos, this is a fantastic intro to the field! btw I love your video quality, it looks soo good.
@KieCodes4 жыл бұрын
Thanks so much for your kind words. 🙏
@MeANDmyPETgoat4 жыл бұрын
Great video bro, helped me understand what my teacher's mumbling couldn't for our test, keep it up!
@KieCodes4 жыл бұрын
Thanks for your kind words. 🙏
@MaTrOoOoD4 жыл бұрын
After watching the video I opened the channel expecting to see millions of subscribers. You deserve much more!! What an awesome video. Simple and right to the main points! Keep up the good work!
@KieCodes4 жыл бұрын
Wow. Thanks for your kind and motivating words Mo. I will try my best. To be honest I wouldn’t be ready for millions of subs. Glad to hopefully hit a 1000 till 2021. Have a great day! 🙏
@KieCodes4 жыл бұрын
And thanks for subscribing! One sub closer. ☺️
@MaTrOoOoD4 жыл бұрын
@@KieCodes dude your videos are extraordinary! I couldn’t resist 🤷🏻♂️ Wish you best of luck man! Can’t tell you how happy and excited I am to see what you have next!
@aliticx3 жыл бұрын
Man I wish everyone explained concepts this good! Awesome video!
@KieCodes3 жыл бұрын
Thank you Aliticx. This comment really means a lot to me. 🙏 Having people to really understand what I try to explain is way more worth to me than subscribers and views. Thank you.
@georgeruellan4 жыл бұрын
Dude this video is amazing. Great explanation, I liked the real world example too. Your editing style is sick too! Can't wait to see more from you
@KieCodes4 жыл бұрын
Thanks George. This means a lot and is really motivating! Great to have you here. Rock on!
@SHUBHAMJHA-o3g29 күн бұрын
This is the hands down the best video on genetic algorithms!
@BraidyMerkle4 жыл бұрын
I have not yet had to use genetic algorithms, but want to try them out after watching this video! Thanks for the introduction!
@KieCodes4 жыл бұрын
Thanks Braidy! Let me know what you used them for. :)
@kr0tyara3 жыл бұрын
You are such an underrated gem. GOOD JOB!!!
@KieCodes3 жыл бұрын
Thank you. 🙏
@vasachisenjubean59443 жыл бұрын
man the effort you put in this video is - "Salute"
@KieCodes3 жыл бұрын
Thank you. 🙏
@seriouscoder17272 жыл бұрын
I,ve watched many clips in this regard but your explanation was one of a kind, absoulotlly deserve thousends of million of billion views
@KieCodes2 жыл бұрын
Wow. Thank you for your kind words! 🙏
@srinivaskollipara12934 жыл бұрын
this is awesome!!!!!!! I am a mechanical engineer with 0 knowledge in these type of algorithms but for the sake of a project on scheduling using the genetic algorithm I was surfing youtube, this is the best explanation I ever had and it is very clear if possible, please suggest algorithms similar to this which are good for job shop scheduling.
@Joselo091112 жыл бұрын
Fantastic explanation! I learned more in this video, than my professor
@KieCodes2 жыл бұрын
Great to hear! Thank you so much!
@marflage3 жыл бұрын
I can't thank you enough. Tomorrow's my AI exam and your video helped me prepare for it. I wish your channel explodes with magnitudes of subs. Thank you so much!
@KieCodes3 жыл бұрын
You are more than welcome my friend. 🙏 Rock on! 🚀 Good luck with your exam!
@marflage3 жыл бұрын
@@KieCodes thanks!
@taylan89734 жыл бұрын
I rarely leave a comment but your explanation is just amazing. Good job
@KieCodes4 жыл бұрын
Thanks Taylan! 🙏
@chaosrider1003 жыл бұрын
All is fine and useful from this video and I will recommend it to my students as a quick introduction, BUT this is not natural selection - it is called "directed" or "purposeful" selection. It is similar to what you have in ML for supervised learning - there is an aim (manifested by the elitist genomes)... Natural selection works aimlessly and randomly. The biggest difference between the two is the speed of convergence - as Natural selection is a notoriously slow process.
@KieCodes3 жыл бұрын
Thank you for the clarification! 🙏
@thop79642 жыл бұрын
Fantastic example. Really helps show how the conceptual steps actually work!
@KieCodes2 жыл бұрын
Thank you. 🙏
@1stpatrickha3 жыл бұрын
To be honest, this is the best video explained about this Genetic Algor concept. Quality contents. Keep going dude!
@KieCodes3 жыл бұрын
Thank you. 🙏
@mesticasamelapapna708 Жыл бұрын
Thank you for this Kie! I'm amazed that you use Genetic Algorithm to solve the Knapsack problem :)
@samidahdouh78639 ай бұрын
This is actually one of the best videos I've ever seen on KZbin. Thank you!
@KieCodes9 ай бұрын
Wow. Thank you. 🙏🎉
@marcellorossetticonti30022 жыл бұрын
Hi Kie, congratulations on the clarity of your explanation. It gave me some suggestions on how to improve the way I explain these algorithms. I work in Italy as a physics researcher and in my group we routinely employ these kinds of algorithms to optimize the performance of particle accelerators redesgning them (with a similar approach to the antenna problem you mentioned). I can confirm that they work wonders at solving systems whose dynamics are extremely complex (especially when due to highly correlated variables)! I wanted to tell you that in our code we apply elitism as the last thing (even following mutation) to be sure that the best fitness value never goes down in subsequent generations. If you apply mutation later, you risk losing the best solution from the previous cycle. Nothing catastrophic though, the genetic information to reconstruct the best solution is mixed in the rest of the population anyway and will probably re-emerge soon anyway.
@mgwyndolin4262 Жыл бұрын
Hi thanks for sharing your insight! It is very instructive and helps me clarify the confusion about the top performers of the previous generation being mutated instead of kept intact in the video. But this video really offers a great explanation.
@paragvadhiya80192 жыл бұрын
Video is on point, accurate and does not waste your time. Thanks so much man.
@KieCodes2 жыл бұрын
I really appreciate your kind words! 🙏
@arianalini8636 Жыл бұрын
how is it not booming yet?! thank u for the clear explanation + the awesome edits!
@r.ramirez15212 жыл бұрын
Please don't ever go away. This was amazing
@KieCodes2 жыл бұрын
Thank you. 🙏
@Copybook Жыл бұрын
I was really hard to digest it and I don't mean mathematically BTW, tomorrow I have an exam and you save my life, a blessing from an AI student
@DerClaudius3 жыл бұрын
Good overview. I would suggest a fitness function that goes negative for non-solutions, so even if you have no solution, because the problem is so hard, you still keep the genomes that are closest to a real solution. With having fitness=0 for all non-solutions, you can't distinguish how bad or close the genomes are.
@KieCodes2 жыл бұрын
Good idea! Thank you. 🙏
@sardororipov13023 жыл бұрын
I’m here before this channel get 1million subs. Keep up the great work man!
@KieCodes3 жыл бұрын
Thank you. 🙏
@diegocruz81874 жыл бұрын
This channel should have more subscribers! Really amazing video and explanation
@KieCodes4 жыл бұрын
Thanks Diego! 💪🙏
@fasaipuengudom54122 жыл бұрын
Best video regarding this topic. Very visual and easy to understand
@TheTehnigga2 жыл бұрын
Really well explained and cured, these are the kind of explanations that I prefer, there's love and dedication behind it. Thank you!
@KieCodes2 жыл бұрын
Thank you. 🙏
@mahdilatreche45013 жыл бұрын
This video is astonishing, you deserve a lot more views, keep up the good work :)
@KieCodes3 жыл бұрын
Thank you. 🙏
@annashchukina37683 жыл бұрын
This was an amazing introduction to the topic and great intuition. Thanks for the video! It was also fun to watch😄
@KieCodes3 жыл бұрын
Thank you. 🙏
@Mohamed_Shabaik Жыл бұрын
I don't usually make comments. but that was a really well-explained and interesting video, Thanks!
@zecool70414 жыл бұрын
really good explanation , better than most of videos that i have seen and better than my teacher's lecture , keep up the good work , greetings from algeria
@KieCodes4 жыл бұрын
Thank you for your kind words! Have a great day. 🙏
@daphnelenders42074 жыл бұрын
Thanks a lot for your explanation, looking forward to use genetic algorithms in the future!
@KieCodes4 жыл бұрын
Thank you. Have fun, its a great tool!
@daesk3 жыл бұрын
My teacher used 2 hours of class to explain what this man explained in 10 minutes, thanks
@KieCodes3 жыл бұрын
Thank you 🙏! Good luck for your studies. Take care.
@pedrocamunas56253 жыл бұрын
I can see english is not your first language but still your pronunciation is really clear, thumbs up
@KieCodes3 жыл бұрын
Thank you
@nishitpatel56863 жыл бұрын
one of the best videos on genetic algorithm
@KieCodes3 жыл бұрын
Thank you. 🙏
@hansergonzalez66462 жыл бұрын
What an amazing content, explained with simple words. Thanks and keep up the hard work.
@KieCodes2 жыл бұрын
Glad you liked it! Thank you!
@HarunFarah2 жыл бұрын
Great vid done a better job at explaining than a university lecturer
@KieCodes2 жыл бұрын
Thank you very much!
@ForTheOmnissiah Жыл бұрын
Wish you uploaded more. This is quality content.
@GlynisDance2 жыл бұрын
That was an excellent video. Clear, engaging, inspiring and fun! I will be watching more of your videos.
@KieCodes2 жыл бұрын
Thank you!
@AK-gx4fh3 жыл бұрын
Yey! now my mom can really know what i do for a living :)
@avixx7 күн бұрын
You showed this in a way easy to understand! Thanks!
@adinvella4665 Жыл бұрын
Very informative video; full of information yet very easy to follow. Thank you!
@TWFDeadzoneII4 жыл бұрын
Mind blowing. I can't wait to implement this.
@KieCodes4 жыл бұрын
It surely is. Have fun!
@rajathalexander4064 жыл бұрын
best possible explanation, became ur FAN
@KieCodes4 жыл бұрын
Thank you and welcome! 🙏
@sevdalink667611 ай бұрын
Whoah men! You fascinated me. What a level of explanation.
@KieCodes11 ай бұрын
Thank you. I hope it helped. 🙏🫡
@alvaroarcelus8949 Жыл бұрын
Amazingly explained!! Thank you so much. 🙌
@shouryaraj59134 жыл бұрын
Astonishing video! Thanks for sharing the incredible research papers. Looking forward to learn and explore more. Thanks
@KieCodes4 жыл бұрын
Thanks for you kind words! :)
@aaradhyanegi6399 ай бұрын
I've never learned anything in this way I love it!
@KieCodes9 ай бұрын
I am glad to hear that!
@Abdul-RafayHamid Жыл бұрын
Really well explained. I will appreciate it if you can make a project to solve time table scheduling problem with genetic algorithm.
@wahalaq364 жыл бұрын
You did a great job with this, two years ago i searched heaven and earth but didnt find a thing
@KieCodes4 жыл бұрын
Thanks a lot! Glad I could help.
@junbongzz05232 жыл бұрын
I recommend this video to those who wants to simply know what GA is in 10min!!
@KieCodes2 жыл бұрын
Thank you. 🙏
@ragabnadim Жыл бұрын
Thank you for the video, will recommand to my students
@АндрейВикторович-т1л3 жыл бұрын
You're awesome! I don't speak English as well, but your explanation is really good, and I understand the main idea!
@KieCodes3 жыл бұрын
Thank you. 🙏
@SuperNightmareID3 жыл бұрын
That booping noise had me checking my pc and phone every time lmao.
@KieCodes3 жыл бұрын
😅 sorry
@johntravolta26552 жыл бұрын
Greeting from Polish college. Wish you the best :)
@KieCodes2 жыл бұрын
Thank you! To you too.
@hoaralatoan8452 жыл бұрын
What a fantastic explanation! Clearly explain GA. Can you tell me what classical problem inspired you about the "backbag problem" in 0:23?
@KieCodes2 жыл бұрын
Hey. Thank you. The knabsack problem.
@yasminejas50077 ай бұрын
Thank you so much this video is very helpful for my thesis!
@KieCodes7 ай бұрын
Glad it was helpful! 🙏
@muhammadqaisarali3 жыл бұрын
Start with a Problem presentation is a great way to learn.
@KieCodes3 жыл бұрын
Thank you. 🙏
@muhammadqaisarali3 жыл бұрын
@@KieCodes welcome sir, it is a great video... Again heartiest thanks...
@KieCodes3 жыл бұрын
You are more than welcome my friend. 🙏 Rock on! 🚀
@SintaxErorr4 жыл бұрын
*The Best Solution* [Phone, Headphones,Baseball Cap,Laptop,Coffee Mug] Weight: 2980 grams *My Genetic Algorithm* [Phone,Headphones,Mints,Notepad,Tissues,Laptop] Weight: 2998 grams. ooop made one before watching your other video to test myself so not sure if you found this in that video. but this video is great
@KieCodes4 жыл бұрын
Thanks for your kind words! 🙏 and great effort implementing your own GA before watching my video. Amazing 💪
@michellesainos34433 жыл бұрын
Thank you!!! your explanation was very clear and awesome!! Definitely checking out the implementation
@KieCodes3 жыл бұрын
Thank you Michelle!🙏
@ouahidalalga94377 ай бұрын
Just Wow! Hats off to you, that's a great explanation.
@KieCodes6 ай бұрын
Thanks a lot!
@mcbot13443 жыл бұрын
Wow this is incredibly helpful for my exam. Keep up the good work! Greetings from Germany
@KieCodes3 жыл бұрын
Thank you for your kind words, Mc Bot. 🙏
@padmakarrao46813 жыл бұрын
"at some number of time, you won't just miss your flight, but the whole solar system will be gone" 🤣🤣🤣 I love this video...
@KieCodes3 жыл бұрын
Glad you liked it! 🙏
@ammarazlan29192 жыл бұрын
Thank you so much! Please do Clonal Selection Algorithm next please...!
@roct07 Жыл бұрын
This is so well explained
@yelamankarassay4 жыл бұрын
Great You helped me in my HW assignment.
@KieCodes4 жыл бұрын
You‘re welcome.
@LonleyGuns3 жыл бұрын
I like the way you explain algorithms.
@KieCodes3 жыл бұрын
Thank you for your kind words, LonleyGuns. 🙏 I put a lot of work into it. So that means a lot. What other algorithms are you interested in?
@LonleyGuns3 жыл бұрын
@@KieCodes Pattern search like Hooke Jeeves would be great. Also, new programmers face problem which approach to use: objective function or array as input values into optimisation problem. Would be great to hear some advices when to use which method.
@mikolajwojnicki21693 жыл бұрын
You seem to stress the importance of the crossover function, but for my problem I don't think it's doable because I need to always keep a constant number of 1's and 0's. I hope just using mutations in which two digits switch places is good enough.
@70ME3E3 жыл бұрын
yeah he left that part out where if you have an invariant, like in your problem that you have to keep, then there is a way genetic algos deal with that to restore the invariant after crossover. I think it should be a custom callback you can have the algo run when it's needed. the whole thing would not even work at all without crossover
@centarproduction76673 жыл бұрын
Great content! I'll subscribe now so I can later be salty in the comments how I was here when you only had 1320 subs :D
@KieCodes3 жыл бұрын
Thanks for being here centar! 🙏 I am looking forward to reading your salty comments later. 😅
@TheCzarsoham4 жыл бұрын
Great video! Exactly what I was looking for!
@KieCodes4 жыл бұрын
I am sooo glad it helped you! 🙏
@MohamedHassan-xf5wb Жыл бұрын
Really well explained
@jiahaochang86283 жыл бұрын
This is an awesome video to match. Thank you for your explanation, that is a great visual approach!
@KieCodes3 жыл бұрын
Thank you! 🙏
@o.rudyemonvuon644 жыл бұрын
Absolutely amazing !!!! You perfectly outlined the points and I'm defenetly more intrigued in doing additional research and watching your other videos !!!
@KieCodes4 жыл бұрын
Thank you for your kind words.
@johnostensen2 жыл бұрын
"At some number of items, you wont only miss your flight, but the whole solar system would be gone" 😂
@catatanbethari12264 жыл бұрын
Bro... You help me with my thesis... Thank you very very muuuch...
@KieCodes4 жыл бұрын
You are more than welcome, Catatan! 💪
@mohammadabdurroufhrithik5152 Жыл бұрын
very helpful video!!! excellently explained!
@husnasyed73884 жыл бұрын
Is it possible for you to elaborate how to generate a fitness function for the problem you are trying to solve? That is where I find myself stuck
@KieCodes4 жыл бұрын
Sure. In this problem I want to have the most value in my backpack whithout over-reaching it's capacity. So for each genome, that defines a set of items inside my backpack, I add all the weight. If the weight is already heavier than I can carry in my backpack, then the solution is not valid and its fitness is 0. If the weight of the set of items fits inside the backpack, I add up all the values of the different items and the accumulated value of all items is the fitness. So a genome with a solutions that provides more value is fitter than a solution that provides less. In my follow up video you will see the code explained and a link to a github repository in the description. I hope that helps. Happy coding!
@husnasyed73884 жыл бұрын
@@KieCodes so that means the mathematical function is that the sum of the weights must be equal to or less than 3 kg? I think I am struggling more because the last time I used C++ was 10 years ago! Alright now next question is that in your video each item is assigned a binary digit either 1 or 0. How do you decide which is 1 and which is 0? Sorry if that's a stupid question.
@husnasyed73884 жыл бұрын
@@KieCodes will check out your next video ! Thank you for being one of the people that help others without even knowing it.
@KieCodes4 жыл бұрын
The binary representation is to encode a solution. 0 means not inside the backpack and 1 means it is inside. These genomes are generated randomly. After that they are evaluated (fitness function) and recombined (crossover function) and slightly changed (mutation function) and thus way we get a new set of solutions/genomes. It is an algorithm based on the idea of evolution and it surprisingly works to get better and better solutions with every step of the process. I hope that clears it up a little but more.