Re:Bitbanging 1D Reversible Automata
by genewitch on Thursday December 12, 2024 @05:28PM
(#42404084)
i wrote something similar a real long time ago, but it was a pig, super slow. So i upgraded to winpro or whatever and had copilot figure out what was slowing it down, and it was a simple fix, and i fleshed out the UI a bit. I forget where i first saw the rules, but when i went and fixed it up i used the wolframalpha reference[0]
Adjust the screen rez. i am not a software developer and i put stuff on github as additional backups.
the rules are the same numbers as OP used, so given the same seeds the monochrome output should be identical (this is a deterministic automaton) I forget which rules were my favorite, but i constantly test 110 and 73 (73 is psuedorandom but doesn't look like it is, it looks like it repeats.) - my code checks for loops, but it defaults to 1 screen-fulls of checking, you can press H to increase this by 1 screen-full per press. this will slow my code down to a crawl, but you can find loops in the longer period automata.
i was going to do a version similar in godot but i got distracted by ipv6 routing.
edit:
the part you'd need to adapt to add color in my code is just this one part, i think:
for pixel in range(1, w):
if lineOut[pixel] == 1:
world.set_at((pixel, h-1), (0, 0, 0))
else:
world.set_at((pixel, h-1), (255, 255, 255))
Re:Bitbanging 1D Reversible Automata
by genewitch on Friday December 13, 2024 @01:50AM
(#42406453)
oops you need to "cd cellular" after the venv command! I proofread that 4 times and still missed the cd, and i had just set it up for my kid to play with (he asked!)
Adjust the screen rez. i am not a software developer and i put stuff on github as additional backups.
[0]https://mathworld.wolfram.com/ElementaryCellularAutomaton.ht...
my code: https://github.com/genewitch/opensource/blob/master/elementa... it uses pygame you can do python -m venv cellular; scripts\activate.[bat|ps1|sh]; pip install pygame; python elementalautomata.py
the rules are the same numbers as OP used, so given the same seeds the monochrome output should be identical (this is a deterministic automaton) I forget which rules were my favorite, but i constantly test 110 and 73 (73 is psuedorandom but doesn't look like it is, it looks like it repeats.) - my code checks for loops, but it defaults to 1 screen-fulls of checking, you can press H to increase this by 1 screen-full per press. this will slow my code down to a crawl, but you can find loops in the longer period automata.
i was going to do a version similar in godot but i got distracted by ipv6 routing.
edit:
the part you'd need to adapt to add color in my code is just this one part, i think: