I started a Neural Network Tutorial series to show how I made the neural network in this video! Here is a link to part 1: kzbin.info/www/bejne/gImqoJqafpyFf6c
@dotenvdev Жыл бұрын
Have you considered swapping the ReLU activation function out for GELU? A bit more computationally intensive, but great to avoid vanishing gradients
@lucutes29364 ай бұрын
thx
@SBroproductions3 жыл бұрын
2:20 Shoutout to the guy that spawned underneath the map. Dude evolved his way to another plane of existence.
@lucutes29364 ай бұрын
big brain
@modernmarrow14113 жыл бұрын
I've always loved natural selection simulators, it's too bad there isn't more of them.
@zebradobby96792 жыл бұрын
Me too
@lunaticgr29252 жыл бұрын
The bibites : digital life, it's by far the most advanced and it's also free. The creator quit his job and is working full time on the project now. You should check it out.
@Vav97 Жыл бұрын
I got you kzbin.info/www/bejne/eJfGmGeqiJ2bptk
@revimfadli4666 Жыл бұрын
@@lunaticgr2925now we also have Simulife Hub, Biomaker CA, Cell Engine, Neuraquarium, and whatever Dylan Cope calls his simulation. Bit sad that most of their skill cap don't go far above "steer towards food" or "maximise sunlight"
@lucutes29364 ай бұрын
wdym
@kingbling75713 жыл бұрын
There are different Neural Network Training techniques, Supervised, Unsupervised and Reinforcement type. What you implemented here was reinforced technique which uses Genetic Algorithm to train the NN whereas Backpropogation is the algorithm used in Supervised learning. Good stuff btw hopefully this video blows up!
@TheDroidsb3 жыл бұрын
I did a natural selection program with higher energy costs for faster speed and larger size. They ended up evolving to have negative speed so they only gained energy 😂
@nikkiofthevalley3 жыл бұрын
Ahh, the good old "neural network finds a bug in your program for you" (also, what happened when you made it so the speed couldn't go below 0?)
@Mr-Raptor Жыл бұрын
lmao
@nikolozgilles Жыл бұрын
I AM (REVERSE) SPEED
@page84723 жыл бұрын
this is amazing you truly deserve more recognition, keep it up:)
@julianon1613 жыл бұрын
What a great video!! I predict your Channel is going to blow up soon. I actually coded a genetic algorithm (like you showed) for a biology essay. It was about cars learning to drive a race track and worked pretty similar. Keep your work up!
@frozenzenberry41013 жыл бұрын
FINALLY. I’ve watched so many videos about neural networks, seen the dots connecting with lines, but never actually understood how they worked. Someone finally bothered to stop and tell me.
@shoom71033 жыл бұрын
You are very underrated. That was a very interesting video!
@teambellavsteamalice3 жыл бұрын
Awesome! I first found some videos from a project called Bitites and then found Primer. I immediately thought, what if you could combine those!
@matsukuia71403 жыл бұрын
The quality of this video really caught me by surpise, It deserves more recognition!
@alejandrorosales28633 жыл бұрын
I love this!! I love evolution simulations. Ive built a few myself but never to this magnificent extent. You are implementing everything I would like to implement: neural networks and 3D graphics. Hope you can show us some more :)
@AbstaartKardman Жыл бұрын
it cracks me up seeing you having fun during your explanations , its a very interesting project , thanks for sharing man!
@meryyy03883 жыл бұрын
This video was super easy to understand, thanks a lot. I hope you grow a lot on KZbin!
@ebrahimmomin75183 жыл бұрын
Me: jumps of a cliff God: why did u jump off a cliff Me: i wanted to learn
@TamaraMakesGames2 жыл бұрын
Wow, great video! I am looking into such simulations at the moment because I was also fascinated by the same videos by Sebastian Lague and Primer. And you did a really good job of explaining things in this video. Well done!
@arv_is3 жыл бұрын
Literally made something almost exactly like this, found this video when trying to solve a problem... it didnt help but was very interesting! Keep up these videos
@AirNeat2 жыл бұрын
Haha same here
@xendelaar3 жыл бұрын
Very interesting video! You've got some magic coding and explaining skills good sir. A deadly combination. :) Would be interesting to train an Ai like that for a rts game but I guess it would take very long for the ai to mature
@revimfadli4666 Жыл бұрын
It could mature fast using PPO and invalid action masking, Yannic Kilcher had a video on a paper about it (with microRTS)
@TeamUnpro2 жыл бұрын
I started playing with this idea last night, its super fun
@oatcube3961 Жыл бұрын
Just had to rewatch this video. I first time watched this 1,5 years ago before I started writing my masters thesis on AI. Last week I got it granded and ended up getting grade of 4,5 (max is 5). This was one of the vids that reeled me into working with AI in Unity.
@adamlarsson71223 жыл бұрын
Great video! Would love to see more!
@anomalocaris540 Жыл бұрын
reminds me of one summer project i tried. the idea was to make a game where creatures evolve like that, I wanted to make it so the player to hunt/play in the game, causing creatures to evolve to the player presence, and also allow player to domesticate and farm them . was new at unity/programming and ended up making a snake thing that could crawl a bit. not exciting for a game, but I learned a lot. Still think a survival game where creatures evolve and adapt would be a fun game.
@erinleighlynch9400 Жыл бұрын
How does changing the weights and biases change the output... basically, whether or not a node is active or inactive, then it'll choose whether to go forwards or backwards? ?
@JohnnyCodes Жыл бұрын
The weights and biases control the "flow" of information through the network. If a weight is large, it means that the input it's connected to is very important and will have a strong influence on the output. If a weight is small or close to zero, then the input has less effect on the output. The biases help the network make better decisions by shifting the outputs of the activation function, allowing it to learn even when the input data isn't a perfect match to the expected results. Also In our case the output nodes are always technically active because I don't apply the activation function to the output layer. So instead there we have the 2 output nodes and if the first one is negative they will go left and if it is positive they will go right, Then the second output node works the same way but for forward and backwards.
@DiegoPaulo20232 жыл бұрын
Really great Video man
@JohnnyCodes2 жыл бұрын
Thank you! I appreciate it!
@DigitomProductions3 жыл бұрын
Great video man keep it up.
@JohnnyCodes3 жыл бұрын
Thanks, will do!
@TacticalAnt4203 жыл бұрын
That’s really good.
@thomasrebicki88343 жыл бұрын
i love u for teaching me about AI.
@c00lkitty2 жыл бұрын
Can we just appreciate he made the oof sound as the death sound in the beginning? R.I.P. OOF SOUND 2006-2022. Also, maybe add a chat system so that they can talk to you and eventually grow up to learn English?
@TheCurlyCoder2 жыл бұрын
2:47 made me laugh so hard that I almost swallowed my pizza.
@visheshl11 ай бұрын
Hi i downloaded the project. What most important thing is that you populate the world with the most evolved creatures. Creature spawner needs to keep a list of ten most evolved creatures and populate the world with them so as to keep the evolution progressing forward. Please implement this feature and make a part 5 of this tutorial.
@audditygvhgvhv87783 жыл бұрын
wheres the auto jump cut software?
@discipulus.13 жыл бұрын
I freaking love these experiments
@CalebHansonOfficial Жыл бұрын
In my early 20s I made all kinds of AI evolution simulations like this in unity. But I always got stuck with back propagation. I never, *NEVER* thought of using death and reproduction as an alternative to backpropation, but once you said it it makes perfect sense. GAH
@manavgala23613 жыл бұрын
Nobody else on KZbin has explained Neural Networks as well as you have for newbies
@finnwendt9540 Жыл бұрын
Why does every node need to be connected with every other to the next layer?
@JohnnyCodes Жыл бұрын
They don't actually need to be connected to each node but that is one of the most common layers. When they are all connected like that it is called a Dense layer (You will see this term when using python libraries like pytorch or keras). When you string a bunch of these dense layers together like we did it is called a "fully connected feed forward network". People experiment with all different kinds of networks, for example the NEAT algorithm tries to figure out what connections each node should have (Using evolution of the actual network shape). There are also recurrent neural networks where previous outputs are looped back into the node as inputs, this gives networks a form of short term memory, also this would be called a recurrent network instead of a feed forward network in this case. Hope that helps clear things up a bit! Let me know if you have any other questions!
@kiachi4703 жыл бұрын
Dude great video and work
@JohnnyCodes3 жыл бұрын
Thanks! Glad you enjoyed it!
@BadChess56 Жыл бұрын
I mean, I am a creationist, and anyone with common sense knows that evolution in this sense is impossible, but it is still fun to watch. (mostly because of the neural network)
@neilfosteronly2 жыл бұрын
Very cool. I made something similar. But with prey, hunter and plant. Only hunter and prey DNA change. I decided against a size change as thought it would be too powerful. I just used basic states for the AI. Will post it on github soon.
@billross96563 жыл бұрын
Forejumpcutting as a new plot device.. what will the jump-cutting video foreshadow??
@angelodeus84233 жыл бұрын
good video, I have a challenge make AI wich its inputs are the pixels of its camera in unity
@IgnisKhan2 жыл бұрын
I've wanted to do that for like 15 years now. But spoiler alert: you can't do in on a home PC, even today. It's so computationally expensive (read: slow), you'd need a cluster computer (small supercomputer). (That's if you're evolving a neural net. If you're "cheating" and using statistics or other math, it's less expensive.)
@neoblackcyptron3 жыл бұрын
You deserve so many more views. From you video Atleast I know that Unity and reinforcement learning can be used together. Did you have to design each neuron and the interconnection between the nodes. Before natural selection was used to train the weights? Or does unity provide a pre-made function to define the neural network structure.
@jaydee43973 жыл бұрын
There is still an interest in your jump cut code as well as your larger unity project here. Lots from which to learn, kind sir.
@visheshl11 ай бұрын
The creature spawner needs to keep track of the ten best creatures and spawn them periodically to keep the simulation going forward.
@atcer51 Жыл бұрын
this finally answered a big AI question I had! thx!
@ziggyzoggin3 жыл бұрын
if you like simulations, you should really see the bibites
@thestoneworks Жыл бұрын
Interesting, i notice none of them turn into birds. Sure takes a lot of processing power & code to make natural selection work.
@JohnnyCodes Жыл бұрын
There is actually a really cool KZbin channel/simulation called The Sapling and his evolution simulator actually has the ability to have creatures start off on land and eventually evolve to fly. Also, these networks are actually quite simple so the actual bottleneck of the program is the Unity stuff and not the networks themselves.
@lucutes29364 ай бұрын
were you using ML-Agents?
@JohnnyCodes4 ай бұрын
No this was using a neural network I made from scratch. I have a 4 part version of this where I show how to make the code for it
@lucutes29364 ай бұрын
@@JohnnyCodes aren't they both similar?
@christophermoore76763 жыл бұрын
Super interesting, have you chosen to release the source code?
@JohnnyCodes3 жыл бұрын
Yeah I was planning on adding a web version of the sim to my non existent website in the next few weeks. I will probably put the code on github at some point too.
@christophermoore76763 жыл бұрын
@@JohnnyCodes Thanks!
@donbeckham3 жыл бұрын
7 months later... still waiting on the video about automated jump cuts. :)
@pobierac21832 жыл бұрын
Is your code somewhere available?
@JohnnyCodes2 жыл бұрын
I am actually planning on putting the neural network template on github as part of the neural network series I started posting today. I am planning on making the neural network template free on github but I am going to be adding the source code for the rest of my projects as a perk for Patreon members
@madankd Жыл бұрын
Hey can you share a code
@JohnnyCodes Жыл бұрын
The scripts are on github from part 3 but I am actually planning on posting a quick unity setup tutorial tomorrow and I will also put the whole project on github. The reason I haven't done it yet is because of the Assets I used. But in tomorrows video I am not going to use any assets so I can share it.
@MatthewKanwisher3 жыл бұрын
Cool video, make some more
@offroadr3 жыл бұрын
@John Sorrentino, I have been looking for a start point for a unity genetic algorithm with a NN built in to the critters. Do you have the source available?
@xaviermagnus83103 жыл бұрын
You could try Udemy course by Penny something or other.
@offroadr3 жыл бұрын
@@xaviermagnus8310, I am guessing you mean, Dr Penny de Byl. I think I might just do that. Thanks.
@xaviermagnus83103 жыл бұрын
@@offroadr Get it on sale, but yes. Udemy scheme is to have sales all the time.
@AlekMunroe01 Жыл бұрын
i wanted to do something like this but a sims like game however i was only able to make really simple "Ball go to cube" game. Then i gave up.
@GIRGHGH3 жыл бұрын
For some reason I expected there to be more after the explanation of how to do movement.
@pedroheck36673 жыл бұрын
Great video, John! If you don't mind, may I ask you a few questions? You used Unity, so was every part of the code made with C#? If so, how did you manage to make neural networks with C#? And, if not, how did you integraded both languages into Unity? I'm asking this because I'm creating my own natural selection simulation, but it is becoming too complex for a browser app, so I'll be migrating it all to Unity (therefore changing all my code from JavaScript to C#). And since I'm changing it all, I feel like adding neural networks is a step I can take now. However, I've just recently started learning Machine Learning, and I only know of Python libraries and techniques to implement it. I hope you see this comment! :)
@JohnnyCodes3 жыл бұрын
Hi Pedro! I did make the neural networks from scratch for this but the code was a huge mess and it also used an external library called Math.Net. Over the past week I made another neural network simulation to teach cars to drive around a track and I removed the need for that dependency. I have been cleaning up the neural network code as much as possible to make it easier to understand and also easier for other people to reuse this in other projects. I can add the code to git for you in a few days once it is working better. I will be making another video and tutorial about these updates soon too
@pedroheck36673 жыл бұрын
@@JohnnyCodes Oh that's great to know! And yeah I would absolutely love that! I'm trying the best I can to gather info about this subject but there's still so much to learn 😅 I truly appreciate your response, I'll be looking forward these updates! :)
@definitelygamedev58213 жыл бұрын
That's a really good video
@ITomocska3 жыл бұрын
Love the jokes, you got a new subscriber:D
@IgnisKhan2 жыл бұрын
Great stuff, and an even better explainer! Question: Do you only use asexual reproduction? Or can two parents have a child (i.e., with genetic crossover logic)? If you're still interested in the topic, the god tier of evolving neural nets is the "NEAT" algorithm -- Neuro-Evolution of Augmenting Topologies. It's been on my coding bucket list for a long, long time now.
@darudeSandstorm.3 жыл бұрын
Isnt backpropagation what we call sleep? I think thats kinda missing in the Simulation :-)
@DuxGalt2 жыл бұрын
Supervised ML can do a lot, faster. I think it would have been cool to have a day time limit and if they gained 0 food, then they would make some random changes. After 4 days with no food they die out completely. but due to random luck they could reproduce maybe once, which might help some not useful at the start gene's make their way into the future. the problem with genetic algorithms seems to be that eventually there is only one or two sets of genes left. Which means they loose their ability to adapt. It might be that way IRL too but
@laskey21753 жыл бұрын
Take the sim that you had them eat the smaller creatures and allow 3 small creatures to teamkill a large creature and drop a bunch of food.
@Coffeemancer3 жыл бұрын
make a sim where the souls of the dead can appear and teach descendencts
@TartarusHimself2 жыл бұрын
the jump cuts were perfectly fine until you pointed them out
@gamedev_byhobby8872 Жыл бұрын
You should make a bunch of neural networks that process different stuff from one another and some feed their outputs to others' inputs so that you'll efectively have a brain
@eemasd3 жыл бұрын
Make a count of how many times he said neural network
@JohnnyCodes3 жыл бұрын
11 times is that a coincidence? I think not... Remember remember the 5th of November my friend
@palingram3 жыл бұрын
1:43 that was a bug bro😂😂😂
@DuxGalt2 жыл бұрын
Really though is it? I don't think it should be considered that. I mean part of machine learning is that we want to see them find ways to win. If this NN was more complex it would have been totally possible for them to learn to push off the edge intentionally, and to avoid the edge as well. The point of NN's is to have as many variables as possible without destroying your computer. Maybe its just the developer in me saying its a feature not a bug. But I think a game that does not have any room for emergent gameplay is unappealing and likely result in stale gameplay.
@henrythearcticwolf4709 Жыл бұрын
HES A MONSTER HES UNDOING OUR WORK HES MAKING SIZE MATTER! NOOOOOOOOO!!!!