Simulating Animal Behavior - Wandering, Kinesis and Slimes

  Рет қаралды 19,743

DV Gen

DV Gen

Күн бұрын

This video shows a simulation of animal behavior in the Unity game engine. Specifically it discusses kinesis, one of the simplest behaviors. Using kinesis, animals sometimes appear to have a goal directed behavior, but actually are just wandering into good areas.
Wikipedia entry on Kinesis: en.wikipedia.org/wiki/Kinesis...)
Twitter: / _dv_gen_

Пікірлер: 92
@claytonharting9899
@claytonharting9899 2 жыл бұрын
This video was really good! It reminds me of Primer’s biology/genetics videos, but focused on a different aspect of the creatures’ “lives”. Very interesting and unique. This is going to be a really cool series if you plan on making more
@dvgen
@dvgen 2 жыл бұрын
Thanks. I'm a big fan of Primer, so that is a great complement! A series on behaviors like this will be my next focus after finishing a few on wave function collapse. The goal would be to start with simple behaviors, like kinesis, and progressively get more complex.
@justingolden21
@justingolden21 2 жыл бұрын
Love primer as well. About to sub to this guy. Curious to see what he makes in the future. I really liked the terrain generation video which is how I got to this one
@alacer8878
@alacer8878 2 жыл бұрын
My disappointment upon seeing that you only have this and other other video is immense. The topics you presented and the way you presented them were endlessly interesting. You've got a new sub, and I hope you post more content soon.
@NoTengoIdeaGuey
@NoTengoIdeaGuey 2 жыл бұрын
Worst part about these videos is that they're too short, I get really engrossed in what you're talking about and then you're telling me it's over 😩. Keep it up dawg.
@dvgen
@dvgen 2 жыл бұрын
That is good to hear, because I was a little concerned these would feel too long. Next time I might let a little bit more of my true long-winded self come through. :)
@PenguinjitsuX
@PenguinjitsuX 2 жыл бұрын
This is so dang interesting! I just came from your WFC video and your topics are super unique and cool. Instantly pressed the subscribe button!
@dvgen
@dvgen 2 жыл бұрын
I'm glad to hear people are coming from the better produce video and still enjoying this one. I'll have to remake this one at some point to match the quality of the other.
@redeamed19
@redeamed19 2 жыл бұрын
I love systems like these. I've tried a few. this concept of kinesis was new to me. makes sense for simple movement. would love to see it as a possibility from some for of genetic algorithm to see if the strategy gets picked up on over generations. I mean it should. it seems prime for the sort of neuron connections that make such simple behaviors viable.
@dvgen
@dvgen 2 жыл бұрын
I'm glad you like it. A genetic algorithm would be really fun. I've had some of the same ideas, and ideas on how to implement it, but I need to get a few more solid behavior systems together first. I'm going to have to try that one day though. For now, I get my evolution fix from The Bibites. Check that out if you haven't seen it already.
@endrawes0
@endrawes0 2 жыл бұрын
Enjoyed your first two videos. Looking forward to more!
@Andreopimentel
@Andreopimentel 2 жыл бұрын
this channel is amazing! great stuff
@fokeyjo
@fokeyjo 10 ай бұрын
Wow.. that is so subtle. I'm looking at implementing UtilityAI at the moment for modelling fish behaviour, but it hasn't really been jumping out as how to get a more continuous wandering feel with it. This might be a nice compromise. Your other videos are really cool, too. I like that you are going off the beaten track and not blindly following tutorials, and you're giving time to research and experiment before publishing a video. Don't give in to the algorithm!
@dvgen
@dvgen 10 ай бұрын
I'm glad you liked this one. It is a bit rougher than the newer ones, so I might revisit it later. If you haven't already, look at Craig Reynold's steering behaviors. It could be helpful for what you are wanting. I think this would also fit within that framework nicely. Utility AI is something I also really want to work on later. I've only got to do a little bit with it so far. There are some interesting decisions there, like do you want to make wandering a behavior on its own, or do you want to integrate wandering with other behaviors? Ranking behaviors by utility is a great fit for how we understand human and animal behavior, in a scientific sense, but also it might reflect some biases of the scientific literature too. I feel like in the real world, we are often doing multiple behaviors at the same time. A single behavior approach, like in Utility AI (or in many research papers) doesn't capture that unless you are very clever about how you engineer things.
@grobble7321
@grobble7321 Жыл бұрын
Simulation videos are always the best
@user-sl6gn1ss8p
@user-sl6gn1ss8p Жыл бұрын
I swear this is actually a life lesson. Feeling comfortable? Bide you time. Uncomfortable? Pick up the pace. Don't know why you feel this way or where to go? No problem, just follow your feet.
@jeffcummings3842
@jeffcummings3842 2 жыл бұрын
You have such a natural teaching / explaining quality! Thanks for sharing, you only have 2 videos! HAHA, please make more!
@dvgen
@dvgen 2 жыл бұрын
Thanks! Teaching is my day job, so I do have a bit of practice :) More videos coming, I promise!
@UliTroyo
@UliTroyo 2 жыл бұрын
Great videos! Definitely sticking around for more.
@dvgen
@dvgen 2 жыл бұрын
Thanks, always good to hear :)
@gerixxx1
@gerixxx1 2 жыл бұрын
Awesome, I love all these similations, especially about evolution or behavioural studies!! Please do more😊
@Wbjpen
@Wbjpen 2 жыл бұрын
An AI finding its way with dumb algorithmic exteroception as an animal might is fascinating. I would be very interested in seeing what other kinds of sims can be done with behavioral concepts.
@dvgen
@dvgen 2 жыл бұрын
Well stick around for more of that. The terrain generation is a necessary prerequisite that I often get distracted by, but nature inspired behavior simulations are my main goal, and closer to my actual area of expertise.
@VHenrik007
@VHenrik007 2 жыл бұрын
Came from your other video, and I got to say, I'm really looking forward to your other videos. Has a bit of a Primer vibes to it. Let's go champ!
@dvgen
@dvgen 2 жыл бұрын
Thanks! I'm a big fan of Primer, so that is a very welcome compliment.
@whiitehead
@whiitehead 2 жыл бұрын
This channel gonna pop off
@dvgen
@dvgen 2 жыл бұрын
Apparently so!
@kira.jyints
@kira.jyints 2 жыл бұрын
You seem to be correct
@carbonsinatrenchcoat
@carbonsinatrenchcoat 2 жыл бұрын
So that's how the little guys get arround! I've always wondered how creatures got to do this... Awesome video!
@stablemind
@stablemind Жыл бұрын
Alternative video names; "Simulating Life on Digital #1 | Simple Functions" or "Creating a Digital Life Forms #1 | Wandering, Kinesis and Slimes". Einstein said; “Everything is energy and that’s all there is to it. Match the frequency of the reality you want and you cannot help but get that reality. It can be no other way. This is not philosophy. This is physics.”
@musikalniyfanboichik
@musikalniyfanboichik 2 жыл бұрын
Very interesting and educating video :) I'd like to see more stuff like this from you
@butanium_
@butanium_ 2 жыл бұрын
Very nice explanation, I came here thanks to the bibites channel and I can't wait to see more of your stuff
@dvgen
@dvgen 2 жыл бұрын
Thanks. I'll keep highlighting things as I develop new systems. Right now I'm focusing on wave function collapse terrain generation.
@butanium_
@butanium_ 2 жыл бұрын
@@dvgen what is this ? Maybe I'll have my answer in your next video ahah
@dvgen
@dvgen 2 жыл бұрын
@@butanium_ Sorry, I didn't see this earlier. Was too busy making the next video. And yes, you should have your answer there :)
@VoidloniXaarii
@VoidloniXaarii Жыл бұрын
Thank you very much. This was very interesting to think about
@JNelson_
@JNelson_ 2 жыл бұрын
Interestingly a similar technique is used by heat seaking missiles to keep their seeker on the target.
@dvgen
@dvgen 2 жыл бұрын
Thanks! I'm already working on the next one. :)
@poogl3
@poogl3 2 жыл бұрын
Good stuff!
@firstnamelastname-oy7es
@firstnamelastname-oy7es 2 жыл бұрын
It looks like this demonstration used two distinct areas of comfort. It would have been really interesting to see the difference if the temperature area was more like a constant gradient going from hot to cool. Would all the slimes have made it to the right side wall faster if they adjusted their speed and rotation speed depending on how hot or cool they were?
@dvgen
@dvgen 2 жыл бұрын
I don't have this particular scene saved anymore, but I think you are right. I also agree, a continuous gradient would be really interesting. It may make it a little more challenging to see the effect, but it would also make the simulation more realistic to nature. At some point, I'm going to remake this video, and I do want to include something like a hot-cool gradient.
@xiphosura413
@xiphosura413 2 жыл бұрын
Distinct patches would also be fascinating to study, can they still keep a majority in small, isolated pockets of comfort? It'd be fun to see them cluster in the cool zones and zip along between them
@user-sl6gn1ss8p
@user-sl6gn1ss8p Жыл бұрын
@@dvgen Maybe a hot-cold gradient between hot-cold zones would be interesting too?
@PorkSKing
@PorkSKing 2 жыл бұрын
great!
@fifty-sqrd
@fifty-sqrd 2 жыл бұрын
That'd be awesome if we could somehow simulate the idea I'm working on. It's about Commons, Prisoners Dilemma and how the social cohesion and social norms might affect the payoffs and therefore actions taken. The big question is "why do humans cooperate in some situations where self interest is evident and rationally they would go Tragedy of Commons all the way but it doesn't happen" Elinor Nostrom, Governance of Commons
@k.k.9378
@k.k.9378 2 жыл бұрын
What if the slimes had the same sensors and moves as here, but could remember how comfortable they were a second ago?
@dvgen
@dvgen 2 жыл бұрын
So, like a decaying memory of how content they were? They did have a little bit of a gradual change in comfort level on entering an area. That might function a little like a delayed memory. I think adding more delayed memories would just function to slow down the overall effect. For something substantially different to happen, they might need to not only remember how comfortable they were, but *associate* that comfort with a particular stimulus or area. Associative learning is *definitely* on the to do list. It is a very important topic for me, and a major focus of my actual research. There are so many things to be simulated there. But for the moment, I want to solidify a terrain system and art style first.
@TeodorAngelov
@TeodorAngelov Жыл бұрын
I love it. Any guide on how to begin with such simulations?
@dvgen
@dvgen Жыл бұрын
I'm going to have to redo this video, or something related at some point. What kind of thing do you think you would want to see in terms of guides?
@kira.jyints
@kira.jyints 2 жыл бұрын
This topic fascinates me. I’d like to see what happens when you add more complexity to the system, adding in more zones and maybe varying speeds depending on the number of zone statuses affecting the creature. Adding that zoning to the 3D world you’re making could be really interesting to watch them “explore”
@dvgen
@dvgen 2 жыл бұрын
I'm eager to try things like that too! Building behavioral components bit by bit and combining them to see emergent complexity is a big goal of mine. I'd like to keep the systems somewhat biologically/psychologically authentic too.
@kira.jyints
@kira.jyints 2 жыл бұрын
@@dvgen Ye, I wanna see the emerging complexities as the simulation builds, and how they may relate to real life organisms, it’s fascinating. I’m excited for your future videos and will be awaiting them patiently!
@qualle987123
@qualle987123 2 жыл бұрын
Very cool video. I tried to implement this myself but I still need to tweak the variables for changing the speed and satisfaction. If those are not correct, the organisms will spend more time in the dangerous habitat since they move into it way to fast and then get stuck there.
@henrikd.8818
@henrikd.8818 2 жыл бұрын
This is thermodynamics, hot gas expands and is less dense. Makes sense to me.
@xerveeon
@xerveeon 2 жыл бұрын
What if the creature preferred hot rather than cold? Interesting point, tho
@henrikd.8818
@henrikd.8818 2 жыл бұрын
@@xerveeon Hot means more kinetic energy, not whatever you define in your problem statement. You can look up the Ideal Gas in Kinematik Gas Theory. It's basically your simulation here just with particles which do never turn. Very interesting to see these videos, keep up the good work
@xerveeon
@xerveeon 2 жыл бұрын
@@henrikd.8818 I guess I should have just said that the slime in the simulation could prefer the "hot" region over the "cold" region if you just change the variables in the code. Actually, scratch that, I understand what you mean now; the terms that are defined don't matter, it's just that when something slows down in the "preferred" area, it is more likely to be in that area after a time. Thank you for your explanation, which led me to my thought process.
@dvgen
@dvgen 2 жыл бұрын
Actually... now that I'm thinking about it, there have been times that thinking of simple organisms more like particles instead of rationale creatures with goals has helped me to understand them better. So really, the comparison to thermodynamics might be helpful at times. It is always good to step back and see if there are other connections like this that can be made.
@djblast101
@djblast101 2 жыл бұрын
We can all learn from this slime.....when things gets hot in life get moving
@alaricsnellpym
@alaricsnellpym 2 жыл бұрын
I guess a small increment in complexity with a big payback in efficiency would be to give the creatures a slightly directional sense - how comfortable am I on a few discrete points around my perimeter - so they can turn towards comfort.
@dvgen
@dvgen 2 жыл бұрын
The directional version of this is called taxis. I'll come back to that topic for a video at some point. Kinesis is great for simple animals, and senses that don't lend themselves to directional information, and taxis is great for going toward or away from something, if there is good directional information and an organism can budget the sensory or neural power to deal with it. Just a few discrete points like you suggest will pretty much take care of it.
@alaricsnellpym
@alaricsnellpym 2 жыл бұрын
@@dvgen I'll bear that in mind next time I take a taxi! 🤣
@3nertia
@3nertia 2 жыл бұрын
Watching this kind of reminds me of Brownian motion lol
@Antypodish
@Antypodish 3 жыл бұрын
Hey, I have seen you commented on my vid, but comment is not showing (deleted?). So I decided find you. And you have interesting video here about Kinesis. I didn't realized for this behawior previously. But all makes sense now after vid. :) What is the motivation for this vid? Is for an academia purposes?
@dvgen
@dvgen 3 жыл бұрын
Thanks for stopping by! KZbin is being weird lately, I'll recomment. I'm actually a behavioral scientist, so this is the kind of thing I teach and research. I really like behavior, so I also really like to simulate things. I go back and forth between some proper game ideas, but it always comes back to behavior eventually. I'm hoping to do more of this kind of thing and build more realistic behavior systems in Unity DOTS, starting from simple and moving to more complex things. This particular project was especially interesting though, because I've never actually done a kinesis experiment with real animals. It was very cool to simulate the principles in code and it just all worked out perfectly!
@Antypodish
@Antypodish 3 жыл бұрын
@@dvgen Yeah, by looks of it, you got spot on result. It is interesting, where using Unity DOTS for scientific applications. I think it is pretty valid use case in such case. Did you consider using different software as well? I.e. Matlab, for such simulations? I used matlab in the past, so I am just curious for choice of tools.
@dvgen
@dvgen 3 жыл бұрын
@@Antypodish I use Python and the SciPy library for work things. From what I understand that library has a lot of Matlab equivalent tools. I mostly use it for graphs and stats, but some computer vision and neural network stuff too. I think I found Unity one day after getting an itch to try a boids simulation and wanting something better than doing it in a Python scatter plot. I'm really doing this project for fun, but later down the line I realize there are a few simulations I've outlined that seem to make sense to me, but don't have any corresponding literature, so perhaps some of this might become a work thing. Parts could be used for teaching too. At the moment, I'm at least trying to keep my work interests and hobby interests separate.
@Antypodish
@Antypodish 3 жыл бұрын
@@dvgen Yep, pure scientific literature in terms of Unity DOTS may be none existent. Indeed python has great bunch of tools available. DOTS term itself has ben cobbled just around 2-4 years ago. The DOTS focus, which is mainly Burst, jobs, ECS together, these been worked on Unity since around Unity 5. But each individual tech exists far before then (not in Unity). Unity decided to introduce it and marry these 3 techs. Joachim Ante will be the first point of reference, in terms of DOTS. I see great potential scientific value there. But academia may find reason to put stoppers, using such engine, over python or Matlab.
@dvgen
@dvgen 3 жыл бұрын
@@Antypodish Oh actually I was meaning lack of literature on mathematical behavior simulations when basic theory has been around forever and a mathematical interpretation seems obvious (especially when you go to simulate it). Mathematical models are very popular in some areas, but there are still some surprising gaps in the literature. I've been following DOTS for a while, and also lurking on the DOTS forums too, so I've seen some of the cobbled together process. It still needs some work, but it's starting to feel like it is coming together. I've got some papers on behavioral technology related things that used a less popular platform, for good reason, that I'm pretty sure will always go unnoticed because of the platform I selected. I agree, that is how academia is. Lesson learned.
@pzokyregnessem9049
@pzokyregnessem9049 2 жыл бұрын
So if you used multiple types of good/bad areas at the same time how more complex would the code get for each addition of a type of area? (I haven't used unity ever) Would it just be additive, multiplicative or exponential?
@dvgen
@dvgen 2 жыл бұрын
That is a good question. I don't think there is any one right answer. It depends on how you want to implement it. It is also a good question because I don't know what approach would be the most authentic to nature, and I'm actually not sure that information is out there.
@brodiebaxter99
@brodiebaxter99 2 жыл бұрын
This is a really cool video but I think the thumbnail turns people away from it. Maybe use the red/blue testing area as a backdrop for some text instead?
@dvgen
@dvgen 2 жыл бұрын
I'll redo this one at some point to bring it up the the quality of my current set up, as well as make some other changes. But you are right, I might look into changing the thumbnail now. Thanks.
@debblez
@debblez 2 жыл бұрын
wouldnt you want to turn more in cold places? if you go in a circle youll stay put but a straight line you go right back to the heat
@dvgen
@dvgen 2 жыл бұрын
Great thought! There are actually terms for this. Orthokinesis is related to overall speed. Klinokinesis is related to turning rate. Sometimes you do see the turning-based kinesis instead. Kinesis is sort of an older research topic that few are actively investigating anymore, so I'm not sure we we know when to expect a speed-based vs turning-based kinesis. We may only have a few examples of each.
@seigeengine
@seigeengine 2 жыл бұрын
No. Turning consumes energy, which is not something you'd desire in a comfortable environment. The point of turning is to be more likely to then wander back over the edge into a more suitable environment, like imagine a creature that like shade wandering out into the sun. If it's more likely to turn, it's more likely to end up back undet the shade it just left.
@debblez
@debblez 2 жыл бұрын
@@seigeengine thats true. maybe if you just plopped them in the middle of an environment is different from real life where you enter areas from the dges
@yyosted
@yyosted 2 жыл бұрын
Could you accomplish the same long term behavior with a Markov matrix?
@dvgen
@dvgen 2 жыл бұрын
Maybe so. I have colleagues that work with behavior in terms of Markov chains, and I've been asked to consider some of my research that way as well. I haven't really thought about this from the simulation perspective, but it is definitely something I want to look into more.
@eXca1iburN
@eXca1iburN Жыл бұрын
Can I ask why you chose to interpolate between two behaviour scripts instead of just using a state machine approach?
@dvgen
@dvgen Жыл бұрын
That is a good question. The main answer is that I just felt like interpolating between variables in my wandering script would be a little more authentic. I wanted to see if I could simulate the kinesis trends I read about, and it felt like a continuous approach would be the way to go. I was really just following my intuition, but now I want to try a discrete state machine approach too and see what that outcome is like. I think if I wanted to put this together with other behaviors in a state machine, wandering might be a state, but how the wandering behavior was executes could be adjusted through interpolation like I did here.
@eXca1iburN
@eXca1iburN Жыл бұрын
@@dvgen if the states can operate on the same variables and functions; the new behaviour script could use a single behaviour controller, with the state machine only modifying the variables that actuate it? Maybe use a transition state to trigger those variable values being interpolated between? I do like the approach of blending between scripts that you took, I've just never seen it and am only thinking in state machines because that's what I know =)
@dvgen
@dvgen Жыл бұрын
​@@eXca1iburN Yeah I think that could make sense too. I approached it the way I did because I was thinking from a biological perspective and, at the time of the video, I had only used state machines for animation. I did this because I was because I was not well experienced with state machines. It is interesting how a little ignorance can help us think outside of the box. If we are lucky, some of those novel ideas are good and worth pursuing. I was also working with Unity's ECS and that requires a lot of novel solutions for now.
@bogatyrstudios1272
@bogatyrstudios1272 2 жыл бұрын
i want to know how to get better at unity because im a begginner and im very interested into these kind of topics.
@dvgen
@dvgen 2 жыл бұрын
For me, Sebastian Lague's early videos, Brakeys, and Code Monkey were all really helpful. I'll try to post helpful resources here and there too. It definitely takes time, and don't feel like you have to learn everything all at once. It took me a few years before I felt like I knew what I was doing.
@bogatyrstudios1272
@bogatyrstudios1272 2 жыл бұрын
@@dvgen wow well thanks alot ill make sure to watch your guide videos if you make one
@artemonstrick
@artemonstrick 2 жыл бұрын
Sad, slimes dont know that they are cool :(
@dvgen
@dvgen 2 жыл бұрын
Those poor little guys :(
@hurgletislife
@hurgletislife Жыл бұрын
i thought the slime was a funny green dog :c
@dvgen
@dvgen Жыл бұрын
🤣 Programmer art
@ABrainrotAwayFromHeaven
@ABrainrotAwayFromHeaven 2 жыл бұрын
Does simple creatures are gonna die faster because of climate change ?
@dvgen
@dvgen 2 жыл бұрын
I think it depends on the organism. Climate change could be actually be *good* for some species. It may give them access to habitats that were too cool for them before. Other species will certainly struggle, and will no longer be able to live in areas that become too hot, humans included. Even with drastic climate change, some life *will* go on, but it will affect human society quite a good deal.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,3 МЛН
IS THIS REAL FOOD OR NOT?🤔 PIKACHU AND SONIC CONFUSE THE CAT! 😺🍫
00:41
Which one is the best? #katebrush #shorts
00:12
Kate Brush
Рет қаралды 18 МЛН
Backstage 🤫 tutorial #elsarca #tiktok
00:13
Elsa Arca
Рет қаралды 33 МЛН
Sigma Girl Education #sigma #viral #comedy
00:16
CRAZY GREAPA
Рет қаралды 121 МЛН
Animal Crossing, wobbly leaves, pivot caching.
8:06
Martin Donald
Рет қаралды 111 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
The Trick I Used to Make Combat Fun! | Devlog
8:12
Game Endeavor
Рет қаралды 1,6 МЛН
AI BREAKS NES TETRIS! - 102 MILLION and level 237
25:48
Greg Cannon
Рет қаралды 2,7 МЛН
Coding Adventure: Ant and Slime Simulations
17:54
Sebastian Lague
Рет қаралды 1,8 МЛН
A new way to generate worlds (stitched WFC)
10:51
Watt Designs
Рет қаралды 505 М.
BEST CLASS in Diep.io! WATCH THIS!
13:42
SSundee
Рет қаралды 10 МЛН
I FORCED EVOLUTION In The Perfect Ocean Ecosystem
14:22
Blitz
Рет қаралды 678 М.
How I created an evolving neural network ecosystem
10:09
The Bibites: Digital Life
Рет қаралды 331 М.
Designing (Procedural) Monsters
4:31
RujiK the Comatose
Рет қаралды 918 М.
IS THIS REAL FOOD OR NOT?🤔 PIKACHU AND SONIC CONFUSE THE CAT! 😺🍫
00:41