cellular automata


    Dec 30 2009 | 7:19 pm
    hi board
    does anyone have good ideas on how to make a clever conway's game of life patch using just max objects?
    i'm thinking coll + matrix, but i'm not so good at managing data within coll...
    how would you make each cell in a matrix check the states of surrounding cells?
    i'm sure this can be solved in a brilliant way!
    .klive

    • Dec 30 2009 | 9:28 pm
      um, have you tried jit.conway?
    • Dec 31 2009 | 2:03 pm
      yeah, but that's a jitter object.
      any thoughts on this?
    • Dec 31 2009 | 2:43 pm
      not sure it's a clever way, but I would use two [lcd]s, and getpixel to retrieve the cells states
      aa
    • Jan 04 2010 | 3:31 am
      here's my idea towards a working patch;
      max v2;
      the result is somewhat strange, the array of numbers seems to make something a lot different from conway's game of life... any thoughts on the error here?
      also, how would you translate an array of 64 numbers back into the matrix to create a loop?
      the osc objects connect to a monome... i know there are some working cellular automata patches out there - but i prefer building this one from scratch.
      any help would be greatly appreciated!!!
      thanks!
      .klive
    • Jan 04 2010 | 6:50 pm
      anyone?
    • Jan 08 2010 | 2:25 pm
      It looks like the problem is the stage where you query the cell neighbours. When you are looking at cells on the side colums the offsets end up wrong. For example: -9 from any cell in the left row will not be a neighbour. You need to map these values properly, either wrapping the edges around or not.
      This isn't the easiest thing to do in max, it's probably better suited to a text based language (perhaps javascript which you can use in max) where creating loops is simpler, or jitter where [jit.conway] does all the hard work for you. That's not to say it isn't possible. Here is one example ready for use with the monome and below is a non-wrapping example which probably isn't as cleanly written. In max5 format currently I'm afraid.
      lh
    • Jan 08 2010 | 4:49 pm
      thanks luke! that is the most straightforward approach to this problem i've seen.
      there seems to be a problem with the coll's in the neighbours subpatch... they aren't storing anything.
      they need initial values?
      .klive
    • Jan 08 2010 | 5:15 pm
      Oh right, sorry I thought I had them embedded. They're just the offsets needed normally (like in your patch) and for the side columns. There's probably a much easier way to go about patching this anyway. I'm waiting for my monome to arrive so I've been looking into something similar anyway. I might try doing it in javascript and see how that goes, I'll post back here if I have any success.
      lh
      Mid:
      0, -9;
      1, -8;
      2, -7;
      3, -1;
      4, 1;
      5, 7;
      6, 8;
      7, 9;
      Left:
      0, -8;
      1, -7;
      2, 1;
      3, 8;
      4, 9;
      Right:
      0, -9;
      1, -8;
      2, -1;
      3, 7;
      4, 8;
    • Jan 08 2010 | 5:36 pm
      thanks! this is awesome!
    • Jan 08 2010 | 6:19 pm
      here is your patch in max v.4
      max v2;
      this patch doesnt work in maxv4 but suddenly does when opened in max5...
      does max 5 behave differently with some of the objects in this patch?
    • Jan 08 2010 | 6:40 pm
      aha, zl lookup and sum dont work in version 4.
    • Jan 08 2010 | 7:46 pm
      heres a max v.4 patch with zl object replacements....
      max v2;
      any thoughts on why it's acting strange?
      the results are cool though...
      .klive
    • Jan 08 2010 | 8:04 pm
      i am soooo close! please help!
    • Jan 08 2010 | 10:21 pm
      Here's some replacements, haven't checked if [zl iter] or [iter] were around in max4 but these should do the job for you.
      lh