Coding Adventure: Boids

Coding Adventure: Boids

Sebastian Lague

5 лет назад

1,586,651 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@gyboti_
@gyboti_ - 08.02.2023 23:43

this is so amaing

Ответить
@zvxcvxcz
@zvxcvxcz - 22.02.2023 15:56

And if you have the golden ratio... there is a closed form solution for the nth number in the Fibonacci sequence. Deriving that was fun...

Ответить
@yannicko.5936
@yannicko.5936 - 23.02.2023 10:42

what is the language used here?

Ответить
@gaymedievaldruid
@gaymedievaldruid - 03.03.2023 00:59

I think I might actually cry, I have become emotionally attached to the fishies and they were on screen for not even 30 seconds

Ответить
@rasronin
@rasronin - 11.03.2023 23:01

Awesome

Ответить
@ames_virosa
@ames_virosa - 15.03.2023 22:44

Your voice is so calming it actually helps me sleep haha

Ответить
@pinchopaxtonsgreatestminds9591
@pinchopaxtonsgreatestminds9591 - 18.03.2023 15:47

I don't know if they are Boids, they look more like Feesh!

Ответить
@Gibbits5.7
@Gibbits5.7 - 05.04.2023 04:26

Btw the fin on the top of the submarine is going the wrong way when you turn

Ответить
@vladthe_cat
@vladthe_cat - 09.04.2023 05:11

FIMSHIES!!!🙀🙀😼😼

Ответить
@synoptic4753
@synoptic4753 - 12.04.2023 09:01

Swirling patterns like in galaxies... 🤔

Ответить
@norude
@norude - 15.04.2023 22:45

Can you make one on using quantum mechanics to generate maps

Ответить
@vadymdmytrenko3331
@vadymdmytrenko3331 - 03.05.2023 12:56

What IDE is being used, could you tell me please?

Ответить
@minorseven8134
@minorseven8134 - 23.05.2023 11:38

Very inspiring to watch + cool result + cute dog profile picture = perfection.
Thanks for creating this

Ответить
@mulethedonkey2579
@mulethedonkey2579 - 31.05.2023 02:16

So the golden ratio would be, the ratio of the entire line to the bigger segment is the same as the ratio between the bigger segment to the smaller one. Symmetry. Does it work like a fractal then to keep from colliding as the smaller segment becomes A + B or is that just completely not how it works?

Ответить
@keithin8a
@keithin8a - 05.06.2023 18:36

14 years ago, I tried creating a modified boids system with different personalities which affected the cohesiveness of the flock. It worked perfectly apart from the obstacle avoidance and now you may have given me the ability to close that chapter of my life!

Ответить
@ariochiv
@ariochiv - 18.06.2023 00:49

...kind of lost your mind for about 3 minutes in the middle there. 😅

Ответить
@sk8erJG95
@sk8erJG95 - 23.06.2023 15:43

Fun math fact, the golden ratio isn't a property of the Fibonacci sequence itself, it's a property of the recursion that defines it.

F(n) = F(n-1) + F(n-2) can be solved by converting it to its characteristic equation x^2 = x + 1, and solving x^2 - x - 1 = 0 gives you the golden ratio!

So this tells us F(n) = A(phi^n) + B(phi^(-n)) for some constants A and B that depend on the initial conditions for the recursion.

That means we can approximate F(n) ≈ A(phi^n), so F(n)/F(n-1) = A(phi^(n))/(A(phi^(n-1))) = phi.

Or use limits and be more precise.

Ответить
@OriginalJetForMe
@OriginalJetForMe - 06.07.2023 01:22

I worked with Craig at my last company!

Ответить
@mulethedonkey2579
@mulethedonkey2579 - 27.07.2023 11:33

Probably either started or had this finished by Saturday (it was posted on a Monday) because Saturday is for the Boids

Ответить
@GregMoress
@GregMoress - 28.07.2023 02:45

During all your trials and attempts... Ever feel like the exact opposite of Oppenheimer's "I am become death"?
For you have become evolution.

Ответить
@williamshakespeare987
@williamshakespeare987 - 14.08.2023 17:29

Boids i.e Birds from New York

Ответить
@DrDandD
@DrDandD - 23.08.2023 08:57

Thank you, this was very helpfull in creating my own collision detection system for fish ai "not boids just singular fish"

Ответить
@t.r.e.z.e
@t.r.e.z.e - 27.08.2023 02:41

muito bom!

