Page **1** of **9**

### Golly suggestions

Posted: **November 26th, 2016, 9:05 am**

by **Saka**

A thread for suggestions for golly.

My suggestions:

--------

**Python functions (sorry if some of these are already available):**

-getapg(cell-list) Returns the apg code of the cell list pattern

-apgrle(apgcode) Gets the RLE of the apgcode

-convertcl(rle) Converts the RLE into cell list

-convertrle(cell-list) Converts the cell list into rle

-forcedeletelayer() Deletes the current layer without the save dialog

-getcenterx() Find the X of the current center cell

-getcentery() Find the Y of the current center cell

-randfillsym(symmetry) Makes the next randfills have a certain symmetry

--------

Triangular neighborhood and overlay (indicated by T at the end e.g. B2/S3T)

Moore+2 neighborhood: Moore neighborhood that extends an extra cells (2c ships!)

### Re: Golly suggestions

Posted: **November 26th, 2016, 9:51 am**

by **blah**

Extended Von Neumann neighbourhoods (So there could be a proper RuleLoader implementation of Logic Land). I don't see how it could be difficult to add.

### Re: Golly suggestions

Posted: **November 26th, 2016, 1:51 pm**

by **drc**

Extended neighbourhoods like for example a 5 by 5 area instead of 3 by 3, that would be cool

### Re: Golly suggestions

Posted: **November 26th, 2016, 3:45 pm**

by **blah**

A way to completely disable grid lines. Right now all you can do is partially disable them in file>preferences>view, but that still leaves a grid the colour of state 0, and you can't even do it fully; you can just make it require higher zoom levels.

### Re: Golly suggestions

Posted: **November 26th, 2016, 6:54 pm**

by **gameoflifeboy**

Saka wrote:convertcl(rle) Converts the RLE into cell list

There is a scripting command that does just this, called parse(). It takes in an RLE or Life 1.05 string, and returns an optionally transformed cell list.

Saka wrote:-getcenterx() Find the X of the current center cell

-getcentery() Find the Y of the current center cell

It's pretty easy to use the list returned by getrect() to find the center cell of a pattern. Say the list is [x, y, width, height]. If the coordinates (x + (width - 1)/2, y + (height - 1)/2) are integers, they represent the center cell. Otherwise, the center of the bounding box doesn't lie in the middle of a cell and "center cell" is an ambiguous term.

-----

As for Golly suggestions, I'd definitely like more things in the online archives, like being able to browse certain Catagolue pages, such as a minimal version of the Statistics page, where instead of links to object pages there would be links to download each object and a soup that produced it.

### Re: Golly suggestions

Posted: **November 27th, 2016, 12:10 am**

by **Saka**

I have a pattern candidate!

Code: Select all

```
x = 61, y = 19, rule = shapeloop3
10DE2A5.13D5.3DC3.4D3.2DCD3.4D$C11HA5.D11HD5.D2HD3.D2HD3.D2HC3.D2HD$D
H.9HA5.DH9.HD5.C2HC3.B2HD3.D2HD3.D2HB$C2H10A5.DH9.HD5.D2HD3.D2HD3.D2H
5D2HD$D2HA14.DH9.HD5.B2HB3.D2HD3.DH.5H.HD$D2HA14.DH9.HD5.D2HD3.D2HD3.
D3H3.3HD$D2HA14.DH9.HD5.D2HD3.D2HD3.4DH.H2DBD$D2HA14.DH9.HD5.D2HB3.D
2HD6.DH.HD$D2HA3.7A4.DH9.HD5.D2HD3.B2HD6.DH.HD$D2HA3.A5HA4.DH9.HD5.D
2HC3.D2HC6.BH.HD$D2HA3.A3H.HA4.DH9.HD5.D2HD3.D2HD6.DH.HD$B2HA3.4A2HA
4.DH9.HD5.D2HC3.D2HC6.DH.HD$D2HA6.A2HA4.DH9.HD5.D2HD3.D2HD6.BH.HD$D2H
A6.A2HD4.DH9.HD5.D2HD3.D2HD6.DH.HD$D2HA6.A2HD4.DH9.HD5.D2HD3.D2HD6.DH
.HD$D2H8A2H6DH9.H6DC2HDCDBD2H8DH.HD$DH.8H2.6H11.7H2.5H2.8H2.HD$D56HD$
4DB5DB2DBDCDC4DC5DB3DB13DC10DC!
```

