Simulating Life on my Computer like a Scientist

  Рет қаралды 33,180

Tsoding Daily

Tsoding Daily

Күн бұрын

Пікірлер: 67
@lloydbush
@lloydbush 8 ай бұрын
Give me the area of a circle: - Mathmatician: π*r^2 - Engineer: 3*r^2 - Tsoding: just sum all the points of an arbitrary interval
@noctavel
@noctavel Жыл бұрын
RealLife paper is actually pretty consistent with real life. nobody understands shit
@miran248
@miran248 Жыл бұрын
So you're saying those who understand it, now understand life?
@npas76
@npas76 Жыл бұрын
@@miran248he did not say that at any point in that comment
@maksasj
@maksasj Жыл бұрын
1:07:55 In 2 years I will have opportunity to write proper scientific paper for my bachelor degree, and I swear I will use one of yours projects as a reference.
@korigamik
@korigamik Жыл бұрын
Challenge accepted
@garethma7734
@garethma7734 Жыл бұрын
52:30 I mean, the definition of M here is actually the correct one (instead of the usual "pi R^2" or whatever) since you want to clamp the result to [0, 1]. Random mathematician knowledge dump, computing the exact value of M given just R is actually quite hard, especially mathematically. It's called the Gauss circle problem and is one of those hard number theory problems
@valovanonym
@valovanonym Жыл бұрын
Paper reviews would be a cool series 👀
@futurisold
@futurisold Жыл бұрын
yes, please do more paper series!
@FacePalmProduxtnsFPP
@FacePalmProduxtnsFPP Жыл бұрын
The tip on staying in boundaries of arrays using Euclidean mod was super helpful. Thank you!
@MrYefh
@MrYefh Жыл бұрын
I love you, please keep doing streams about simulating life-like systems
@GTS00000
@GTS00000 Жыл бұрын
paper implementation, yes, more please
@davidaloysparrow219
@davidaloysparrow219 Жыл бұрын
Love these streams!
@BirdbrainEngineer
@BirdbrainEngineer 9 ай бұрын
When I was working through the SmoothLife paper, I found it a little bit wonky myself as well, especially as I had actually worked through the Lenia paper first which in my opinion explained things much better. Ontop of that, the mathematical way of explaining these systems has always been really difficult for me to reason about, and instead, for me it's easier to think of them in the programmer way, which is to say operation by operation. Your simulations are running correctly, but the parameters need fine-tuning; both in SmoothLife and in Lenia the "interesting" parameter sets are fairly chaotic and require fine tuning of the parameters to at least 2 decimal places, usually more like to 3 decimal places.
@adrian66696
@adrian66696 Жыл бұрын
1:04:08 alpha_m and alpha_n are just the respective alpha for when you compute eq. 3 for either m or n. By looking at eq.3, you just need to set alpha to alpha_m when x is m, and set it to alpha_n when x is n. s(n, m) calls sigma_2 with x = n, which then calls sigma with x=n. s(n, m) also calls sigma_m which calls sigma_1 with x=m. I think the idea is that you want to smooth the edges of the circles since you have aliasing, for the smaller circle you want more smoothing, and for the bigger one you don't need as much. EDIT: he points it out in the next live
@Golimko
@Golimko 9 ай бұрын
1:24:49 in the paper when updating the current cell state they multiply S[s(n, m)] by current value f(x, t), and you don't. maybe this is the problem
@JonnyDeRico
@JonnyDeRico Жыл бұрын
who doesn't move in the direction of their thickest part?
@lovely-shrubbery8578
@lovely-shrubbery8578 Жыл бұрын
You calling me fat 😭
@nomadvagabond1263
@nomadvagabond1263 Жыл бұрын
Thats why i always find myself sitting😏
@michalbotor
@michalbotor Жыл бұрын
when you calculate sigma1(x=n, a) and sigma1(x=n, b) i would use alphan, but when you calculate sigma1(x=m, 0.5) i would use alpham.
@drdca8263
@drdca8263 Жыл бұрын
Something I’ve wondered for a while about systems like SmoothLife and Lenia, is that, these systems are translation invariant, they have a continuous translation symmetry, but, it seems like, because they aren’t described by Hamiltonian mechanics, that doesn’t result in them having conservation of momentum (or of angular momentum). It would be interesting, I think, if they could be modified in a way to make them fit into the framework of Hamiltonian or Lagrangian mechanics, in order to get a version that does have conservation of momentum (and if angular momentum). That would be cool, I think! But, I’m not sure how that would be best done... I guess for one thing, would need to have a continuous time version of the system in order to be able to put it into those frameworks. I think there are some theories of how to take a system that doesn’t quite obey Hamiltonian mechanics due to losing energy (e.g. because of friction with an external environment not considered part of the system), and come up with like, a Hamiltonian system that has a pair of interacting systems, one of which is the one one wants to model? Or something like that? Idk. Hm, ok, but, suppose we first are just looking at the state space for smoothlife, and we like, want to describe what sort of thing momentum should be, and well, it should be the generator of translation symmetry.. I guess we have a field which describes the “aliveness” at each point, and you could talk about, for each point, an operator that takes a state and returns the aliveness at that point in that state. and, the translation symmetry would be like, an family of automorphisms of the algebra of those kinds of operators, and I guess, the derivation of the function at a point in a given direction, would be the momentum at that point in that direction? ... maybe the problem is just that the total momentum is always zero, and is therefore trivially conserved? Well, assuming that the aliveness far away is zero in all directions. If that’s why, then maybe having complex values like in quantum mechanics would help? Or... Maybe it is due to like, stuff not being linear enough? Idk
@bartpelle3460
@bartpelle3460 Жыл бұрын
I'm pretty sure I understood nothing
@koktszfung
@koktszfung Жыл бұрын
Is it similar to Hamiltonian in fluid mechanics?
@drdca8263
@drdca8263 Жыл бұрын
@@koktszfung Is what? Hamiltonians in general? Yes. Hamiltonians are Hamiltonians. They do the same kind of thing. SmoothLife is, I think, not described by a Hamiltonian, but I was hoping that maybe a small modification to it could be made to make it so it could be described by a Hamiltonian (or a Lagrangian) . But I’m not really sure how one would go about making such a change. If one could make such a change, the result would, I think, have conservation of momentum, conservation of angular momentum, and conservation of energy, which would be cool I think.
@koktszfung
@koktszfung Жыл бұрын
@@drdca8263 sorry I realised what I said makes no sense, I mean maybe you could treat the aliveness as a scalar field and write the Hamiltonian of the field
@drdca8263
@drdca8263 Жыл бұрын
@@koktszfung Oh, ok! Makes sense then. That sounds like it could work, but I’m unsure about how specifically that would be done. Thanks for the pointer though. I had been mostly thinking about Lagrangians (even though I might have said Hamiltonian), and maybe thinking about it that way could be clearer? I will look some stuff up
@johnpavel1913
@johnpavel1913 Жыл бұрын
The different alphas are used to smooth in the inner and outer rings
@piotao
@piotao Жыл бұрын
The problems with the paper explain WHY it is posted on arxiv - it will never pass the rigid review required for good scientific papers. So many unexplained things left.
@Jack-sy6di
@Jack-sy6di Жыл бұрын
You're not dumb, the SmoothLife paper is just not very well written and clearly not written by a pure mathematician (in the author's defense though it looks like they probably just kinda threw it together, it's probably not the best representation of their writing abilities). It would actually be clearer if it were written MORE in the style of a pure math paper. I'm also not sure what they're talking about with alpha_n and alpha_m, but the whole set of formulas they use for the transition formula is basically just fuzzy boolean logic. sigma_1(x, a) is basically 1 when x > a and 0 when x < a, except it doesn't actually swap from 0 to 1 instantly, it fades continuously between them. It's like a fuzzy x > a. If you read the other formulas and pretend that sigma_1(x, a) is just boolean x > a, it makes sense. sigma_2(x, a, b) is 1 if a < x < b and 0 otherwise. sigma_m(x, y, m) selects either x or y depending on if m > 1/2. And finally in s(n, m) we're basically saying that if m > 1/2 let I = [b1, b2] (the birth interval) and if m < 1/2 let I = [d1, d2]; and then just return 1 if n is in I and 0 otherwise. So alpha controls the "fuzziness" of the fuzzy boolean logic operators, higher alpha meaning more fuzzy. In total though, the function s(n, m) involves four different calls to sigma_1 and you could in principle use a different fuzziness for all of them, so if we want we could even have alpha1, alpha2, alpha3 and alpha4. My best guess is that they want you to use alpha_n when you're making a call that "involves" n and alpha_m when it "involves" m, so in practice that would mean sigma_m uses alpha_m and sigma_2 uses alpha_n. (maybe you say all this in the stream, I'm kinda skipping around)
@ghostroll
@ghostroll Жыл бұрын
brilliant video as always. side note: for emod you don't have to do the first modulo, you can just do { return (a+b)%b}. works for both negative and positive cases.
@SlimyDash
@SlimyDash Жыл бұрын
this doesnt work for a < (-b) unfortunately
@afmikasenpai
@afmikasenpai 7 ай бұрын
54:37 damn this is so relatable, that was me a few months ago. I hate how 'easy' yet so damn confusing this paper looks xD
@omarojmb
@omarojmb Жыл бұрын
another fucking great tsoding session
@taileebao
@taileebao Жыл бұрын
I think your coding tool is VIM and you use it very well through keymaps, so can you make a video about it? Thank you
@OpenKeith
@OpenKeith Жыл бұрын
Actually, they use Emacs. If you want to try it out, I'd personally recommend checking out the Doom Emacs configuration framework (it comes with a lot of useful modules and defaults, and even has a Vim-style keymap mode)
@doxnit4343
@doxnit4343 Жыл бұрын
24:00 Not impressed. Almost all editors have substitution with regex. BUT Vim has Vim Disel. Does Emacs have its own Luke Smith???? Checkmate
@_orangutan
@_orangutan Жыл бұрын
I understand some but not all. Maybe if I dedicate a week to it, I'll understand it.
@tdoc666___
@tdoc666___ 11 ай бұрын
tson actualy showed us how complicated life is, and how much of engineering you actually need to create life, something weird actually bumped into my head, could actually life have been engineered by an intelligent engineer or all this complexity came by itself, bu if it came by itself, then how can it know all this formulas by itself, you know this kind of things is really interesting.. what do u think?
@gabef9538
@gabef9538 Жыл бұрын
Next, train a neural net for generating the next frame of a microscope.
@mellowyellow7523
@mellowyellow7523 Жыл бұрын
drinking game, take a sip every time he says right
@mertunsal1389
@mertunsal1389 Жыл бұрын
Anybody understands what kind of terminal he's using?
@andreypopov6166
@andreypopov6166 Жыл бұрын
а я только кнопочки по экрану двигать могу...Спасибо за инспирейшен!
@Paxsali
@Paxsali Жыл бұрын
I like stimulating life on your computer.
@BlueDippy
@BlueDippy Жыл бұрын
Bro you are cracked
@connormcmk
@connormcmk Жыл бұрын
damn this guy is good at vim
@spacewad8745
@spacewad8745 Жыл бұрын
yoyoyoyoyo. fking brilliant as always
@davideferrara6274
@davideferrara6274 Жыл бұрын
Awesome stream!
@fxs2008
@fxs2008 Жыл бұрын
Instead of ((x%100) + 100)%100 you could do simpler: (x + 100)%100, it does not break negative numbers.
@angelomarano8458
@angelomarano8458 Жыл бұрын
thank you!
@Neuer_Alias_erstellen
@Neuer_Alias_erstellen Жыл бұрын
wow a real Tsientist
@bizarrapmusic
@bizarrapmusic Жыл бұрын
30:04 lmaoooo i can't hahahha
@keremardicli4013
@keremardicli4013 Жыл бұрын
Holy moly
@dysb
@dysb Жыл бұрын
God, I wish you wrote Rust. Watching a skilled someone tackle a relatively complex problem is a great way to learn a language. I have zero desire to deepen my knowledge of C when there's more modern alternatives that, crucially, compile to WASM. Why not Rust?
@albusdandelion719
@albusdandelion719 Жыл бұрын
C is more fun
@dandreani
@dandreani Жыл бұрын
just translate that to rust... you will learn rust and c at the same time
@niculaelaurentiu1201
@niculaelaurentiu1201 Жыл бұрын
He has Rust streams that you can watch
@douglasgabriel99
@douglasgabriel99 Жыл бұрын
I'm scared
@ЛабораторияДотера
@ЛабораторияДотера Жыл бұрын
Очень классное видео) хороший английский прям, не понял ваще, что ты русский
@xanhx
@xanhx Жыл бұрын
so cool
@ammarahmad4872
@ammarahmad4872 Жыл бұрын
wow
@iGavid_Doggins
@iGavid_Doggins 9 ай бұрын
I would love to see that being done in Pygame.
@MR_GREEN1337
@MR_GREEN1337 Жыл бұрын
hey, are you drunk when you're live,
@andrewgr144
@andrewgr144 Жыл бұрын
Really? No one's going to comment on the 6.7GiB Porn Folder self-disclosure? Are you all actually paying attention to the content, rather than looking for opportunities to be snarky? Are you even trying?
@evasiveutopian
@evasiveutopian Жыл бұрын
Why r_a? Answer: because the shape of the "2d donut" (r_a - r_i) is called an "annulus". See en.wikipedia.org/wiki/Annulus_(mathematics) (I am guessing)
But what is a neural network? | Deep learning chapter 1
18:40
3Blue1Brown
Рет қаралды 18 МЛН
Simple Code, High Performance
2:50:14
Molly Rocket
Рет қаралды 268 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
My GPU Almost Died Doing This Life Simulation
2:24:01
Tsoding Daily
Рет қаралды 18 М.
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,1 МЛН
Hash Table in C
2:11:31
Tsoding Daily
Рет қаралды 72 М.
I Scraped the Entire Steam Catalog, Here’s the Data
11:29
Newbie Indie Game Dev
Рет қаралды 649 М.
I programmed some creatures. They Evolved.
56:10
davidrandallmiller
Рет қаралды 4,3 МЛН
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 166 М.
The Most Important Machine Learning Algorithm (ML in C Ep.03)
4:05:47
Tsoding Daily
Рет қаралды 48 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
I Made a Zero Player Game
12:30
Sam Hogan
Рет қаралды 10 МЛН
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 1,1 МЛН