Log In  

Cart #simpleca_040421-3 | 2021-04-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#89980 2021-04-04 16:18 ( Edited 2021-04-17 18:53)


cool! i was also randomly messing around with a cellular automata cart the other day. mine are just based on randomized 1d automata rules. how does yours work?

i got this to fit in a tweet cart

function s(x)
if(y==0)return r(n)\1
return (pget(min(max(x,0),127),y-1)-o)\m end
::i::r=rnd n=r(7)\1+2 o=r(17-n)\1 m=r((16-o)\n)\1+1 y=0
while(x<128)pset(x,y,(s(x)+((pget(s(x-1)+s(x+1)*n,0)-o)\m%3-1))%n*m+o) x+=1
if(y>127)goto i
flip()goto l

and made a more expanded one (press X to randomize the starting state/palette, and O to randomize a new rule)

Cart #bizifenaja-0 | 2021-04-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#90038 2021-04-05 21:23

Neat! I'll be 100% honest, I'm not entirely certain how it works; the goal was to have the 'ant' rotate a certain number of degrees based on the color that was read, but the way that I had first implemented this type of control, it didn't act in a very pleasing way, so what's seen here is just the result of tweaking until I found a more satisfying pattern of behavior. I will try to work out exactly what it's doing, though, and come back with a more thorough explanation.

I might try doing something with 1D cellular automata as well, now that I see what you've done with it. Thanks for sharing!

P#90048 2021-04-06 00:04

really cool, wish i knew more how it worked as well. i like how it generates both orderly structures and chaotic noise, makes for a very artsy and satisfying look

P#90267 2021-04-09 14:11

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-05-16 11:51:15 | 0.012s | Q:21