-
Notifications
You must be signed in to change notification settings - Fork 26
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
NeuroEvolution #31
NeuroEvolution #31
Conversation
Hi @shiffman , the |
@ziyuan-linn I can't explain it, but for some reason the Pose Detection model caused an error in ml5.neuralNetwork(). I think maybe it may have required updating some dependencies which caused something to break. See this commit de87879 where I temporarily disabled the pose model. After this commit, when I run I think it may be due to a |
@shiffman That's strange. I can take a look today! |
@shiffmanThe error should go away after merging #34 :) |
Thank you @ziyuan-linn, what's weird is that I am explicitly using Let me try merging #34, updating this branch, and see where it leaves us! |
Ah, ok, so the issue is resolved but I am not sure why my call to Is the backend a global setting for any given webpage? If so then I don't think it makes sense to add an option to ml5.setBackend("cpu"): This would be my preference! What do you think @ziyuan-linn? |
@shiffman Ohh I think calling function setup() {
createCanvas(640, 240);
ml5.tf.setBackend("cpu");//<------- moved to before Bird constructor call
for (let i = 0; i < 200; i++) {
birds[i] = new Bird();
}
pipes.push(new Pipe());
} My guess is that if the I think tf.setBackend is a global setting, and I agree that a ml5 utility method would make more sense. I would also be happy to implement it, which shouldn't be too hard. |
This is just about ready but I'd like to resolve and merge #36 first. Also, workflow-wise, I wonder if we should be using "squash and merge" since our development branches involve a lot of small steps and changes? This could apply to #26 as well? @ziyuan-linn @gohai |
@shiffman I think squash and merge can be a good idea for the big development branches! I don't really have a strong opinion either way. |
These examples along with a completed draft of Chapter 10: Nature of Code are ready to go! @gohai and @ziyuan-linn any comments before I squash and merge? The examples could probably use some cleanup / comments, I will continue to refine as I work on the chapter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I briefly read through chapter 10 of The Nature of Code. I was only vaguely familiar with the concept of reinforcement learning, but I think the book explained the concept very well through the step-by-step flappy bird example! The Neuroevolution Ecosystem example is also fascinating and makes me want to try it on my own.
The examples code seems very clear to me and I was able to run them without any problem.
I'm working on reviewing pull requests today! I think I'll go ahead and merge this one first! |
I'm continuing from where I left off with #23 and moving onto neuro-evolution. One API note, I've changed the
noTraining
option toneuroEvolution
, so now creating the empty model looks like:I thought about
neuroEvolution
being a "task", but specifying "classification" or "regression" is still needed.I could adapttask
to accept an array of options, but I think that overcomplicates things. This flag is necessary in order for the model to be initialized properly for use with some of the neuroevolution functionality. Thoughts welcome!Also, I noticed that my VSCode settings made quite a few changes to whitespace, quote style, etc. @ziyuan-linn I followed the
CONTRIBUTING.md
instructions, did I miss any steps perhaps? I noticed the.prettierrc.json
file is empty, do we need to add options to it?