Evolving Neural Networks With Food Seeker

  Рет қаралды 42,346

Underpower Jet

Underpower Jet

Күн бұрын

Пікірлер: 52
@TheBjerrum
@TheBjerrum 8 жыл бұрын
Interesting. But have you actually shown that it works? I can't see any convergence towards optimal seekers. You argue that your fitness graph does not have to increase since as more creatures improves, the competition for food gets tougher. The fact that there is no change worries me. How about showing the amount of food left instead of the general fitness then. I assume that as the creates improve, more food should be eaten each simulation?
@underpowerjet
@underpowerjet 8 жыл бұрын
I am thinking about making another video i leave it running for longer, and I show actual fitness along side food eaten. Another stupid thing i did in the video was....i kept cutting to different simulation rather than sticking to one simulation. No idea why my brain didn't raise a red flag that it won't make sense to the people watching >.
@make1212345
@make1212345 8 жыл бұрын
This could make a nice game for even phones. If you'd add a feature where the user gets points for every food gathered which can be used for evolving knowledge and senses. Something along those lines would make download it!
@underpowerjet
@underpowerjet 8 жыл бұрын
I would incredibly slow on phones. Having so many creatures each with an evolving brain might be a bit much for a phone to handle. However, a more optimized version with small brains and less creatures could be viable. I'll look into it and so some tests. Thanks for the idea :D.
@make1212345
@make1212345 8 жыл бұрын
No problem, could make you rich with a little luck.
@jppadilla4591
@jppadilla4591 7 жыл бұрын
TacoGuy jajajaja are you talking about agar.io?
@firesong7825
@firesong7825 8 жыл бұрын
Now give them weapons!
@underpowerjet
@underpowerjet 8 жыл бұрын
Working on something at the moment that does exactly that :D
@Strate2
@Strate2 7 жыл бұрын
i wonder what would happen if neuronal networks start to understand the concept of randomness. would that make them be able to see things more abstract? like not "there was food last time so i go there" but more like "pretty sure it could be anywhere"
@underpowerjet
@underpowerjet 7 жыл бұрын
The more neurons that can simulate a network, the more abstract their decision process can become. However, in practice we tend to see that these networks tends to converge onto a very limited range of decisions. Training networks to think in more abstract ways is very difficult and requires really large neural networks ~_~. Even in this video. Their brains learn the basic evolutionary adaption techniques of learning to go towards food. But once they learn that, their brains basically evolve to get better and better and ONLY GOING towards food as fast as possible and avoiding walls. I guess the holy grail of machine learning will really be solving this problem and finding ways to force neural networks to be more abstract in decision making. :D
@jaredmcnutt6805
@jaredmcnutt6805 7 жыл бұрын
You should make them hunt each other for food, and give them longer to do it. I wonder what strategies it would create
@underpowerjet
@underpowerjet 7 жыл бұрын
Check out my LSES video series where I do exactly that :D
@pmacg
@pmacg 8 жыл бұрын
it looks to me like creatures which start in the middle have a huge advantage and are likely ro end up with a higher fitness than those at the edge regardless of their actual ability to find food.
@jamieshelley6079
@jamieshelley6079 8 жыл бұрын
I recommend using mathf.perlin,or wang integer hash. You're getting that bias due to bell curve distribution with mathf.random.
@hanro50
@hanro50 7 жыл бұрын
Having more sensors is bad for finding food as it seems they get confused when multiple sensors return a positive when detecting food
@underpowerjet
@underpowerjet 7 жыл бұрын
I'm pretty sure more sensors are better. Yes you are right more sensors, the more likely the creature will get confused. But, that is okay since that would mean the brain has barely developed any hidden neuron. The more hidden neurons a brain develops the more abstract "calculations" that can be done with a set of incoming inputs.
@PyroEvil
@PyroEvil 8 жыл бұрын
Did you code your own C# neat integration , converting SharpNEAT to work with Mono or use the already existing convertion call UnityNEAT on github ?
@PyroEvil
@PyroEvil 8 жыл бұрын
+The One Nice work ! Did you test it with XOR experiment to compare to the originale algorithm ?
@PyroEvil
@PyroEvil 8 жыл бұрын
+The One Nice work ! Did you test it with XOR experiment to compare to the originale algorithm ?
@PyroEvil
@PyroEvil 8 жыл бұрын
+The One Yes but XOR is easy to debug and compare perfomance. Not in term of exec speed but how fast ( fewer generation as possible ) they can find the best solution. I already code a basic NeuralNet/genetic algorythm with success but in python but not Neat algorythm. It's work but don't give improvement as expected ( don't find a solution in less generation than my first algorythm and not perform like originale Neat algorythm ).
@PyroEvil
@PyroEvil 8 жыл бұрын
yes I understandwhat you mean. How much time it's will take you from the day you look at the papers and when you get a first working version of neat in Unity ? And how you process ? You just read the papers and the information on the website of Kenneth O.Stanley , you traduce the originale C++ version of Kenneth or you did both? Are you willing to share your sources to see ? I will understand if not.
@PyroEvil
@PyroEvil 8 жыл бұрын
hey thanks a lot. I will take a look on this just to see what is you interpretation of the papers and try to answer myself to somes of my questions. I don't want to take the code from another coder because I want to understand it well just in case if I want to add some features. 4months in spares times , but how much time back to back ... in hours you approximate this ?
@tonyennis3008
@tonyennis3008 7 жыл бұрын
Consider if you were going to build a physical representation of this. Part of the fitness function could take economy into account. Fewer eyes = less energy to sustain the cells. Slower speed could imply lighter muscles. So a multi-eyeballed speedster could die of starvation pretty quickly as all those extra components consume their share of food energy. This would tune the creature towards the efficient.
@underpowerjet
@underpowerjet 7 жыл бұрын
I would suggest you check out my LSES 2.5 video :D. I do explicitly this on a bigger scale.
@tonyennis3008
@tonyennis3008 7 жыл бұрын
woot woot omw
@paulsimvient
@paulsimvient 7 жыл бұрын
are you willing to publish the Unity project? (or did I miss it)? thank you for the pastebin code
@underpowerjet
@underpowerjet 7 жыл бұрын
Don't use that!!!!!! It's old and has a tiny bug hahahaha. Please get the code from the description of my "Evolving Neural Networks With 3D Cars + Tutorial" video. I give a tutorial on how you can easily create your own project using it.
@mariokohler4916
@mariokohler4916 5 жыл бұрын
What exactly are the inputs (numerical values) of the input sensors? Is it like 1.0 if the raycast hits a food item and -1.0 if it hits a wall? Or is it more complicated than that?
@mariokohler4916
@mariokohler4916 5 жыл бұрын
Thinking about it a bit more and the numerical input value is probably more like a distance to the detected object and the value is positive for food and negative for a wall? Could that be right? And do you normalize the values to a range between -1.0 and 1.0 (e.g. by dividing by the max vision distance)?
@underpowerjet
@underpowerjet 5 жыл бұрын
@@mariokohler4916 si, correcto
@jamieshelley6079
@jamieshelley6079 8 жыл бұрын
Whilst I'm a unity dev. I don't recommend unity for this kind of thing, unless you're planning on using the graphical overhead.
@underpowerjet
@underpowerjet 8 жыл бұрын
You're 100% correct!. For less than 100 agents i have noticed no issues. BUT FOR MORE than 1000 agents the Rigidbody2D and Transform's massive overhead starts to slow things down quite a lot. So for my more recent project i have completely shifted gears to writing my own custom softbody colliders that can update 1-1000 (time scale) times per frame. A LOT faster than Unity too, because unity only allows 1-100. Followed by ONLY once per-frame does it update the Transform or Rendering components. This allows me to bypass most issues and train things fast and with less overhead.
@jamieshelley6079
@jamieshelley6079 8 жыл бұрын
Yeah :l. I had to find weird and wonderful solutions to this problem via shaders, which is fine for a game no matter how complex due to an easy separation between such things as AI and visuals. One huge limitation is unity's single thread exe (the reason for it is understandable ). I recommend the OpenTK lib and windows forms app (vs 13 being the most stable). This allows you : .Multithreading .Async await operations .much less overhead Good luck!
@underpowerjet
@underpowerjet 8 жыл бұрын
***** Humm, I'll take a look into OpenTK thanks :D.
@jamieshelley6079
@jamieshelley6079 8 жыл бұрын
No worries :)
@baddragonfire
@baddragonfire 4 жыл бұрын
Hey man I was curious, for the inputs did u give the distance of the hit given by where the ray hit? Did u use any type of tag or anything which differentiate between food and walls or is it just the ray hits? Idk if this makes any sense
@elliotc4268
@elliotc4268 3 жыл бұрын
idk but it would make sense if he just added the distance
@visheshl
@visheshl 9 ай бұрын
hi could you do a tutorial to build this project?
@mothtolias
@mothtolias 8 жыл бұрын
ah, so unity is powerful enough for this kind of thing. I was hoping to make something similar, but I wasn't sure if unity would be able to handle it all. going on this, though, it looks great!
@Mythricia1988
@Mythricia1988 8 жыл бұрын
Unity can do anything, honestly. If you can write it in C#, you can do it in Unity. Heck, you can use any language if you can make bindings between the languages. All Unity really is, at the end of the day, is a library of C# functions, cross-platform compiler, a renderer, audio engine, physics engine, and a fancy editor. But there's nothing to stop you from writing chunks of an engine yourself and only using Unity as a renderer, for example. In fact that's basically what most large Unity games do (Hearthstone, Wasteland 2, Pillars of Eternity, Firewatch, Kerbal Space Program, are all Unity games for example). The whole "Unity is bad and only used for crap" is mostly just born out of the fact it's easy to use, has a proven history, an asset store, and is free, making it the obvious choice for any and every lunatic wanting to make the next _Grass Simulator_ :\ All of the above is true for Unreal Engine and CryEngine too of course, and others.
@backupmemories897
@backupmemories897 3 жыл бұрын
You sound so smart me wanna be like u.. me dumb :(
@underpowerjet
@underpowerjet 3 жыл бұрын
lmao, it's a lot easier to sound smart with the magic of editing I just cut out the bits where I didn't :D
@dex3r12345
@dex3r12345 8 жыл бұрын
Based on your own graph, your program does not really work. And by that I mean it does not progress towards more fit genome, it oscillates around initial fitness values.
@dex3r12345
@dex3r12345 8 жыл бұрын
If I understood correctly, the graph shows the fitness over time. And from that you can see that overall fitness does not increase over time. That means the goal of neuroevolution failed - the program does not get better in doing its task. Furthermore, you cannot really evolve creatures if the fitness function will not increase. Meaning either your environment is flawed or fitness calculation method is wrong, as the creatures cannot be sorted by its fitness, and so the best creatures cannot be correctly chosen to reproduce further. I disliked the video because I am searching for resources about NEAT and neuroevolution in general and your video took 12 min without showing any positive results. Thank you for response, cheers.
@borisshr
@borisshr 8 жыл бұрын
I think you can just post a picture of true fitness function graph. This will clear much of the doubt in the system's success. As you explained the most critical skill of the creature is to avoid the walls. Moreover one of the species death by touching the wall severely drops the creature's species fitness estimation. None of this is expressed in the "food eaten" graph.
@garychap8384
@garychap8384 7 жыл бұрын
Would it be useful for the creature to see other creatures in it's sensors. My thinking is that defensive and aggressive eating strategies may emerge. I may see three items of food, two closer to siblings... and one further away, I could ping-pong between the first two, only to have each disappear before I get there as a sibling eats them ... leaving me disadvantaged in getting to the third. This would be suboptimal. I'd expect aggressive and defensive strategies to emerge only once the population first becomes efficient at hunting. Till then, there is almost no advantage. An interesting thing, at this stage, may be to code the food to avoid, thus being more prone to group attacks than solo attackers. Cooperative pack hunting may then emerge where already engaged food becomes more attractive. Reward by reducing the foods energy per iteration after the first capture ... making it a still resource (corpse) and allowing a short time for other hunters to arrive and take share per frame. This provides a reward for the pack, with the greater share going to the hunter making the initial takedown. thoughts?
@underpowerjet
@underpowerjet 7 жыл бұрын
Wow, sorry dude. You're comment was in the "Likely Spam" section. I don't know why KZbin did that O_O. I am a little confused. Yep, I sort of did just that with my LSES Version 1 video :D.
@pook0
@pook0 8 жыл бұрын
died at 2:10
@pook0
@pook0 8 жыл бұрын
holy crap you responded your simulation is cool and i like it neural networks and evolution in general i like
@thisnicklldo
@thisnicklldo 7 жыл бұрын
Hmm. 1. "It's perfectly OK for fitness to be decreasing". That can't be right. Your overlay notes seem to imply that it isn't fitness that is decreasing, but food eaten. OK - so is fitness increasing or not? I think you are saying that they are getting better and better at finding food, so they live ever shorter lives in a world of one-time finite food supply. So why is the food supply finite - random replacement of food would surely enable the creatures to evolve faster towards food detection and wall avoidance, if you end each run after the population has decreased to some arbitrary small number that represents the best creatures, and then mate those for the next generation. 2. If the network is ever to evolve to recognise walls, creatures need to live long enough to encounter them. So far as I can see, you always preferentially select for creatures born in the middle, so all they have to be able to do is eat. Creatures that can eat don't live long enough anyway to ever reach the edge, I think. I certainly saw precious little evidence of wall-avoidance in your clips, anyway.
@underpowerjet
@underpowerjet 7 жыл бұрын
Going to be straight up honost with you. You are 110% right. There are a lot of issues with this video. Starting with the fact that there was a major bug in my code THAT ACTUALLY CAUSED NEURAL CONNECTIONS TO BECOME DORMENT! I thought this was a normal thing for NEAT, but I was so wrong! I have learnt so much since I posted this video. I want to take down this abomination of a video. But at the same time...idk....
Virtual Spiders Evolution
5:45
Arseniy Nikolaev
Рет қаралды 101 М.
Snakes, Neural Networks and Genetic Algorithms
8:33
emgoz
Рет қаралды 137 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 10 МЛН
Creative Justice at the Checkout: Bananas and Eggs Showdown #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 35 МЛН
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 66 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 54 МЛН
Tutorial On Programming An Evolving Neural Network In C# w/ Unity3D
27:51
Evolving Neural Networks Of Bipedal Creatures
6:31
Underpower Jet
Рет қаралды 77 М.
Racer AI WIth Evolving Neural Networks
3:48
Underpower Jet
Рет қаралды 14 М.
Evolving Wind Turbine Blades
9:44
sjh7132
Рет қаралды 350 М.
Evolving Neural Networks Of Joint Segmented Line Creatures
15:30
Underpower Jet
Рет қаралды 37 М.
Evolution of simple organisms with neural networks
5:03
phyces
Рет қаралды 108 М.
Finally some ACTUAL EVOLUTION in Evolv.io.
13:37
carykh
Рет қаралды 856 М.
MarI/O - Machine Learning for Video Games
5:58
SethBling
Рет қаралды 11 МЛН
AI Simulation (Genetic algorithm with Neural networks)
11:15
Neuroevolution - Car learns to drive
5:53
MiorSoft (reexre)
Рет қаралды 437 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 10 МЛН