### Re: Golly suggestions

Posted: **November 29th, 2016, 7:08 pm**

by **Extrementhusiast**

Something I've always wanted is mod+ and mod- pasting, i.e. represent both the clipboard and the area to be pasted over as matrices, then add or subtract them, taking the result modulo

*n*, the number of cellstates. Makes it a hell of a lot easier to, using Catagolue, count

*t*-gen predecessors to an object (in order to identify commonalities) than the current method, which is this:

- Advance and rotate/flip all soups as needed, so that they produce the designated object at time
*t* in the same orientation. (This will still have to be done.)
- In a new layer using rule //256, create a large rectangle of state 1, large enough to encompass all predecessors, if they are all positioned so that the designated object would form in the same place.
- In the first layer, invert all predecessors, using a bounding box at least as large as that large rectangle.
- Switch to rule //256, and advance by 254 generations, so that the cells are of state 255.
- For each inverted predecessor:
- Copy it from the old layer, and paste it at the appropriate position on the new layer.
- Advance the new layer by one, and copy all of the result.
- Undo to just before the predecessor was pasted, and paste the above result in the same place you copied it from.

This will create a grid where a cell of state

*k* was present in

*k*-1 of the predecessors. Using mod+ pasting, the same task, excluding the first step, would take O(log(p)) steps, instead of O(p) steps.

### Re: Golly suggestions

Posted: **November 30th, 2016, 5:38 am**

by **Scorbie**

Looks like you could write a script that could do that...

### Re: Golly suggestions

Posted: **December 8th, 2016, 4:39 am**

by **Saka**

More things:

-Triangular Moore neighborhood without emulator

-Triangular Von Neumann neighborhood without emulator

-Margolus without emulator

-Custom neighborhoods, this is how you do it:

Code: Select all

```
@NEIGHBORHOOD NeighborhoodName
#This will use the Moore+2 neighborhood
#All neighborhoods created will have "none" or "permute" symmetry only
#Specify the cells using 0 for out-of-neighborhood cell or 1 for inside-of-neighborhood cell
#Use a "o" for the "origin" cell
@NEIGHBORS
x:5 #Width
y:5 #Height
11111
11111
11o11
11111
11111
@ORDER
#Optional, this is for the order when creating rule tables
#Default is c, N, NN, NE... c'
#o for origin
0,1,2,3,4
5,6,7,8,9
10,11,o,12,13
14,15,16,17,18
19,20,21,22,23
```

### Re: Golly suggestions

Posted: **December 8th, 2016, 6:43 am**

by **Rhombic**

Non-totalistic generations seem quite trivial to implement once the QuickLife standard non-totalistic rules are there (already).

### Re: Golly suggestions

Posted: **December 8th, 2016, 4:06 pm**

by **rowett**

blah wrote:A way to completely disable grid lines. Right now all you can do is partially disable them in file>preferences>view, but that still leaves a grid the colour of state 0, and you can't even do it fully; you can just make it require higher zoom levels.

This is implemented in Golly 2.9b2.

Drawing cell borders when zoomed in > 2x is now controlled by a View Preference: "Zoomed cells have borders".

### Re: Golly suggestions

Posted: **December 8th, 2016, 4:07 pm**

by **rowett**

Rhombic wrote:Non-totalistic generations seem quite trivial to implement once the QuickLife standard non-totalistic rules are there (already).

