You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How will I run code after the GA completes? Notification runs n times, I want code to run only once after the solution is found (or if not found just show "could not solve").
The text was updated successfully, but these errors were encountered:
I solved my own issue by modifying the for loop using setTimeout, so the UI gets time to respond to events. If you like I can make a fork to show my code (haven't done that yet).
You should be able to check the value of isFinished:
function(pop,generation,stats,isFinished)
It would be nice if returning false would stop it from running (if you found a solution). Is this similar to what you accomplished with setTimeout? I would be happy to take look so I understand your use case more.
How will I run code after the GA completes? Notification runs n times, I want code to run only once after the solution is found (or if not found just show "could not solve").
The text was updated successfully, but these errors were encountered: