Prey vs Predators - preparing bigger simulation

  Рет қаралды 91,033

Pezzza's Work

Pezzza's Work

Күн бұрын

Пікірлер: 265
@Space_Reptile
@Space_Reptile 2 жыл бұрын
i want to suggest something: adding objects and obstacles into the "arena" so that the "agents" can evolve to use those to their advantage, similar to how animals have evolved to use certain land features for cover or nesting
@nemesisurvivorleon
@nemesisurvivorleon 2 жыл бұрын
yessss pls
@EliasMheart
@EliasMheart 2 жыл бұрын
That's indeed interesting, but it also sounds like another type of object that needs recognizing. No idea if difficulty has to scale the performance issues linearly, in principle you could probably get away with less impact after changing the architecture the first time, but I'm not sure ^^
@francobernaldodequiros9509
@francobernaldodequiros9509 2 жыл бұрын
@@EliasMheart As far as I understand it is using a neural network for vision. This means that it would not be much of a problem to implement physical objects in code. But the network should learn to recognize them
@torydavis10
@torydavis10 2 жыл бұрын
@@francobernaldodequiros9509 yep just make it a boundary they bonk off of and see what they do with that
@jackfrederiksen7979
@jackfrederiksen7979 2 жыл бұрын
As a partially colorblind person, I find the new colors harder to differentiate than the old ones. I would recommend that you use light orange and dark blue, as they are the most easily distinguished colors across all forms of color blindness. I'm still glad that you bothered to think about colorblind people in the first place, though :)
@multiarray2320
@multiarray2320 2 жыл бұрын
as a person who can see very well i also found the previous colors better to see. maybe a different design for both groups would solve this.
@WilliamDye-willdye
@WilliamDye-willdye 2 жыл бұрын
There are free online utilities which transform a regular photo into how it would look to someone with color blindness. A quick search should find them.
@Al-tg7ok
@Al-tg7ok 2 жыл бұрын
Hey jack, my brain always registers green and orange as the same, what you think that means? Haha I'm not color blind but I often say green when I look at orange & vise versa. Maybe you have a wild perspective that I don't see. But I also agree, for some reason the colors were off-putting for me, compared to the first.
@jackfrederiksen7979
@jackfrederiksen7979 2 жыл бұрын
@@Al-tg7ok I also see green and orange as similar sometimes, so you might have protanopia/protanomaly (difficulty perceiving red light), or deuteranopia/deuteranomaly (difficulty perceiving green light). These two forms of color deficiency, especially protanopia, are surprisingly common among men specifically, because the biology of the eye is slightly different between genders. I myself have mild protanomaly, which causes me to mix up lots of colors. People seem to think that when someone is red-green color deficient they simply see all shades of red and green as identical, but in reality having a color deficiency is much more complicated and affects many more colors than people seem to realize, and it can vary even between people who have the same type of deficiency. Another big factor of color deficiency that people often don't realize is that anyone, even someone who is entirely colorblind, can differentiate between dark and light colors. Even though I often mix up red and green, I can easily differentiate between a light green and a dark red.
@StellaByLuna
@StellaByLuna 2 жыл бұрын
I'm also partially red/green colorblind and I agree, the previous video's colors also had a lot of contrast in brightness in comparison with these colors which are a similar brightness.
@sunbear2340
@sunbear2340 2 жыл бұрын
I really really liked the visualization of the concepts you discussed in this video, these videos are amazing.
@howuhh8960
@howuhh8960 2 жыл бұрын
As ml engeener, I don't think that for such small networks topology is crucial for interesting behaviour. Even with fixed topology (but with mutating weights) you can get impressive results in supervised or reinforcement learning tasks (see hide and seek multi-agent project from OpenAI, not an evolution tho). But! With fixed topology you can store weights simply as matrices and forward pass as matrix multiply. With synchronized step for all agents, you can even step on all env at once (concatenate weights from all agents, matrix multiply on gpu). Usually with such setup, MASSIVE simulations are possible.
@WsprWndrr
@WsprWndrr 2 жыл бұрын
Mutating weights more or less simulate topology changes?
@howuhh8960
@howuhh8960 2 жыл бұрын
@@WsprWndrr Yeah, but usually evolutionary community advocates also for networks plasticity, like in NEAT algorithm, where you can add neurons, remove them, add connections, that stuff. While in conventional deep learning, topology usually fixed as this is make possible a lot of optimizations (gpu, autodiff frameworks like pytorch, jax, etc)
@paulpach
@paulpach 2 жыл бұрын
an ML engineer that does not know how to spell "engineer" 🤨 That said, heck yeah, using a matrix for the connections and using a compute shader would be a huge win.
@howuhh8960
@howuhh8960 2 жыл бұрын
@@paulpach well, I am not a native speaker, not even work in english on daily basis (I know enough to read papers and docs, not to write without typos), lol, pathetic
@PezzzasWork
@PezzzasWork 2 жыл бұрын
I would really like to use matrices but I don't really see how to do that considering that there is no notion of layer in the approach I am using
@themixedmaster
@themixedmaster 2 жыл бұрын
Many people will take the animated explanations for granted, but they are amazing. They do a really good job of helping to explain
@cognisent_
@cognisent_ 2 жыл бұрын
Really cool to see such a concrete example of optimization done at the right time -- when it's needed. You could've easily just hand waved this in the next video, but it's awesome that you took the time to make this interstitial video 🙌.
@louisdalibard818
@louisdalibard818 2 жыл бұрын
This video is awesome! The explanatory animations are icing on the cake. What software did you use to make them?
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Thank you very much! I wrote a little lib myself to do these animations because I couldn't find a nice software for this
@louisdalibard818
@louisdalibard818 2 жыл бұрын
@@PezzzasWork That's so cool.
@valet_noir
@valet_noir 2 жыл бұрын
@@PezzzasWork amazing ! do you plane on releasing it or open sourcing it ?
@kaytwofour
@kaytwofour 2 жыл бұрын
@@PezzzasWork Plz Plz upload the source code. Even the lasts video's code is enough.
@PezzzasWork
@PezzzasWork 2 жыл бұрын
@@valet_noir I think I will but I need to improve the setup and interface and it’s currently quite hard to use
@Sharlenwar
@Sharlenwar 2 жыл бұрын
Love this stuff, helps me with my coding.
@grimmauld184
@grimmauld184 2 жыл бұрын
You can optimize your multithreading even further by taking into account a "complexity rating" while queueing up tasks: Long tasks being executed at the end would currently block the frame until the last long task finishes. If you can rate how long tasks will take, assigning the longer tasks to workers first will improve consistency and speed of frames. You can do this either by hand "guessing", or dynamically using some sort of profiler and then assigning the tasks that took long on one frame a higher priority on the next.
@TheRainHarvester
@TheRainHarvester 2 жыл бұрын
I think the creatures are evenly distributed enough so each thread will execute in the same time. (You'd need a large population in one grid to get a long pole which is unlikely).
@Chase92488
@Chase92488 Жыл бұрын
@@TheRainHarvesterwith the last simulations, there were tons of units bunched up in the same areas, so it might be nessacary now
@pelicannot.
@pelicannot. 2 жыл бұрын
YESSSS WOOOO BEST CHANNEL ON KZbin
@johnblue2158
@johnblue2158 2 жыл бұрын
Hi Pezzza, Your first video was really great, it got me motivated to play a bit with evolving agents too. I did notice the exact same problem you have here: It gets slow with a lot of agents, and the majority of the time is spent on calculating the networks. The solution that worked for me was to just do all network calculations on the gpu, this allowed 60k+ agents in realtime (depending on net complexity of course). Its adds more complication with the memory management, but I would assume it is the only realistic solution to get a high agent count in realtime, otherwise just the number of floating point operations required for the network will probably hit the limit of the cpu.
@puppergump4117
@puppergump4117 2 жыл бұрын
Warning: Neural networks are only fast on Nvidia gpu's. AMD is slow and dumb and inferior.
@TheRainHarvester
@TheRainHarvester 2 жыл бұрын
@@puppergump4117 and AMD has no API to even program their GPU!! How are game devs getting their api for amd?!
@flameofthephoenix8395
@flameofthephoenix8395 Жыл бұрын
You could use fixed point numbers instead.
@Non-disjunction
@Non-disjunction 2 жыл бұрын
So glad you're continuing this project
@actravaz
@actravaz 2 жыл бұрын
*I must consume more pezza videos*
@Ibloop
@Ibloop 2 жыл бұрын
Same
@I_am_Tob
@I_am_Tob 2 жыл бұрын
Yes
@davawen9938
@davawen9938 2 жыл бұрын
This
@jasonbourne485
@jasonbourne485 2 жыл бұрын
It seems like the optimization with the neural networks was needed due to the sparse nature of your neural network. But I wonder since GPU's nowadays are very optimized to preform matrix multiplications if it would be faster to have the neural network instead be fully connected but with the unwanted connections' weights set to 0 and frozen during training, so that the weights for each layer could become a 2d array and the multiplication could be done on the gpu. But then again I don't think the neural network here is the bottleneck anyway.
@RRKS_TF
@RRKS_TF 2 жыл бұрын
I know that NVIDIAs tensor cores are optimised for sparse matrices
@verbalbbq7976
@verbalbbq7976 2 жыл бұрын
I know nothing about coding or programming, but your explanations are very clear and easy to understand! Also big props for the production quality. Those graphics are really nice and help a lot in conveying what you are doing. Keep it up!
@andrewberntson4775
@andrewberntson4775 2 жыл бұрын
I loved the explanations of the optimizations. So informative and concise! Your voice is very soothing. I wish you had videos simply explaining different algorithms, computer science students around the world would eat that up with the quality of these animations and the production quality.
@lakshuperiakaruppan6777
@lakshuperiakaruppan6777 Жыл бұрын
I can’t even imagine how much work went into animating this video. Awesome job! Your videos are each masterpieces.
@beanjuice6304
@beanjuice6304 2 жыл бұрын
love these predator v prey vids
@minmcmarkemterm9109
@minmcmarkemterm9109 2 жыл бұрын
what a tease, shows us all that work and then doesn't even run it lol. anyway can't wait to see what you do next with this project.
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Yes I am sorry for this, optimizing took me quite some time and I don't know how much more I will need to run and tweak the simulation so I preferred to do this that way
@exanc
@exanc 2 жыл бұрын
I can't explain how much I love optimisation, it's so satistfying.
@DannyHudetz
@DannyHudetz 2 жыл бұрын
Inspiring! Optimization, when it works, is probably the most satisfying part of programming
@KryyssTV
@KryyssTV 2 жыл бұрын
Dunno if this will help but there's been a breakthrough in neurology by the University of Tokyo where they appeared to have identified how the brain achieves self-awareness. This may be worth investigating for development of better neutral networks. In short, most neural networks are monodirectional which was believed to be how synapses work. But what has been found is that along the network are clusters of bidirectional synaptic nodes that compare the inputs from multiple monodirectional inputs and create a self-contained loop with one output. This appears to be a weighting system whereby the final output that is fed into the rest of the network is the one which didn't get cancelled out by the cross-connections within these bidirectional nodes. When you look at this from experience, this is how it is possible for you not to notice a headache when you stub your toe as it generates a stronger reaction. Or how a room can be so noisy that it's not possible to focus on a particular task or thought. The current neuroscience equasion for brain activity is r=f(s) but this discovery has them investigating an additional theory of sentience being C =g(r) where r is brain activity and C is a measurement of consciousness.
@PragyAgarwal
@PragyAgarwal 2 жыл бұрын
Storing the NN as a matrix will be much more efficient, since computing the next layer will be as simple as activation(input x weights) which will be way more efficient than manual looping if performed on a GPU. That alone might give you a significant performance boost. Also, if you wish to optimize the k-nearest neighbor queries, you can look into Quad-Trees
@MarcCastellsBallesta
@MarcCastellsBallesta 2 жыл бұрын
The visuals of the data structures is gorgeous!
@G82ft
@G82ft 2 жыл бұрын
Wow, the quality of explanations and the video itself is insane!
@RupertBruce
@RupertBruce 2 жыл бұрын
I love the animation! I did one of these years ago using the Qt Mouse Sprite demo as a base. One thing my kids loved in elementary school was choosing a mouse tribe to follow so I gave the mice different colours from a small pallette such that there were at least 10 mice of each colour. They had different colour ears for boy, girl, diseased(green) , old (white) then different sizes for child and adult and different rules for interactions between all characteristics. They would watch an initial world-building and different colours dying out or thriving and then the game would stop and they could type in their name to choose which colour from the remaining mice they thought would win by surviving longest. Some runs lasted hours!
@Weberbros1
@Weberbros1 5 ай бұрын
My guy! What great videos! Can’t believe I haven’t found you til now!
@kellenfoore5182
@kellenfoore5182 2 жыл бұрын
I really liked the visualizations of the concepts in this video. Keep up the amazing work!
@theblacktiger59
@theblacktiger59 2 жыл бұрын
Wonderful ! Hope to see more about this ! There is so much possibilities. Good luck with the project.
@astrovation3281
@astrovation3281 2 жыл бұрын
Thank you for having more colorblind friendly colors, you're like the first I've seen do this actually
@sawyersprott
@sawyersprott 2 жыл бұрын
Awesome, these videos are always bangers
@fabianarfire
@fabianarfire 2 жыл бұрын
Your channel is becoming amazing ! Great french accent btw ! And the animations are ON POINT ! 👌
@Scrawlerism
@Scrawlerism 2 жыл бұрын
this stuff is amazing! I cannot believe I missed the upload. I love that you're making the simulation larger.
@FahrurRoziqin
@FahrurRoziqin 2 жыл бұрын
Finally another masterpiece, colorblind friendly, Awesome
@match_mc114
@match_mc114 2 жыл бұрын
Even though we didn't get more results, this video was VERY interesting.
@Landee
@Landee 2 жыл бұрын
didnt notice your french lmao (jkiff ce que tu fais t'es un crack, continue comme ça bg)
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Merci, c'est toi le bg ;)
@God-ks5pv
@God-ks5pv 2 жыл бұрын
very good explanation, underrated channel.
@TheRealGamada
@TheRealGamada 2 жыл бұрын
Du grand mendez, et super bien expliqué en plus ! Bravo !
@taylors1545
@taylors1545 2 жыл бұрын
A few ideas: 1) instanced rendering, hopefully parallel push data to a command buffer if you can, depending on what lang you’re using. 2) for a spacial partitioning, you dont need a full blown physics solution. Use a quadtree, or even simpler: fixed cell, where you hash entities to a cell id via position. Say a cell is 10 x 10 units and an entity is at x:9.5,y:45 -> cell 1,5. With a fixed grid size this can be mapped to a 1 dimensional array. Honestly a multi-value hashmap is all you need for your simulation. 3) dont need to raycast. detect entities nearby then use the dot product. a ratio using dot products and distance will resolve line of site. 4) obstacles can be navigated once detected by influencing the steering by shifting the direction towards its perimeter. 2D line - polygon intersection is pretty simple.
@TheRainHarvester
@TheRainHarvester 2 жыл бұрын
Can you explain 3?
@Starsthebest
@Starsthebest 2 жыл бұрын
You should add “higher predator” blob that eats predators and is blue.The reason it’s a higher predator is because it’s higher in the food chain
@tyler2854
@tyler2854 2 жыл бұрын
Very cool! Loving the work so far!
@Quique-sz4uj
@Quique-sz4uj 2 жыл бұрын
Wow! You really stepped up the animation in this video. Nice work dude. Also nice voice
@tekbox7909
@tekbox7909 2 жыл бұрын
I love these videos also your voice is really nice to listen to
@michaelmam1490
@michaelmam1490 2 жыл бұрын
The animation in this video is really nice!
@MrEliteXXL
@MrEliteXXL 2 жыл бұрын
Really compliment for the quality of your animations!! Good job ;)
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Thank you!
@StainlessHelena
@StainlessHelena 2 жыл бұрын
I don't know a lot about code optimisation but this was impressive as hell!
@Deconus
@Deconus 6 ай бұрын
Tombé sur vos vidéos par hasard. Belle demonstration de comment optimiser du code!
@Stoneley
@Stoneley 2 жыл бұрын
cant wait to see your next vids love your content
@TaranovskiAlex
@TaranovskiAlex 2 жыл бұрын
That's awesome, it reminded my my own performance improvements search in my projects at work)))) Event processing is sometimes an interesting task) The conveyor with paralellized stages rules!))))
@alexislouis2320
@alexislouis2320 2 жыл бұрын
Nice insights ! Lovely smooth animations as well ;)
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Thank youuuu :D
@cremeeggstudios
@cremeeggstudios Жыл бұрын
this is giving me the idea of my own evolution simulator
@flameofthephoenix8395
@flameofthephoenix8395 Жыл бұрын
I didn't understand how object-oriented things like that worked on such a high level, I assumed that it would only load what you needed, and I figured that object storage was optimal, as I figured that they would be optimized in languages like Javascript which are designed for them.
@ADDthroughmusic
@ADDthroughmusic 2 жыл бұрын
Cool can't wait to see the results
@pitpot_
@pitpot_ 2 жыл бұрын
Very interesting and educative content, keep up the good work!
@AWMul
@AWMul 4 ай бұрын
What happens if we give them child like emotions and stop them from maturing and learning ?
@Alayric
@Alayric 2 жыл бұрын
Your tasks & threads representation at 7:11 is beautiful, what language did you use to write this little lib? I could see myself implementing something similar in CSS/JS
@erinkarp
@erinkarp 2 жыл бұрын
That was really impressive optimization!
@Arcticgreen
@Arcticgreen 2 жыл бұрын
I imagine a simulation of the evolution of predator eaters. As a predator scans and fails to see it's preferred food, it has x/20 chance of evolving to eat others of its own kind, where x is the number of units of its own kind that it can see. Maybe even throw in a special case for the "plants" in this, like if a plant sticks around long enough it will increase the chance of another plant growing around there eventually. This would give a simulation of how plants reproduce and grow over the years.
@glumpfi
@glumpfi 2 жыл бұрын
I had the same performance issue in my simulation project. One big problem was that creatures seeing each other leads to exponential interations since each creature has to check each other's distance. I thought about the solution of internal square blocks in which creatures can enter temporarily, so they only have to iterate through creatures in neighbour blocks, which could keep the total number low. When they move, they enter a new block. But i didn't test that out yet.
@TheRainHarvester
@TheRainHarvester 2 жыл бұрын
@@miquellluch1928 can you explain how distance would make O(n)? I'm picturing a sort of distances but then i'd need to create distance lists for every object.
@someonespotatohmm9513
@someonespotatohmm9513 2 жыл бұрын
@@TheRainHarvester You don't check for every creature, you have some preprocessing step eliminating most pairs. Like explained in the video by separating the world in small worlds which only perform collision checks between them. Or create buckets that only check themselves and neighboring ones. There must be thorough explanations of this existing online as this is quite a common problem and can be used outside collision checking as well. As long as you have some other information that tells you you can discard checks.
@TheRainHarvester
@TheRainHarvester 2 жыл бұрын
@@someonespotatohmm9513 yeah i do grids in my pps videos. Check them out. Do you use openMP. that's an easy speed up.
@hvgpilaatkaiken2300
@hvgpilaatkaiken2300 2 жыл бұрын
Cool project! A couple of suggestions, reading a bit between the lines: Sounds like you did a lot of guesswork on the optimizations - using profiler would discover the actual hot paths easily. Your reasoning for a graph representation sounds weird - a matrix representation is faster and if anything easier to update. Not aware of any reasons to use pointers besides saving memory on sparse graphs with a lot of nodes. Reorganizing agents from aos to soa easing threading seems weird - your problem domain seems trivially data parallel: Just split the agents into # of threads chunks and proceed normally. Use separate output buffer if data races are a concern - flip input and output buffer for the next frame. Next step: Cuda/OpenCL ^^
@JordanBeagle
@JordanBeagle 2 жыл бұрын
Wow, impressive that you got it down from 570 ms to 19 ms!
@davawen9938
@davawen9938 2 жыл бұрын
t'es un vrai fou mec, continue comme ça 👌
@SuperFurias
@SuperFurias 2 жыл бұрын
yes!! i like simulation like these, there you are again
@boberboberowski3411
@boberboberowski3411 2 жыл бұрын
I can't wait to see the results
@MarieCrossbow
@MarieCrossbow 2 жыл бұрын
These were most of the optimizations I also ran through when I was doing my version of this in Rust. My NN are just forward pass matrix mults with a relu activation though
@fireice3040
@fireice3040 2 жыл бұрын
I think instead of having a capacity, add a floor with food for preys to eat which runs out. That’ll make things a lot more complicated. There also might need to be some number changes to make sure one team doesn’t win immediately
@poirotpotiron6307
@poirotpotiron6307 2 жыл бұрын
Very interesting, most of the time people don't speak about their optimisations ^^
@SeeNyuOG
@SeeNyuOG 2 жыл бұрын
I've just been talking (I'm a noob) about caching and lowering detection range and the video appears. Great noob-friendly video. You shoulda create a learning program and sell it!
@Omena0
@Omena0 2 жыл бұрын
Make agents have hearing so they evolve to be more quiet. Also add a day-night cycle and when its night make there be an atribute of how stealthy an agent is, so even if a ray hit it the agent would not see it
@vb0t429
@vb0t429 2 жыл бұрын
Great video, and amazing visuals! Did you use a library or make your own?
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Thank you! I made my own library for these animations
@vb0t429
@vb0t429 2 жыл бұрын
​@@PezzzasWork That's amazing! Are you going to make them open source, because they're pretty damn good and I'd love to use it :D
@YOOOOOOOOOOOOOOOOOOOOOOOOOOOO
@YOOOOOOOOOOOOOOOOOOOOOOOOOOOO 2 жыл бұрын
amazing animations
@patrikkrouwel3709
@patrikkrouwel3709 2 жыл бұрын
Love this! Can you download or buys this simulation?
@user-sl6gn1ss8p
@user-sl6gn1ss8p 2 жыл бұрын
As others have said, the visualizations are great, and the project too : ) I was wondering, does the rendering have any reasonable impact on performance?
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Thank you! The rendering is really fast compared to update time, around 2ms. But it could certainly be optimized
@lucaseastman1877
@lucaseastman1877 2 жыл бұрын
Can't wait to see it. :D
@medanesmihoubi8795
@medanesmihoubi8795 2 жыл бұрын
Sounds great
@swift_goose
@swift_goose 2 жыл бұрын
This is very well presented, I love your style and I love this video concept, can’t wait to see what else you do with it! What are you using for your animations while you are explaining?
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Thank you very much! For the animations I am using a tool I made for this purpose
@swift_goose
@swift_goose 2 жыл бұрын
@@PezzzasWork I somehow knew you would say that 😎. Very professional! Thanks for sharing
@whosgonnamaketheclownsmile
@whosgonnamaketheclownsmile 2 жыл бұрын
Awesome, great video!
@mariojuan7539
@mariojuan7539 2 жыл бұрын
i used to watch your ant sim vids and i loved them, but this is on another level! the video is really well made and feels really proffesional, honestle youre one of my favorite coding channels, keep it up
@nadavmihov
@nadavmihov 2 жыл бұрын
Very interesting video!
@Krazylegz42
@Krazylegz42 2 жыл бұрын
Really fantastic visuals, awesome video. Is there a limit on the range of the raycasting?
@PezzzasWork
@PezzzasWork 2 жыл бұрын
There isn't any "hard" limit but a bigger range would be very costly, that's why I choose this one, being a balance between range and performance
@jeandy4495
@jeandy4495 Жыл бұрын
Déjà la vidéo est hyper bien, mais aussi petit big up à ton accent français haha :)
@coreblaster6809
@coreblaster6809 2 жыл бұрын
The key to help colorblind people is to make the agents different *brightnessess*.
@Malkovith2
@Malkovith2 2 жыл бұрын
I think if you implemented sound and that the creatures produce sound by moving, they would eventually evolve to wait until last moment to catch he prey. So many possibilities. These evolution videos are great to watch, but often leave me underwhelmed due to how much more there can be tried.
@plockjo_8640
@plockjo_8640 Жыл бұрын
Its amazing what you are doing! can you make a tutorial how to create such a simulation? It would be great
@quentinj.984
@quentinj.984 2 жыл бұрын
Honestly, respect to you & your work. Your first video awake a passion about neural network theory and i even tried to reproduce it on Unity. By the way, what do you use for your simulation ? Is it from scratch or do you use a game engine ?
@PezzzasWork
@PezzzasWork 2 жыл бұрын
Thank you! For my simulations I made my own framework from scratch
@quentinj.984
@quentinj.984 2 жыл бұрын
@@PezzzasWork oh my god... 😂 Amount of work is so hudge. I'm impressed and I'm waiting for your next video with impatience ! Good luck
@hello-hb1ll
@hello-hb1ll 2 жыл бұрын
Idea: what if you add plants that the prey agents can eat? The plants can't be eaten by predators and don't move. Therefore, it would be nice to see how the prey agents evolve to stay close to plant hotspots
@DerAua
@DerAua 2 жыл бұрын
Wow, very interesting.
@multiarray2320
@multiarray2320 2 жыл бұрын
isnt it way better to precalculate every frame and store position and velocity of every prey/predator in a (json) file. this way you dont need real time calculation and you can do a way bigger simulation. this also means that all of the performance of the computer is used. then you need to write a program to draw the results of the json file as a video which is not that hard for a computer to calculate.
@ratchet1freak
@ratchet1freak 2 жыл бұрын
that's not the problem, the problem is that even doing a no render simulation runs at 2 fps for a simulation that he wants to run for tens to hundreds of thousand of frames. That means days to weeks spent simulating a single world when it could instead be hours after the optimizations he did in this video.
@eggpoison5182
@eggpoison5182 2 жыл бұрын
Very interesting!
@firstdingus
@firstdingus 2 жыл бұрын
Really nice video. I have a little question, when you already implemented multithreading into the simulation, why didn't you just use the gpu instead of the cpu, since the gpu is made for parallel processing?
@keos5363
@keos5363 2 жыл бұрын
Make it a website so we can try it out aswell :D
@recouer
@recouer 2 жыл бұрын
Did you think of using you GPU in order to increase performances ?or is it not possible at all
@neomorphosallomorphis7395
@neomorphosallomorphis7395 2 жыл бұрын
i was wondering, are you unhappy with the chicken voiceover portrait you made in the last video? it isn't in this one
@hakajiru264
@hakajiru264 2 жыл бұрын
With optimization tasks, it would be interesting to show first how you found the bottlenecks in the code, to then better understand how you came up with the solutions.
@donkeyy8331
@donkeyy8331 2 жыл бұрын
profiling is always a god sent when trying to find bottlenecks
@puppergump4117
@puppergump4117 2 жыл бұрын
The typical predator/prey simulations are very boring. How about interbreeding between them? Will omnivores appear and how will they behave? Maybe each "agent" can have a personality trait that leans toward either passive or aggressive depending on how long it's been chased around for. Maybe predators can eat each other in case of famine. Maybe they can inherit different colors and colors similar to predators have a higher chance of survival? Also, this is the best video yet.
@harrygame327
@harrygame327 2 жыл бұрын
You can also make some ''communication'' with a ''stress'' mechanic: if an agent see hight stress in they prey or predator and a low stress on his team, he want to more attack. If an agent see the ''ennemi'' team killing his team or his friend stressed, he want to leave the front. I hope you understand what i say ...
@paulkanja
@paulkanja 2 жыл бұрын
another performance improvement: reduce the max distance of your raycasts (also try having really long events take place over multiple frames)
@tanguydamart8368
@tanguydamart8368 Жыл бұрын
What did you use for the ray casting ? Are you checking for the collision between the vision rays and all the spheres in the environment ?
@erinkarp
@erinkarp 2 жыл бұрын
If you're familiar with the bibites, there's a lot of features you could add from there
@josemaquille5469
@josemaquille5469 2 жыл бұрын
wow this is so impressive
Much bigger simulation, AIs learn Phalanx
29:13
Pezzza's Work
Рет қаралды 2,8 МЛН
This Game Is Wild...
00:19
MrBeast
Рет қаралды 120 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,1 МЛН
Coding Adventure: Ant and Slime Simulations
17:54
Sebastian Lague
Рет қаралды 1,9 МЛН
How to train simple AIs
12:59
Pezzza's Work
Рет қаралды 81 М.
Reinforcement Learning - My Algorithm vs State of the Art
19:32
Pezzza's Work
Рет қаралды 98 М.
C++ Ants Simulation 5, Ants Fight
9:24
Pezzza's Work
Рет қаралды 1,1 МЛН
A.I Learns to Play TOWER DEFENSE
11:32
ZuzeloApps
Рет қаралды 203 М.
Predators and Prey - Numberphile
16:53
Numberphile
Рет қаралды 220 М.
How You Will Lose Your Job To AI
7:25
Lazy Owl
Рет қаралды 355 М.
AI Learns to Walk (deep reinforcement learning)
8:40
AI Warehouse
Рет қаралды 9 МЛН
Real time Fire Simulation
7:23
Pezzza's Work
Рет қаралды 158 М.