Ответить
@DasAntiNaziBroetchen
@DasAntiNaziBroetchen - 16.09.2023 09:29

FYI: Fish spines mostly bend left and right, not up and down.

Ответить
@Bodenman
@Bodenman - 19.09.2023 22:19

I love boids

Ответить
@JoeEnderman
@JoeEnderman - 20.09.2023 23:20

An additional property that might be cool is if they see something moving that isn't a boid they run away.

Ответить
@jannekeffa
@jannekeffa - 14.10.2023 17:31

yY ihave imvu3d and i have myprincess named account andiamn dame offshersonl yXXzZn seikkailen siellä paljon _btw${}££¥₩$ 11 0;::,.*71=12333!??,;:::-',....qQQpåÅlll.jal . ,niimävaa uuen ajan ehkäp wp tm s innercirclen chätistä aenima anD lanata lostris reaL hm c TEOSTO ftP3XxxCjkkkl qNDe etr SddAfFG hjjk lkl.

Ответить
@nTu4Ka
@nTu4Ka - 18.10.2023 00:16

Wow! That's amazing!

Ответить
@DodgerEcho
@DodgerEcho - 20.10.2023 05:08

I'll have to go back to elementary school😁

Ответить
@janus9148
@janus9148 - 23.10.2023 06:07

are display drones basically BOIDS IRL?!?!
edit: nvm, their positions are preprogrammed, but still a cool idea imo

Ответить
@ImTubifux
@ImTubifux - 24.10.2023 15:48

Better fish-AI than COD: Ghosts

Ответить
@Aswdfrl
@Aswdfrl - 02.11.2023 03:56

Do i need unity to use this code?
I dont want to download and setup unity just to look at and play with this

Ответить
@jonathanliu2476
@jonathanliu2476 - 07.11.2023 02:04

Instead of dividing into chunks to check for closest neighbor, you can use a K-D tree. The advantage of this is you can get the closest boid even if it isn't in a nearby chunk.

Ответить
@user-mt2kv5rm2m
@user-mt2kv5rm2m - 20.11.2023 00:45

What program was this made on?

Ответить
@P-G-77
@P-G-77 - 08.12.2023 12:58

Like a storm of birds in the sky...

Ответить
@benjamin-lieb
@benjamin-lieb - 21.12.2023 23:47

Soooo cool. What programming environment is this in?

Ответить
@carmelwolf129
@carmelwolf129 - 21.01.2024 14:03

you are an inspiration

Ответить
@jan-pi-ala-suli
@jan-pi-ala-suli - 02.02.2024 20:23

boid is my new favorite word. yes, it beats pnuemenoultramicroscopicsilicovolcanoconiosis

Ответить
@Nkrasart
@Nkrasart - 09.02.2024 00:54

Man, I really enjoy your content. Pure professional and pleasant.

Ответить
@TheRojo387
@TheRojo387 - 25.02.2024 20:52

This will also be useful for stimulating bat flocks; note that cave bats exit caves by flying in an anticlockwise direction; guess why that is!

Ответить
@Inuzika
@Inuzika - 01.03.2024 17:45

hello? did you just create a black hole by FLIPPING THE EQUATION UPSIDE DOWN?!

Ответить
@Shadowstorm5400
@Shadowstorm5400 - 18.03.2024 22:15

This still looks like so much fun!

Ответить
@shengzheyang74
@shengzheyang74 - 28.03.2024 19:18

I read your source code and I have to admit it's quite impressive! However, I believe there are a couple of aspects that could be improved. Firstly, it seems like a memory barrier or similar mechanism was not used in your computer shader, which could result in potential write/read disorder. Secondly, the fixed thread count of 1024 for each local group may not align with the number of Boids, possibly leading to duplicate computations.

Ответить
@holdenthompson1449
@holdenthompson1449 - 19.05.2024 06:59

I wonder why you didn't just do a distance check from the nearest point on the obstacle collider? Surely that'd eat up less processing power than several raycasts for each boid?

Ответить
@EsquireR
@EsquireR - 06.06.2024 04:30

Unsubbed mrbeast subbed here, much chiller and fullfilling

Ответить
@Cristian-bs4fw
@Cristian-bs4fw - 18.06.2024 22:54

Damn, you are incredible

Ответить
@brandonbowers750
@brandonbowers750 - 10.07.2024 12:33

can anyone explain how to start going from lines of code to simulation like this? my coding knowledge is far from being able to do something like this, but i was wondering how you choose or find packages or write guis that allow you to simulate things like this.

Ответить