7.2: Wolfram Elementary Cellular Automata - The Nature of Code

2024 ж. 14 Мам.
187 471 Рет қаралды

This video covers the basics of Wolfram's elementary 1D cellular automaton.
(If I reference a link or project and it's not included in this description, please let me know!)
Read along: natureofcode.com/book/chapter-...
A New Kind of Science: www.wolframscience.com/nksonli...
Elementary Cellular Automaton: mathworld.wolfram.com/Elementa...
github.com/shiffman/The-Natur...
Help us caption & translate this video!
amara.org/v/Qbvb/
📄 Code of Conduct: github.com/CodingTrain/Code-o...

Пікірлер
  • "this is not my best video" me : this is one of the best videos I've ever seen on youtube ^_^ . keep going bro , you are amazing .

    @ahmadalasadi3636@ahmadalasadi36364 жыл бұрын
    • lol simp

      @babyeater5234@babyeater52343 жыл бұрын
    • hahah true, best train ride I've ever had with this video

      @ugurburan133@ugurburan1332 жыл бұрын
  • I enjoyed this "stream of consciousness" style presentation and the "let`s have some fun with this great hobby" attitude. A nice refreshment after all the pompous, overstressed, getting a job oriented, "I`m better than others" programming videos that youtube is so full off. Your video took me back from the horrible "i have to program more or else" attitude that I got into, to "i want to program now!" joyful state. So... THANK YOU!

    @romanhrobot9347@romanhrobot93472 жыл бұрын
  • That "if you're not too busy" comment around 7:30 really got me.

    @stipplebyatomiclabrador5077@stipplebyatomiclabrador50777 ай бұрын
  • Wanted to give some appreciation for the efforts you took to make these videos. We can tell you, like the average engineer, is probably a little awkward. Yet you're obviously doing your best to lighten things up. Thanks you.

    @denebvegaaltair1146@denebvegaaltair11462 жыл бұрын
  • I am learning all by myself and I gotta say that this is the explanation I want to see. Well done explaining this! I also like the enthusiasm. It feels like you're a friend discussing. Keep up the good work! :D

    @roypaoloreal897@roypaoloreal8977 жыл бұрын
    • I'm so glad to hear, thank you!

      @TheCodingTrain@TheCodingTrain7 жыл бұрын
    • No problem. Would you create more of these vids? I'm interested in 2D CA and I hope you'll create more videos about that.

      @roypaoloreal897@roypaoloreal8977 жыл бұрын
    • Totally agree - the enthusiasm is infectious (in a very good non pandemic way) - this is great!!

      @randytighe7150@randytighe71502 жыл бұрын
  • shorter way to implement rules function would be: int rules( int left, int me, int right ) { int idx = 4*left + 2*me + right; return ruleset[ 7 - idx ]; }

    @michalbotor@michalbotor6 жыл бұрын
    • Yes!!!! 7 - idx This is the fix I needed for my code to agree with Wolfram's output. Thanks.

      @egregory314@egregory3144 жыл бұрын
    • @@egregory314 Ah, you had your table upside-down!

      @greenaum@greenaum2 жыл бұрын
    • You could use (left

      @greenaum@greenaum2 жыл бұрын
    • @@greenaum For multiplication or division by powers of 2, a good compiler will optimize that to bit shifts anyway.

      @adiaphoros6842@adiaphoros6842 Жыл бұрын
  • Got here because I picked up A New Kind of Science on a whim with very little prior knowledge, and I needed help visualizing how c.a. work. It makes me really happy to be able to learn from someone who clearly thinks the material is as exciting and fascinating as I do. It's nice to know I'm not the only one who gets passionate about how cool this stuff is, lol :) Thanks for the help!

    @friendly.mammal@friendly.mammal3 жыл бұрын
  • 14:27 "This is not my best video, but I'm gonna keep going" 😂😂😂😂😂😂😂

    @loic.bertrand@loic.bertrand5 жыл бұрын
  • Thank you so much for making this video! Not only did you make the subject interesting to learn but your explanation finally made it click for me. Again, many thanks

    @9wattcat@9wattcat3 жыл бұрын
  • This was my introduction to CA and I found it very helpful for my understanding and very amazing results! Thanks!

    @guitarmann3001@guitarmann3001 Жыл бұрын
  • I just found your channel and boooy i am addicted to it!

    @lucia4062@lucia40626 жыл бұрын
  • Great explanation of CA, thanks man. And yeah, really like your teaching style :)

    @sallerc@sallerc7 жыл бұрын
  • the framerate in the clip makes me dizzy.

    @beenn15@beenn156 жыл бұрын
    • It's better if you play at 0.75x

      @philipm3173@philipm31732 жыл бұрын
    • 😻😻

      @mateothode5603@mateothode5603 Жыл бұрын
  • The only coding channel that I enjoy!

    @icaruslives4748@icaruslives47487 жыл бұрын
  • I noticed that when you make your temporary array to calculate the next generation you're making a for loop to copy all the elements over. This works fine but Processing3 has a built-in function that does this for you. It's called arrayCopy. So you may replace your for loop with arrayCopy(gen, nextGen); or whatever you want to call your arrays. (The first parameter is copied into the second).

    @iangolsby8471@iangolsby84716 жыл бұрын
  • Extremely helpful for both my project and my understanding of this topic... This series of videos is truly amazing and you make it very interesting too. Whats more, in the last video you proposed some ways to apply c. a. and expand our knowledge on them. I appreciate your work very much.

    @pavlosstefanidis7145@pavlosstefanidis71453 күн бұрын
  • Great video! Really enjoyed your way of explaining the topic. Keep it up I just subed!

    @nikobekris8542@nikobekris85428 жыл бұрын
    • yay, thank you!

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
  • Great video! I just started my Algorithms & Complexity course, which features CA's and didn't quite understand the concept fully. Your videos are really helpful and also fun to watch, due to your enthusiasm! Keep it going!

    @flipvanwijk@flipvanwijk8 жыл бұрын
    • +Daniel Shiffman would you please make another video about Elementary Cellular Automata ... you seem to understand it more than wolfram though.

      @MrThelol2030@MrThelol20308 жыл бұрын
    • +JL KL I'm hoping to get to remake some of these videos with higher quality and using JavaScript at some point!

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
  • appreciate you taking the time out of work to give out free education, helps those that wont end up going into collegiate level stuff, but still want to learn i also noticed you laughing at the quality, but i subbed just for this, it was super helpful!

    @djalexander968@djalexander9684 ай бұрын
  • cocaine is hell of a drug. But very good video!

    @mushman05@mushman058 жыл бұрын
    • +mushman05 hah. Thanks for the feedback.

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
    • @@TheCodingTrain I don't agree with that feedback. Good video all around!

      @e.1220@e.12204 жыл бұрын
    • You are a sad individual!

      @HostanGouthier@HostanGouthier4 жыл бұрын
    • you could get double experience if you watch it in 2x

      @iworeushankaonce@iworeushankaonce4 жыл бұрын
    • MATH. Not even once.

      @lmv2s@lmv2s4 жыл бұрын
  • 5:22 :'-D Excellent explanation though. I'm already familiar with CA's, and am learning python 3.0 to attempt philosophical in-silica experiments, just stumbled upon your video and am enjoying the side-info a lot. And your enthusiasm is contagious. EDIT: 8:03, I'm slapping my knees.

    @zbnmth@zbnmth4 жыл бұрын
  • CA is amaaaaazing!! And thx for the video!

    @leilalovegood8364@leilalovegood83646 жыл бұрын
  • Hey @coding train great video! I’m currently a computer science student tasked with creating a python program (rule_110(x,y)) where x is “width” or number of cells and y is the number of generations/time steps. This helped in understanding CAs in general, but is there way to modify the code such that it prints characters versus programming an image? Also, how does one program in python so that it computes the next generation but still maintains the values from the previous generation?

    @patrickharvey9361@patrickharvey93615 жыл бұрын
  • First let me say that I love your videos! It took me a while to figure out the logic of Wolframs rulesets, but once it clicked now I'm hooked. I am curious though. At 5:52 You made up a rule of (00101110) which is Wolframs ruleset #46. Ok, all is well in my mind, since 46 is the decimal equivalent of binary 00101110. But when I look at your code at 10:27 I got confused. This is because when I compare the decimal rule numbers in your code comments they don't correspond to Wolfram's rulesets. For example, 01111011 should be 123 not 222, since 222 has a binary equivalent of 11011110 . Can you explain this? Am I missing something? ------------------- (edit) Never mind, I see now that they are backwards in your array. Example: the conjugate of ruleset = {0, 1, 1, 1, 1, 0, 1, 1} is 11011110. ------------------- Thank You!

    @mybluemars@mybluemars3 жыл бұрын
  • 14:04 "or previous videos" and the swag is amazing - thanks for the video!

    @Beesheep@Beesheep3 жыл бұрын
  • Just love all this energy and passion! Makes the content a lot more engaging! Kudos!

    @AjayKrews@AjayKrews3 жыл бұрын
  • 16:45 For those asking for a way to quickly index, you may do a*2^2+b*2^1*c*2^0 = 4*a+2*b+c for this example (neighborhood=3 squares, base=2). This results in ::: return ruleset[4*a+2*b+c];

    @olli3686@olli36862 жыл бұрын
  • You are hilarious. I wish I had once a teacher half -- no, a quarter as fun as you are.

    @themartingcastaneda@themartingcastaneda3 жыл бұрын
  • :) informative and fun! Best way to learn Thnx!

    @memeveels1387@memeveels13878 жыл бұрын
    • So glad to hear, thank you!

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
  • It would be interesting to see what happens if you could change the rule set between generations. An oscillation between rule 30 and 110, something to that effect. I would imagine that the capacity for complexity would explode exponentially, especially if you determined the rule set by sampling eight consecutive cells from rule 30, each generation changing the rule set. This wouldn't be difficult to do with Python, thanks for the stimulating video!

    @RaccoonEatingCacti@RaccoonEatingCacti5 жыл бұрын
  • Thanks for your wonderful lecture...

    @jjgsfamily4353@jjgsfamily43537 жыл бұрын
  • Wonderful way of teaching. Plz provide a lecture how to implement irregular cellular automata

    @moumitaghosh7368@moumitaghosh73684 жыл бұрын
  • Very helpful, and fun tut! Thanks :)

    @bradsillasen1972@bradsillasen1972 Жыл бұрын
  • And how rules work in the margins of the array where reference can be made only for 1 or 2 cells of the previous generation?

    @TheGlitch11@TheGlitch113 жыл бұрын
  • Thank you for that great Lesson :-) !

    @klausalberts2240@klausalberts22408 жыл бұрын
    • Thanks for watching!

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
  • Very nice! I followed your example and did this today as well on my channel using MATLAB. Cellular Automata!!

    @danny_racho@danny_racho Жыл бұрын
  • At 4:18, in a sense you were correct to say that you don't evolve generation 1, but rather compute it. However, there is a hidden accumulation of change (or potential change) over multiple cells in the production of generation 1, and any accumulation of change is evolution. Generation 2 is of course unmistakably evolved from generation 0 by way of generation 1.

    @DonaldKronos@DonaldKronos6 жыл бұрын
  • Hey man these videos are awesome. This one's really old so I don't know how you do them now, but they're way better than you say! Though even then, you say it in a relaxed, more human way so not annoying self deprecation. That aside, I'm gonna take a guess and say that the fractal rule counts as complexity since in a way applying the same rule in each iteration is repetition, regardless of what rule it is. I hope it's not silly-level wrong, I'll find out!

    @ktvx.94@ktvx.943 жыл бұрын
  • 8:00 What about border values? Do we "wrap" all the array, so -1 index becomes n, and (n+1) becomes zero index? Or we make special rules just for one neighbour at the border?

    @michadreksler2401@michadreksler24013 жыл бұрын
  • Great vid, love the meta stuff, just crushing that 4th wall. I did get some comprehension of ca I didn’t have before, thanx. You probably know this by now, but wolfram alpha does use rule 30 as a pseudo random generator. Good intuition! Hitting subscribe now.

    @davidianmusic4869@davidianmusic48692 жыл бұрын
  • Great video! Very easy to follow and entertaining. There is a thing I don't understand. If gen0 is an array filled with 0, for any ruleset where 0,0,0 = 0, how does anything at all happen?

    @vinzbrain@vinzbrain Жыл бұрын
  • 14:30 "this is not my best video". maybe not, but the content is totally solid. take a breath man, slow by 10%, it's good stuff

    @TheGroundskeeper@TheGroundskeeper5 жыл бұрын
  • for people using processing, if you try to input ruleset in right way (github files need you to implement ruleset in reversed way) just make change in CA file this way. CA(int[] r) { ruleset = reverse(r); cols = width/w; rows = height/w; matrix = new int[cols][rows]; restart(); }

    @user-cm1zh4jc5r@user-cm1zh4jc5r5 жыл бұрын
  • The beauty of complex(nondeterminism as a function of determinism) automatic evolutionary process happening in complex limits.

    @zaidsserubogo261@zaidsserubogo2615 жыл бұрын
  • You've inspired me. @12.17, you talk about a 2d grid that becomes a frame in a sequence of frames in an animation. How about -- rather than a 1d automata that becomes a 2d grid, how about a 1d grid of cells that's animated. OR how about a sequence of 2d grids, stacked one on top of the other to form a 3d shape. Then add a left-eye / right-eye projection and view it cross-eyed (or the other way). And then rotate it about any axis in the same way chemists might rotate a molecule in space. I wonder if that will yield new insights into the rule sets.

    @cometmace@cometmace5 жыл бұрын
    • I've thought the same thing, I'd love to see how it would look in 3d

      @Raghad-mz8el@Raghad-mz8el4 жыл бұрын
  • This is great, thank you

    @JT-nq9vh@JT-nq9vh7 жыл бұрын
  • I like how he just redid this video this year

    @thabo256@thabo256Ай бұрын
  • The best example ever of "being all over the place". Lol. Great lecture btw.

    @acos21@acos214 жыл бұрын
  • what will be the right neighbour cell(or precisely the array index) of the last cell in the array?

    @diptendumukherjee9316@diptendumukherjee93164 жыл бұрын
  • Thanks Daniel, ,,,I have one question please, how we compute the transition rules?

    @Husamadin@Husamadin8 жыл бұрын
    • +Husam Atallah This is described here: natureofcode.com/book/chapter-7-cellular-automata/

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
  • i actually did a random start of cells, when u said try make one your self last video and each cell calculates its value by saying if(neigbor[x] == 1) state = !state; that the result sure that gonna be some rule like 01101001 that kinda xor or rule 113

    @mike_o7874@mike_o78746 жыл бұрын
  • What if I map my 1-dimensional CA onto the surface of a circle, and then I make every cell the same state: do they all cease to exist? What if my CA demands an intermediary state and-or translation? Would it be forced oscilate? What are some solutions to an edge case like this?

    @niaschimnoski882@niaschimnoski8826 жыл бұрын
    • What if, instead of tracking each cell, we just scanned the entire image, gave each state a unique color, and then did a single gpu calculation on the entire frame, regardless of how many things are going on at once? [Because it would require the same number of computational steps, on every iteration of ths engine's loop]

      @niaschimnoski882@niaschimnoski8826 жыл бұрын
    • @@niaschimnoski882 sounds like a pixelation of sorts? UK amateur here.

      @tim40gabby25@tim40gabby253 жыл бұрын
  • love it - interesting and made me laugh out loud! thanks

    @martinlaslett8600@martinlaslett86008 ай бұрын
  • Are Wolfram's Rulsesets also working for 1D Cell automatons with 1 or 2 Cells?

    @klausalberts2240@klausalberts22408 жыл бұрын
    • I'm not sure exactly what you mean, but you can see all the rulesets for 1D CAs here: mathworld.wolfram.com/ElementaryCellularAutomaton.html

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
    • Thank you for the Link :-) ! I also read this chapter natureofcode.com/book/chapter-7-cellular-automata/ of your book, because i did not understood the concept of the automatons fully. But after your video and the chapter of your book, things are now much more clearer :-) .

      @klausalberts2240@klausalberts22408 жыл бұрын
  • 18:30 The problem here is that this is not "complete randomness". Behaviour of automata is strictly determined, non-chaotic, and depends just on starting values. It doesn't even depend on random number generator, because.....there is ..... simply.....not present any random number generator in the code - just a set of rules. If you repeat your experiment milion times, up to a infinite number of iterations you'll get exactly the same results, depending just on 1. Set of rules, and 2. Starting values.

    @michadreksler2401@michadreksler24013 жыл бұрын
  • can we use CA for solve differential equation. Like finite difference or FEM. for example I wanna solve 2D Laplace equation with some boundary.

    @kaplumbagaefendisi2837@kaplumbagaefendisi28377 жыл бұрын
    • interesting idea! definitely worth exploring.

      @TheCodingTrain@TheCodingTrain7 жыл бұрын
    • its mean there is not any application like that

      @kaplumbagaefendisi2837@kaplumbagaefendisi28377 жыл бұрын
  • Gotta love that retro Dan enegy :)

    @aditya95sriram@aditya95sriram3 жыл бұрын
  • how do you get the screen to follow the animation down the screen?

    @ishi92@ishi927 жыл бұрын
    • I've been thinking the same thing

      @250nate@250nate7 жыл бұрын
    • Maybe he translates the axis a distance equal to the height of a new row

      @Tin98Tin@Tin98Tin7 жыл бұрын
  • could u please tell whether u r using open gl to execute the above code or something else?

    @divyanarayanan1927@divyanarayanan19277 жыл бұрын
    • He's using Processing in this video. Check out his other videos if you want to learn more about it.

      @JGunlimited@JGunlimited7 жыл бұрын
  • I have a question which is about on video 6.22, he say 000 represent 0, 001 represent 0, 010 represent 1 and .... so on. Why 000 is represent to 0 , can it become 1? or it just user to random define which mean that we can defined 000 as zero or one both is accepted?

    @SENG-lq4kt@SENG-lq4kt2 жыл бұрын
  • what did you take, is it expensive ?

    @krzysztofp923@krzysztofp9235 жыл бұрын
  • What if we make a loop of rules... Line 1 -> rule 4, line 2 -> rule 222, L3 -> r134, and loop again. With 2 rules looping you'll have 64k behaviours

    @eduardosuela7291@eduardosuela72914 жыл бұрын
    • .. or weight with sequences of primes, or add in rules the choice of which is determined by the previous line.. did you get anywhere with your suggestion? UK amateur here :)

      @tim40gabby25@tim40gabby253 жыл бұрын
  • This has probably been commented upon already, but: niiiiiice choice of shirt for this video. Full marks.

    @jaschanarveson5550@jaschanarveson55502 жыл бұрын
  • Amazing.

    @shaikmaricar6685@shaikmaricar66854 жыл бұрын
  • I only wonder how you get the left index of cell[0](or the right for cell[cells.length-1]) without a boundary constraint(and more important not causing an index out of range on the array itself)? Does it wrap around? Is it always 0, or 1? Don't see it in the code. Boring question but still..

    @MacShrike@MacShrike2 жыл бұрын
  • I got a seashell with a rule 135 ish pattern on..... These exist in nature...

    @hanniffydinn6019@hanniffydinn60197 жыл бұрын
    • Hi. UK here. Good spot - me too. Follow your observation up.. :)

      @tim40gabby25@tim40gabby253 жыл бұрын
  • @17:43 Isn't repetition a necessary part of complexity?

    @YQN2149@YQN21492 жыл бұрын
  • This man is perfect

    @mateothode5603@mateothode5603 Жыл бұрын
  • Amazing video :)

    @mukeshkumar2265@mukeshkumar22653 жыл бұрын
  • Great video

    @vishavjeetsinghthakur@vishavjeetsinghthakur4 жыл бұрын
  • Hi, Dan, excellent video! But the github links are broken.

    @peterfarrell66@peterfarrell668 жыл бұрын
    • thanks for pointing this out.

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
  • So we start with a single cell. then with a rule set in binary up to 256 changes the cells below it? I'm gonna program this

    @AidenOcelot@AidenOcelot7 жыл бұрын
    • I remember writing this, I did well programming it

      @AidenOcelot@AidenOcelot2 жыл бұрын
  • How to calculate the cells on the edge? They have only two cells above them.

    @user-hh2is9kg9j@user-hh2is9kg9j2 жыл бұрын
  • and now to the question, that everybody here craves to ask but is afraid that it will open a pandora's box.. how to we handle the left most and the right most cells, hah? ;p examining your generate function i noticed, that you simply let them remain unchanged, treating them as what i believe are called a shadow cells: the cells that serve as a source of information for their neighbors, but do not constitute as an actual cells themselves. and this is great, don't get me wrong. but i just wonder whether new interesting, never-seen-before patterns couldn't have emerged if we've linked the right most cell with the left most one instead (i.e. by treating our grid like a circle and not like a segment).

    @michalbotor@michalbotor6 жыл бұрын
    • you just give them a default value. wether 0 or 1

      @petitbuddha@petitbuddha5 жыл бұрын
    • actually the left and rightmost cells are being used the generational algorithm displays top down and you can see the wave outward from the middle cell because in this particular cellular automaton they always start with 1 singular cell in the middle preactivated. The outcome depends on the particular rule as well as the starting world (Which the latter was controlled for this demonstration; always 1 cell preactivated in the same location in GEN1).

      @Anonymous-sw5jx@Anonymous-sw5jx5 жыл бұрын
    • the tape is infinite in both directions i believe

      @Anonymous-sw5jx@Anonymous-sw5jx5 жыл бұрын
    • Like space invaders?.. you could certainly join the left and right edges to form a tube, then the tube rims to form a doughnut..

      @tim40gabby25@tim40gabby253 жыл бұрын
  • i have no idea what each of these words mean separately or as a whole but they sounds so fucking cool that I had to see whats this about

    @ulkem@ulkem4 жыл бұрын
  • I have more clue of how good he is coding everything than fps the video has

    @zhabiboss@zhabiboss Жыл бұрын
  • Hi! I know this video is quite old but I was trying to create a wolfram elementary simulator in python, but I ran into a problem, which is handling edges. What am I supposed to do with the edges of the grid, since I can't make the grid infinite? If I simply try to request the next cell of the last, I get an index error.

    @sp0tt3r@sp0tt3r5 жыл бұрын
    • There are two ways edges are usually handled. You either set a fixed boundary condition or you wrap the boundaries like a pac-man game.

      @reintael4287@reintael42872 жыл бұрын
  • oh wow. this is seriously cool

    @rmrfboy@rmrfboy3 жыл бұрын
  • nextgen[i] will skip 0 and cells.length because u start from 1 and end at cells.length - 1 which is logical but that will lead to undefined behavior cause nextgen[0] and nextgen[cell.length - 1] is uninitialized

    @aronpop1447@aronpop14474 жыл бұрын
  • How u find rule set plz explain

    @irsarafaqat7678@irsarafaqat76784 жыл бұрын
  • thank you....❤

    @ipdavid1043@ipdavid10435 ай бұрын
  • Pretty interesting. Only it seems to be overly complicated. It's easier to understand but not at all resource friendly. Note: I''m used to write for micro controllers with 2k ROM and 256B of RAM. My approach: I would replace the array for a single n bit value. 1. Mask the bits i need to compute the next generation. 2. Lookup the next value of the cell. 3. Repeat 1,2 for the binary length There are some tricks like making a struct or array of binairy numbers. (saved as one int)

    @jwrm22@jwrm227 жыл бұрын
  • What kind application you use?

    @rifkihusnilmujalas4570@rifkihusnilmujalas45705 жыл бұрын
    • This series uses Processing (which is built on top of the Java programming language). For more info, visit processing.org and also this video might help kzhead.info/sun/dNGlcc2DqpuvY6c/bejne.html.

      @TheCodingTrain@TheCodingTrain5 жыл бұрын
  • What if we dó calculate with one state?

    @marvinfernandes6191@marvinfernandes61912 жыл бұрын
  • There is a lot of assumption that some of the results are completely random non-repeating, but I don't see any lines of code checking to see if any lines repeat.

    @olli3686@olli36862 жыл бұрын
  • What about cells that don't have two neighbors? Such as the left-most and the right-most ones.

    @fabse64@fabse648 жыл бұрын
    • you can deal with cells on the "borders" in two ways: 1) you assign a different neighborhood or 2) you wrap the borders around. For the first case, instead of having a 3-neighborhood (the central cell, the one on the left, the one on the right) you could use a 2-neighborhood (the cell itself and the immediate neighbor) for the leftmost and rightmost cell, since obviously there's only one cell adjacent to the cell on the border. However, usually the second solution is used: imagine that the "strip" of cells is made into a ring, by gluing together the leftmost cell and rightmost one. Now these two cells can have a 3-neighborhood. Just for clarification: let's say that we have four cells,which are labeled A-B-C-D. For B, the neighborhood is A-B-C. For C, is B-C-D. If you bend the strip into a ring, now A is close to D, so the neighborhood of A becomes D-A-B, and the n.b. for D becomes C-D-A. Makes sense?

      @RussellTeapot@RussellTeapot8 жыл бұрын
    • Yes, very much so, thank you. The alternative is to just assign cell -1 and n a fixed value, right?

      @fabse64@fabse648 жыл бұрын
    • fabse64 ah yes, this is another option that I forgot!

      @RussellTeapot@RussellTeapot8 жыл бұрын
    • Great answers!

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
    • Daniel Shiffman thank you very much :D Great video, by the way!

      @RussellTeapot@RussellTeapot8 жыл бұрын
  • repetition is naturally occuring when it comes to true randomness

    @hamburgrhelpless@hamburgrhelpless5 жыл бұрын
    • Wtf "true randomness" doesnt exist, just because we cant predict when/where/how its going to happen

      @ghostnoodle9721@ghostnoodle97213 жыл бұрын
  • Advent of Code 2018 Day 12 uses similar ideas. It uses a 5 cell neighborhood.

    @franchello1105@franchello1105 Жыл бұрын
  • This guy loves his automata

    @josephlicari8830@josephlicari88302 жыл бұрын
  • 12:50 I think it is "Repetition"

    @Beesheep@Beesheep3 жыл бұрын
  • Hocam bizi nerelere attınız ya. Adam kokain çekip gelmiş herhalde. CS223 projesini bitirmenin sırrı bu mu yoksa?

    @muzzers2776@muzzers27764 жыл бұрын
  • omg decrese cell size over time = suuuuuper cool!!!! :-D

    @peterhayman1789@peterhayman17897 жыл бұрын
    • nice tip!

      @TheCodingTrain@TheCodingTrain7 жыл бұрын
    • I've been trying to do that unsuccessfully, how did you manage to do it ?

      @alixturcq2282@alixturcq22827 жыл бұрын
    • full project: 1drv.ms/f/s!AlCwAhlxoW_Qg8UdNR5jmg-o-DaXTw These are the functions that play with the resolution each frame void InitCells(int res_){ res = res_; xLen = width/res; yLen = height/res; cells = new int[xLen][yLen]; cells[xLen/2][0] = 1; } This is my render function, essentially mapping the pixels to elements of the 2D cell array. this seems to be a very fast way of drawing lots of little squares void Render() { loadPixels(); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int iX = constrain( x/res, 0, xLen-1); //heres where it maps int iY = constrain( y/res, 0, yLen-1); //and here :-) if (cells[iX][iY] == 0) { pixels[x + y * width] = color(255, 0, 255); } else { pixels[x + y * width] = color(0, 255, 0); } } } updatePixels(); }

      @peterhayman1789@peterhayman17897 жыл бұрын
  • If stacked 1D CA generate emergent 2D patterns. Does a 2D CA generate 3D patterns when stacked in a lattice? Reminiscent of holographic principle? "The holographic principle is a tenet of string theories and a supposed property of quantum gravity that states that the description of a volume of space can be thought of as encoded on a lower-dimensional boundary to the region" Space and the dynamic things in it being an emergent 3D pattern. Which means we are already ghosts of some curious nature.

    @djbabbotstown@djbabbotstown2 жыл бұрын
  • I wonder how this dude would look like on high caffeine amounts and a nice dosis of not sleeping huehuehue

    @vcjg287@vcjg2873 жыл бұрын
  • thank you

    @ipdavid1043@ipdavid10434 ай бұрын
  • 13:32 ... my stomach! Thanks for the great lesson - and nausea.

    @jeffreycordova9082@jeffreycordova90828 жыл бұрын
    • +Jeffrey Cordova hah, sorry about that!

      @TheCodingTrain@TheCodingTrain8 жыл бұрын
  • Warning: in 2 years time you are going to fall of your bike.

    @papinkelman7695@papinkelman76956 жыл бұрын
    • Your comment haunts me to this day. I'm still waiting.

      @aa-rh1lp@aa-rh1lp5 жыл бұрын
    • jokes on you. I never ride a bike

      @ziquaftynny9285@ziquaftynny92855 жыл бұрын
    • success you were correct

      @h-Films@h-Films4 жыл бұрын
    • Ok what how did you know

      @Theooolone@Theooolone4 жыл бұрын
  • 17:31, could use KMAPS

    @anindyaprithvi3585@anindyaprithvi35852 жыл бұрын
  • 6:37 rule 46

    @garret1930@garret19304 жыл бұрын
  • yoo 2^2^x where x is the number of neighbors is the number of rules an automata has... that's amazing! If we do a 2D CA, we know for sure that for 8 neighbors, we got 2^2^9 possibilities, wich is something to the 154 or something! That's like terribly huge! Have we tried every single automata in 2D yet? and what about 26 neighbors (in 3D)?? I think I'm gonna pass the rest of my life playing with automatas.....

    @pladselsker8340@pladselsker83405 жыл бұрын
KZhead