This is implemented in Golly 2.9b2.

The Generations algorithm now supports Hex, Von Neumann and non-totalistic Moore neighborhoods.

### Re: Golly suggestions

Posted: **December 9th, 2016, 9:36 am**

by **GUYTU6J**

I had an idea:a searching script.

For example,I select a piece of cells in a soup like this(selection box is marked blue)

Code: Select all

```
x = 50, y = 50, rule = LifeHistory
.A.A.A2.A3.5A7.3A4.A2.2A4.2A3.3A.A$4.2A5.4A4.2A.2A.2A2.A.A4.2A3.A2.2A
.2A$.4A2.A2.A2.A.A2.A6.A.A.A2.2A.A.A2.A.A2.A2.A$2.A3.A.A2.A.A.2A.A.2A
8.A.A3.2A3.A3.A2.2A$A3.2A2.A.2A3.A2.2A2.A3.A2.A2.A.A2.A.A.A2.2A.A$2.A
.A4.A.2A.A.2A.2A.A.A.A3.2A2.A3.A4.A.A.2A$4.A2.2A.A4.2A2.A.2A.3A3.A.A
7.2A.2A.A.2A$.2A.3A3.A2.A.2A9.A3.A.2A10.A2.A$2A6.A.2A.A2.A.2A2.A.2A2.
A3.3A3.A9.2A$A2.A2.A3.2A.2A2.3A.2A3.A.A3.2A2.2A4.2A.2A$6.2A5.4A3.2A3.
5A.A.A5.A.2A6.A$A2.2A.A2.3A2.A4.A.A2.A.A.A.2A6.3A7.2A$2A.3A2.5A2.A2.
4A3.A.A.A4.2A3.A3.2A.2A.A$2.2A.A8.A3.A.A.5A7.A2.2A3.A6.A$.4A.A.2A.3A
7.2A5.A3.A.3A.3A.A.2A$2.3A5.2A2.2A9.4A.2A2.A7.2A2.A$2A7.2A2.A2.A.2A2.
A3.3A.A3.A5.2A.2A.A.A$4.2A.2A.A2.A.3A2.A9.A.2A2.3A.A2.A.2A.2A$3.A6.2A
4.A3.A3.4A5.3A2.3A$2A.A.2A4.2A2.A.2A4.4A5.A3.A.A.A.2A2.A.2A$3.2A2.A3.
A.4A6.A6.A.A8.3A.2A$.2A.2A.A.A5.A5.3A5.A.A5.3A3.6A$2A2.A.2A.2A.A5.3A
2.2A3.2A.A3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A$.A7.2A3.A2.2D2E
2DE3D4.2A7.2A4.2A$2A.A2.A6.3A.2ED2EDEDED7.4A.2A3.2A.A.A$2A4.A5.A.2A.E
2DED2ED2EA2.A3.2A.A.2A2.A5.A$.2A8.A4.AE9DA6.A3.A2.A.A.A3.A$A.A3.2A3.A
2.A2.ED2E2DED2E.A5.A2.4A.3A.3A$2.A.A4.A.A3.2AD3ED2E3D2.2A.A2.2A.A3.A
2.A2.A$2A3.A.5A15.A.A.A2.A.2A.3A.A5.A$4A.4A3.A3.9A9.A2.3A.A4.A.A$.2A.
2A.A7.A.A2.A16.2A2.A2.A4.A$3.A4.A.2A.A4.A4.2A2.A2.A5.A.A5.A$26.2A3.A
4.A2.A3.4A.A$3.2A2.A4.A2.A4.3A2.A3.2A4.3A5.4A.2A$4.A4.A2.6A.2A2.A3.2A
2.A11.A4.A$4.2A.2A6.A3.A7.A4.2A11.A.A.A$2.A.2A.A3.A4.A.A4.6A.2A5.A2.A
6.2A$A3.2A.A.4A10.A.A6.A.A.3A4.A$A5.A.A.2A3.A.A2.A.A6.A.3A.3A2.2A3.A.
A.A$.2A2.2A3.A2.A6.A5.A.A2.A.A3.A2.A.3A$2.A.A10.A2.2A3.A4.A.A.2A4.2A
6.A2.A$.A5.2A.A3.2A.A2.A5.2A9.A.3A$2.A5.A.A6.A7.2A4.A.3A5.3A.3A!
```

