Can hashlife draw a long line?

For scripts to aid with computation or simulation in cellular automata.
Post Reply
Posts: 60
Joined: November 13th, 2017, 1:12 pm

Can hashlife draw a long line?

Post by ntdsc » March 12th, 2018, 4:00 pm

I'm trying to make a diagonal line at least 20,000 cells in length. I don't know if you can tweak the code in Golly to draw things from a program perspective (like draw a diagonal line 20,000 cells in length) or can you do that in hashlife? Can you zoom in and out in hashlife like in Golly?


Basically I'm trying to find something as fast as golly, but can automate drawing a single diagonal line (I'm currently copying and pasting in Golly). I don't think I need to used hashlife for the purpose of finding a pattern in the far future because the pattern is explosive (and thus the central area would be too large if it's way in the future and would completely bog down). The pattern is a small central area with four very long diagonals emanating from it. 4 runners shoot down the diagonals and when the runners reach the end of their line, I start recording the video of the central area. Just copying and pasting is working, but it would take several days to get 20,000 cells in length of all 4 diagonals made. And the rule is B3/S12456. By the way, by inverting the colors (black to white and white to black), I have noticed at the 2000 cell diagonal length, after video compressing, little short string feelers like aemoba along the 4 sharp v's at the central area. As the line length increases, due to video compression, the indentations along the edge of the large X will increase, and the aemebas should reach into the central oscillator, and that's when I think something interesting will happen, but it's with the colors inverted, so it looks like a dark star in a field of white.

Posts: 54
Joined: August 6th, 2009, 12:26 pm

Re: Can hashlife draw a long line?

Post by rokicki » March 12th, 2018, 4:52 pm

Just write a tiny Lua script for Golly.

There is draw-lines.lua already distributed with Golly that will let you draw lines of arbitrary
length in any rule/algorithm.

Posts: 60
Joined: November 13th, 2017, 1:12 pm

Re: Can hashlife draw a long line?

Post by ntdsc » March 12th, 2018, 5:13 pm

Thank you. This is the pattern:

Code: Select all

x = 588, y = 588, rule = B3/S12456
If any of you want to draw it, notice that the two top lines, one is always longer by one cell, same with the bottom two lines, since the center square corner is shifted in height by one cell relative to the one on the right. The reason there are indentations in the automata along the X, is that the long line is also shifted relative to the two small crossing lines in the center square (to make a clockwise pattern). But it's that single shift that bows in along the X, like a wave, and as the diagonal line increases, those indentations get deeper and deeper, until needles should show up along the length (in the actual uncompressed automata some time after execution along the X). And it's the color inversion. Before I was looking on the perimeter for ghost cells from compression, now the ameobas are strings that point towards the center and move like a feeler after video compression (I use action 3.0 beta). What may happen (since the X can be viewed as 2 long crossing tubes). A large ball may appear at the center, and then gyrate, and a smaller ball may shoot down in one direction of the 2 crossing tubes (As a large X). So a grid of the X's may need to be made like in this video: ... Q&index=11

Although it's a normal automata, due to the X formation in a grid of them like in the video, it's now a Von Neumann neighborhood, and those small balls that may appear and shoot down the tubes would be a quantum version of the billiard ball computer (Von Neumann automatas can make billiard ball computers).

In effect the ball would be a soliton (or glider) that comes from video compression, and the large ball that disintegrates forms a toothy boundary for the small ball, that would be phase shifted like in a boson sampler. That's what I'm considering now, but to start I'll make the single large X, because creating a large grid with long diagonals may need to run on Amazon's pay by service supercomputer time so it doesn't slow down, but it may not need it.

User avatar
Posts: 1472
Joined: January 12th, 2018, 9:19 pm

Re: Can hashlife draw a long line?

Post by 77topaz » March 12th, 2018, 5:47 pm

You can copy and paste longer and longer sections each time; that way, making a line of length n would only take O(log_2(n)) steps.

