Тёмный

Simple Cellular Automata 

Birdbrain
Подписаться 14 тыс.
Просмотров 11 тыс.
50% 1

Hi! Sorry it's been so long. Enjoy this video about Cellular Automata, though. The "highlight" of the video starts at 5:00
Links to the different cellular automata codes if you are interested...
2D/"Game of Life" simulator:
github.com/Pro...
Multithreaded 1D Cellular Automata simulator:
github.com/Pro...
Horrible GPU based 1D Cellular Automata simulator:
github.com/Pro...
Videos Referenced:
Game Dev Guide: • Getting Started with C...
World of Zero: • Getting Started With C...
Curated Experience Music:
www.fesliyanst... :Tears of Joy
Other Background Music:
www.chosic.com...

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@BirdbrainEngineer
@BirdbrainEngineer 2 года назад
1 Thumbs Up = 1 Generation towards not slurring words...
@razzermatazzer
@razzermatazzer 2 года назад
This looks like a channel that deserves more attention than it has, very high quality content
@BirdbrainEngineer
@BirdbrainEngineer 2 года назад
Heh, thanks! I'm currently taking a break to sort of... figure out what I want to try and do as far as making videos on RU-vid goes.
@W0Ifer
@W0Ifer 2 года назад
The video is awsome no mater how long it takes its always interesting to watch your videos. thanks for the entertainment keep up the good work ;)
@BirdbrainEngineer
@BirdbrainEngineer 2 года назад
Thanks for the kind words!
@getarobo
@getarobo 2 года назад
Dang i was having so trouble setting this in unity!!!! Awesome work!!!! Thanks!!!!!
@kirgear7575
@kirgear7575 7 месяцев назад
You have this stripes because for each possible pattern all the possible left/right shifts of that pattern are also included
@BirdbrainEngineer
@BirdbrainEngineer 7 месяцев назад
That's why it's stripes and not some weird more chaotic pattern, yes. But the question is why the value of all the pixels in a stripe is what it is.
@anonymouscommentator
@anonymouscommentator Год назад
very nice video, well made! reminded me a bit of sebastian lague videos
@necrashter
@necrashter 2 года назад
Great video! But I was just wondering, how come compute shaders ended up being significantly less performant compared to a multi-threaded implementation?
@BirdbrainEngineer
@BirdbrainEngineer 2 года назад
Because I called the dispatch on the compute shader for every single row of the automaton simulation, and dispatching a compute shader is fairly "expensive". The reason I did it that way is because I could not figure out (and I suspect it's impossible due to how gpu-s work) how to force the pixels that do not have valid previous generation data available yet, to wait for said data and only then compute. Essentially, if trying to compute many rows (generations) at once, then say pixels in generation 4 would start computing before generation 3 was computed, thus the generation 4 results would be invalid. This row-by-row approach would work fine if the simulated board would be way larger (large enough that the whole gpu would be fully utilized when computing a single row).
@necrashter
@necrashter 2 года назад
@@BirdbrainEngineer Thanks for your answer. I'm learning about compute shaders in Vulkan and this information was helpful for me.
@OddBunsen
@OddBunsen Год назад
I wonder if you could weight each possible 2D configuration based on the starting entropy, and whether it’d make patterns other than stripes.
@BirdbrainEngineer
@BirdbrainEngineer Год назад
I'm not entirely sure what you mean.
@soy_much_fun84
@soy_much_fun84 10 месяцев назад
@@BirdbrainEngineer I believe they mean one of two things: 1. Weigh the pixels of any frame of a layout in the game of life based on the entropy (randomness/complexity of outcomes) or 2. Do what you did with the 1D simulation with weighing the pixels based on many different iterations of the simulation, but with the 2D simulation instead
@BirdbrainEngineer
@BirdbrainEngineer 10 месяцев назад
@@soy_much_fun84 Ah, perhaps the second point indeed! Well, to actually simulate it out would be "quite difficult"... some back of the napkin calculations: say we explore a small 16x16 area of simulation space, that'd mean 16*16=256 pixels of simulation field size. To explore through every single permutation (thought technically it would not be necessary)would take 2^256=1.16e+77 different configurations. Safe to say, that would be straight out impossible with today's capabilities as even with all of the computing power available in the world, it'd probably take longer than the lifetime of the universe to simulate this. Having said this, I do not see a reason why there wouldn't be striping the same way there was striping for elementary cellular automata. Each game of life ruleset would create its own specific striping pattern and the striping would still appear as one looked at the 3 dimensional "block universe" of the simulation. The striping would appear as one stepped through the time steps. So at time step 0, the value would be 0.5 (each pixel would be guaranteed to be on and off the same number of times). All of the pixels at timestep 1 would be some other value, but they'd all be the same. Then same for timestep 2 and so on. So the striping happens in layers.
@alaslipknot
@alaslipknot Год назад
thanks a lot of the video, one question though, how does a multi-threaded program was able to finish faster than a compute shader one ?
@BirdbrainEngineer
@BirdbrainEngineer Год назад
Quote from a different comment reply: Because I called the dispatch on the compute shader for every single row of the automaton simulation, and dispatching a compute shader is fairly "expensive". The reason I did it that way is because I could not figure out (and I suspect it's impossible due to how gpu-s work) how to force the pixels that do not have valid previous generation data available yet, to wait for said data and only then compute. Essentially, if trying to compute many rows (generations) at once, then say pixels in generation 4 would start computing before generation 3 was computed, thus the generation 4 results would be invalid. This row-by-row approach would work fine if the simulated board would be way larger (large enough that the whole gpu would be fully utilized when computing a single row).
@szeredaiakos
@szeredaiakos 2 года назад
I hav "completed" about 5 geyms in my "vast" programing career. The best help you can get is in the domain of software architecture.
@ColinBroderickMaths
@ColinBroderickMaths 2 года назад
Hang on ... so in the end you didn't even use compute shaders? But you still thought them relevant for the title?
@luisallegri2993
@luisallegri2993 2 года назад
He, @Birdbrain , showed that he could use fragment shaders to solve 2d cellular automata. He showed that fragment shaders did not work for 1d cellular automata (did not work for him when using fragment shaders with Unity). Two lessons related to fragment-shaders / cellular-automata / Unity. And lastly, he figured out that he could speed up 1d cellular automata with multi-threading (bonus, and desperate solution ) :) I enjoy watching cellular automata videos -- I am always looking for the next best thing. This was fun, I appreciate the 'fun' inserts of video clips to make it light-fun. :) Thanks. I would totally show it to my daughter for the 2D part where the explanation is clear and the results fun. The 1d part, was fast, and can be confusing to someone not familiar with it, so I will not share that. :(
@diocre7446
@diocre7446 2 года назад
It is a shader itself though. How can you something in screen then without it.
Далее
Lenia - Artificial Life from Algorithms
13:15
Просмотров 138 тыс.
Doors Harpy Hare (Doors 2 Animation)
00:16
Просмотров 869 тыс.
⚡ Spellular Automata
8:42
Просмотров 75 тыс.
AI can't cross this line and we don't know why.
24:07
Просмотров 353 тыс.
Just Boids | Useless Game Dev
12:10
Просмотров 60 тыс.
The Strange Graphics Of LETHAL COMPANY
15:59
Просмотров 837 тыс.
epic conway's game of life
6:33
Просмотров 5 млн
How Particle Life emerges from simplicity
10:16
Просмотров 349 тыс.
Coding Adventure: Ant and Slime Simulations
17:54
Просмотров 1,9 млн
How can a jigsaw have two distinct solutions?
26:23
Просмотров 292 тыс.