-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revision on genetic algorithm implementation #16
base: master
Are you sure you want to change the base?
Revision on genetic algorithm implementation #16
Conversation
Thanks for the PR. I will look at this in a free time |
Thank you @KonradLinkowski , hope this fits with the project :D :D :D |
Hi @KonradLinkowski , I've revised some parts of the genetic algorithm, I think it is still covered by this pull request though. The fastest I have is at 2 minutes span here is the result already: However, here is the greatest image match I have achieved after leaving it for a while now: Additionally, based on my observations such a match really depends on the rates (the variables used for tweaking) provided because sometimes once a mutation happens the image drops to a lower match percentage or it slows down the increase of the match percentage. This means that the 2 mins span I stated above to achieve a 90% match percentage may differ from time to time depending on how the population reacts. By the way, this project is so fun! It gives that exciting feeling when the image generated is so close to the original. :D :D :D |
Does it work? I'm asking because when I swapped |
Hi, In what way aspect does it break so that I can cheeck :D :D :D |
Hi @KonradLinkowski ,
I have implemented a different approach for genetic algorithm in this pull request.
Here is a screenshot of the sample output:
To summarize the change, I have implemented the following:
All other implementations are retained, except for the drawLoop and the requestAnimationFrame.
For tweaking these are the change-able values:
I've added this as a another file, genetic.js, so that you can test it without overwriting the previous genetic algorithm implementation.
Hope this helps solve the problem :D :D :D