Is it possible?

### Re: Golly suggestions

Posted: **February 20th, 2017, 11:40 am**

by **Mr. Missed Her**

Is a "lasso" select option possible? (The select option some image-type programs have where you can select blob shaped areas instead of rectangles.)

### Re: Golly suggestions

Posted: **February 20th, 2017, 4:32 pm**

by **biggiemac**

Alternate select options would be a great addition. Whenever working with large patterns with skewed-repeating sections like the waterbear or currently-backburnered (27,1)c/72 ship, it's been a real pain to only be able to select rectangular regions.

### Re: Golly suggestions

Posted: **February 21st, 2017, 12:28 am**

by **dvgrn**

Mr. Missed Her wrote:Is a "lasso" select option possible? (The select option some image-type programs have where you can select blob shaped areas instead of rectangles.)

Don't know if it's too likely for a lasso select to make it into Golly native functionality any time soon. Selections, and all the related Python and Lua script operations, are based on nice simple rectangles and would kind of have to be re-invented from the ground up to support arbitrary shapes.

That said, there's

chris_c's EditLife script toolkit, which includes lasso select functionality -- of a sort, anyway. Might be worth getting used to, for some projects.

It might be worth revisiting this lasso-via-script idea, now that Golly 2.9's overlay functionality is an option -- it's no longer necessary for the lasso line to consist of otherwise unused cells in the same universe as the selected pattern (or cells in an overlapping stacked layer, which creates other problems).

### Re: Golly suggestions

Posted: **February 25th, 2017, 1:40 pm**

by **shouldsee**

GUYTU6J wrote:I had an idea:a searching script.

For example,I select a piece of cells in a soup like this(selection box is marked blue)

Is it possible?

Conceptually I think it is possible.

The way I would do this:

a. Hash method

1. Get the hash value of your selection as v.

2. Find hash value of all possible selections of the same sizes

3. Detect positions with hash values of v.

4. Project postions back into selections.

b. convolution method:

1. Get the size of selection S as [wd,ht];

2. Generate a convolution filter F of size wd x ht (Depending the symmetry you want to incorporate, you might want to rotate or reflect the F. i.e. rotate4reflect should have 8 copy of F.) The elements of F should be 1,2,4,8,16,....,2^n.

3. Convolve F with the original picture (C=conv(F,pic)), store the value of V=conv(F,S).

4. In array C, find other positions with a value V.

5. Project these positions back into selections.

6. Recolour these selections.

In both case you need to handle the symmetries carefully. I suggest restrict the selection to squares to ease the whole process.

### Re: Golly suggestions

Posted: **July 30th, 2017, 7:47 pm**

by **muzik**

Few more I thought of:

- Oloid bounded grid

- Sphericon bounded grid

- Mobius strip bounded grid

- Support for "Snoitareneg" rules

### Re: Golly suggestions

Posted: **August 1st, 2017, 3:27 am**

by **AbhpzTa**

Support for

BSFKL rules (Golly and LifeViewer)

### Re: Golly suggestions

Posted: **August 1st, 2017, 7:05 pm**

by **bprentice**

AbhpzTa wrote:Support for BSFKL rules (Golly and LifeViewer)

Example rule:

Code: Select all

