Improved bit-loop-to-stream copier for Margolus Critters
Posted: September 26th, 2019, 11:35 pm
This seems worth its own post (added: and a new thread), since it's an improvement over the clumsier loop bit copier I posted earlier this year, and because it is now viewable with Chris Rowett's LifeViewer enhancements. This is the first CA program I've used that really supports non-trivial pattern development for Critters. I may have found a new hobby (like I need one).
I have posted component details in two other threads, but to summarize, this starts out with a period-32 stream of gliders. Since Critters cannot create new cells from nothing, this stream is given as an input using PASTET. In the Critters universe, you can think of it as a stream going back to infinity. Everything else is part of the pattern.
The purpose of this pattern is to demonstrate a non-trivial data-manipulation in Critters. It contains a recirculating loop of the bits 01101000 (any other 8-bit loop works). Each bit consists of a pair of gliders phase-shifted to admit 90° turns, so the bit periodicity is 64. The rest of the pattern manipulates the input stream into an appropriate stream of phase-shifted pairs and uses it to read the bit loop as a periodic stream 011010000110100001101000...
Because of glider conservation, there needs to be a glider pair for 0 as well as 1. I have adjusted the output using 90° turns so it is reminiscent of a square-wave signal moving to the right. You can watch it in reverse and see it reconstruct the original uniform stream from the output (note this is not an undo history, but the same rules).
UPDATE: This is fairly trivial, but I didn't think of it until studying the pattern in reverse (and maybe it's known, but I can't find a lot of known results for specific Critters patterns). If two gliders in a stream are out of phase by 8n+4 steps, they can be reflected 90° using a two of the reflectors initially used to convert the stream.
I was so fixated on getting 8n+2 and 8n+6 spacing that I missed this. It should be possible to simply the whole design using 8n+4 pairs and avoid all the 8n+2 to 8n+6 conversions (I'm just starting to get an intuition about these things). It would be nice if there was a simple way to reflect 8n streams. I haven't found one yet.
I have posted component details in two other threads, but to summarize, this starts out with a period-32 stream of gliders. Since Critters cannot create new cells from nothing, this stream is given as an input using PASTET. In the Critters universe, you can think of it as a stream going back to infinity. Everything else is part of the pattern.
Code: Select all
x = 203, y = 152, rule = critters
#C [[ RLE input o$bo$bo$o! ]]
#C [[ PASTET EVERY 32 ]]
#C [[ PASTE input -16 50 ]]
23$105b2o$105b2o7$102bo$101bo$53b2o$53b2o$125b2o$125b2o3$55bo2bo2$56b
2o6$89b2o$89b2o3$bo15bo15bo15bo9bo21bo9bo$2bo15bo15bo15bo9bo21bo9bo6b
o$2bo15bo15bo15bo9bo21bo9bo6bo22bo$bo15bo15bo15bo9bo21bo9bo29bo3$83bo
54bo$84bo52bo3$49bo2bo119bo$50b2o119bo3$89b2o20b2o62b2o$89b2o20b2o62b
2o3$167bo2bo2$47b2o119b2o$47b2o3$131b2o$131b2o7$168b2o$167bo2bo17$167b
o2bo2$168b2o12$168b2o$167bo2bo11$127bo12bo$128bo9bo$128bo9bo$127bo12b
o$111b2o62b2o$111b2o62b2o3$116bo54bo$115bo56bo!
Because of glider conservation, there needs to be a glider pair for 0 as well as 1. I have adjusted the output using 90° turns so it is reminiscent of a square-wave signal moving to the right. You can watch it in reverse and see it reconstruct the original uniform stream from the output (note this is not an undo history, but the same rules).
UPDATE: This is fairly trivial, but I didn't think of it until studying the pattern in reverse (and maybe it's known, but I can't find a lot of known results for specific Critters patterns). If two gliders in a stream are out of phase by 8n+4 steps, they can be reflected 90° using a two of the reflectors initially used to convert the stream.
Code: Select all
x = 35, y = 20, rule = critters
6$21bo2bo3$3bo9bo$4bo9bo14bo$4bo9bo14bo$3bo9bo!