Also, I see this is quickly becoming a continuation of the "quantum computer" thread. :P

Posts: 60
Joined: November 13th, 2017, 1:12 pm

Re: Can hashlife draw a long line?

Post by ntdsc » March 12th, 2018, 6:41 pm

Well, when copying and pasting, if the line extends beyond the screen, it turns from green to red and won't let you paste it. But the reason the central area would gyrate in a grid like in the youtube video, the oscillators disintegrate eventually no matter how large the grid, because the ends don't continue, it's like it's cut off, and the very central X, it's oscillator would remain the longest. It gyrates initially due to its disintegration, but if the diagonals are long enough in the grid, it should maintain an oscillator shape as it travels to other central areas in adjoining X's. As it moves along, those compression remnants of stringy ameoba like feelers would stabilize it. But you can see the start of amoeba strings on the INSIDE perimeter of the automata at diagonals with 2000 cells long (and only from a compressed video centered at a certain distance from the central area, so I just zoom in and out as the video plays until the right distance, it's then seen with the 2000 diagonal length. The pattern shown I believe is only 400 cells long). When probably about 20,000 cells long, those amoeba strings would go to the center and move with the oscillator, and when disintegrated the single smaller oscillator "glider" would travel from node to node. I imagine the glider combined with the entire grid would be interpreted as an intelligence possibly and not just a computer, because it would travel around and its tip would pass information around the grid as it travels.

User avatar
Posts: 1472
Joined: January 12th, 2018, 9:19 pm

Re: Can hashlife draw a long line?

Post by 77topaz » March 12th, 2018, 7:24 pm

ntdsc wrote:Well, when copying and pasting, if the line extends beyond the screen, it turns from green to red and won't let you paste it.
Are you aware Golly has a "zoom" function? :P

Posts: 60
Joined: November 13th, 2017, 1:12 pm

Re: Can hashlife draw a long line?

Post by ntdsc » March 13th, 2018, 2:16 pm

Maybe you can paste it. Can you get the curser moves to be fine enough though to put it in the right spot, because I'm not sure if the curser is fine enough when zoomed out (you'd have to look at the top x,y coordinate or latitude to see if it can move fine enough.

I haven't made the final grid, but with the color invert function in golly, as the pattern expands (it will be black X's in a white background due to inverting the normal color), the end of an X will be very sharply pointed, and as a neighbor X expands also along the same line (as in the youtube video), it will be two knives pointing toward each other when both runners expand along the same line (from neighboring X's) and meet.

In the color inverted pattern (not shown here) with a single X shape that has all 4 runners expanded, it looks like a black star. When zoomed out a bit, you can see flashes of white all over the X, or star shape, inside the star. When instead in a grid with neighboring X's touching at the tips, if the ameobas stabilize it, and a flow happens, those white flashes may flow down and get funnneled through the narrow crossing point or where the two knives touch.

This is Dr. Englund's quantum photonic gate where at the very center, two knives touch: link ... tions.html
prototypedev.jpg (14.78 KiB) Viewed 4157 times
Where the two diagonals meet in a grid like in the youtube video posted, those flashes of light would be funneled. The automata, at the meeting point between two X's at the place where the two knives meet, the automata may selectively only allow "flashes or light" or photons of a certain phase (or frequency) to pass, while rejecting all others. Then the automata would act as a universal quantum gate in that Englund's gate (which he hasn't been able to physically make work yet due to scattering, only in computations) would work in the automata. I remember seeing a simulation of a black hole, and there were just numerous flashes of white light inside the black hole, and the black star also has flashes of light.

If you make it in a grid, the center would be clockwise (or counterclockwise you pick) and the upper left, upper right, lower left, and lower right neighbor X's would be counterclockwise. Then those counterclockwise would have clockwise around it, etc. The clockwise and counterclockwise patterns fit with no weird crossing, so it makes a continuous line, even though the diagonals shift, they fit together.

But thank you, and I'll try to see alright if the pasting can work with the curser, as my memory seems to think that it does, I was just using the mouse before.

To make the whole thing work though, you'd probably make the exact same automata, with one X white in a black background, and the identical automata only with color inverted playing at the same time. There's also circulation in the black area on the OUTSIDE of the white star (this has been only about the black star) and they would be duals of each other in the video compression sense, and with black holes, there is a dual nature to things i think, so in the end calculations where things are actually programmed both may be needed, playing at the same time, the white star and the black star.

User avatar
Posts: 1064
Joined: June 1st, 2013, 5:41 pm

Re: Can hashlife draw a long line?

Post by Rhombic » March 13th, 2018, 2:25 pm

Zoom out. Copy the whole thing. Zoom way in to the tip of where you want to extend the line from. Select the Paste location appropriately (i.e. if you want from bottom left to top right, choose bottom left paste location). Now you can paste with perfect accuracy.
SoL : FreeElectronics : DeadlyEnemies : 6a-ite : Rule X3VI
what is “sesame oil”?

User avatar
Posts: 6488
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Can hashlife draw a long line?

Post by dvgrn » March 14th, 2018, 9:58 am

Rhombic wrote:Zoom out. Copy the whole thing. Zoom way in to the tip of where you want to extend the line from. Select the Paste location appropriately (i.e. if you want from bottom left to top right, choose bottom left paste location). Now you can paste with perfect accuracy.
The shortcut for changing the paste location in Golly is Shift+L. Once I learned to use that instead of multiple clicks in the Edit menu, my general editing speed got faster by a significant percentage. I still haven't internalized Shift+M for the paste mode or the function keys for cursor types -- should probably learn those too.

For moderately long lines, another trick that works is to zoom to an appropriate drawing level, click to draw a cell at the very edge of the visible universe, and then move the mouse to just outside the frame -- hold it there for a while and let autoscrolling keep the line straight for you.

User avatar
Posts: 120
Joined: July 22nd, 2014, 12:59 pm
Location: Within the infinite expanses of the Life universe

Re: Can hashlife draw a long line?

Post by SuperSupermario24 » March 18th, 2018, 1:05 am

Here's a script that creates a line starting from given x and y coordinates with a given length, state, and direction:

Code: Select all

local g = golly()
local gp = require "gplus"

local x
local y

local selection = g.getselrect()

if(#selection ~= 0) then
    x = selection[1]
    y = selection[2]
    x, y = gp.split(g.getstring("Enter starting coordinates (x, y).", "0, 0", "Enter coordinates"), ", ")
    x = math.tointeger(x)
    y = math.tointeger(y)

local input = g.getstring([[
Enter length, state, and direction.
Available directions: N, E, S, W, NE, SE, SW, NW]], "200, 1, SE", "Enter properties")

local length, state, direction = gp.split(input, ", ")
length = math.tointeger(length)
state = math.tointeger(state)

if(length <= 0) then g.exit("Length must be positive.") end

if(state < 0 or state > g.numstates() - 1) then g.exit("State is out of range.") end

local dx = 0
local dy = 0

if(direction == "N") then
    dy = -1
elseif(direction == "S") then
    dy = 1
elseif(direction == "E") then
    dx = 1
elseif(direction == "W") then
    dx = -1
elseif(direction == "NE") then
    dy = -1
    dx = 1
elseif(direction == "SE") then
    dx = 1
    dy = 1
elseif(direction == "NW") then
    dx = -1
    dy = -1
elseif(direction == "SW") then
    dx = -1
    dy = 1
    g.exit("Invalid direction specified.")

local currentx = 0
local currenty = 0
for i = 0, length - 1 do
    g.setcell(x + currentx, y + currenty, state)
    currentx = currentx + dx
    currenty = currenty + dy
EDIT: Changed it so that if a selection rectangle exists, it will use the top-left cell in the selection as the starting point instead of prompting the user.

Code: Select all


Post Reply