```
@RULE B13456S0357F1256K048L0123678
@TREE
num_states=3
num_neighbors=8
num_nodes=106
1 0 0 0
1 0 1 0
2 0 0 1
1 1 2 0
2 0 0 3
2 1 3 1
3 2 4 5
1 0 2 0
2 0 0 7
2 3 7 3
3 4 8 9
3 5 9 5
4 6 10 11
1 0 0 2
1 1 1 0
2 0 13 14
2 7 14 7
3 8 15 16
2 3 7 7
3 9 16 18
4 10 17 19
2 1 7 0
3 5 18 21
4 11 19 22
5 12 20 23
1 1 2 2
2 13 13 25
2 14 25 14
3 15 26 27
3 16 27 16
4 17 28 29
2 7 7 0
3 18 16 31
4 19 29 32
5 20 30 33
3 21 31 2
4 22 32 35
5 23 33 36
6 24 34 37
1 1 1 2
2 13 0 39
2 25 39 25
3 26 40 41
2 14 25 1
3 27 41 43
4 28 42 44
2 7 1 0
3 16 43 46
4 29 44 47
5 30 45 48
3 31 46 4
4 32 47 50
5 33 48 51
6 34 49 52
4 35 50 6
5 36 51 54
6 37 52 55
7 38 53 56
2 39 3 39
3 40 4 58
1 0 2 2
2 25 39 60
3 41 58 61
4 42 59 62
2 1 60 0
3 43 61 64
4 44 62 65
5 45 63 66
3 46 64 8
4 47 65 68
5 48 66 69
6 49 67 70
4 50 68 10
5 51 69 72
6 52 70 73
7 53 71 74
5 54 72 12
6 55 73 76
7 56 74 77
8 57 75 78
2 3 1 3
3 4 2 80
1 0 1 2
2 39 3 82
3 58 80 83
4 59 81 84
2 60 82 13
3 61 83 86
4 62 84 87
5 63 85 88
3 64 86 15
4 65 87 90
5 66 88 91
6 67 89 92
4 68 90 17
5 69 91 94
6 70 92 95
7 71 93 96
5 72 94 20
6 73 95 98
7 74 96 99
8 75 97 100
6 76 98 24
7 77 99 102
8 78 100 103
9 79 101 104
```

Example irregular gun:

Code: Select all

```
x = 6, y = 5, rule = B13456S0357F1256K048L0123678
4.A$.3A.A$5.B$A3.B$A2B!
```

Brian Prentice

### Re: Golly suggestions

Posted: **August 24th, 2017, 4:33 pm**

by **muzik**

The ability to simulate higher-range one-dimensional cellular automata would definitely be pretty nice,

especially since some of them have multiple spaceships.

### Re: Golly suggestions

Posted: **August 29th, 2017, 11:47 am**

by **muzik**

Also, how about odd Wolfram rules?

### Re: Golly suggestions

Posted: **August 29th, 2017, 1:05 pm**

by **dvgrn**

muzik wrote:Also, how about odd Wolfram rules?

A

surprisingly appropriate response from four years ago seems to be within reach of a quick search. Doesn't seem like the answer is likely to have changed. Is there something wrong with the script?

### Re: Golly suggestions

Posted: **August 29th, 2017, 3:24 pm**

by **drc**

Accidentally posted this in the wrong thread, but what about support natively for 'History' rules, i.e. B3/S23-eHistory would give you a version of LifeHistory but with B3/S23-e instead.

### Re: Golly suggestions

Posted: **August 29th, 2017, 9:06 pm**

by **Andrew**

drc wrote:what about support natively for 'History' rules

I can't see such rules ever being supported by QuickLife or HashLife. Those algos are highly optimized for 2-state rules, so would presumably require major changes to support extra history states.

A simpler solution might be to write a new History algorithm to support such rules. It could use the ghashbase class (like the Generations algo) and so should be reasonably simple to implement. I'm not all that interested in History rules (I just run envelope.lua on the rare occasions when I want to see a pattern's history), but maybe you can persuade one of the other Golly developers to give it a go in a future version.