The Ash Pattern Generator Search program, more commonly known as apgsearch, is an automated search program created by Adam P. Goucher. It generates soups, which by default are asymmetric and 16×16, and runs them until stabilization, recording any resulting still lifes, oscillators, spaceships, periodic linear infinite growth patterns, and "unusual growth" patterns. More recent versions also detect soups which are long-lived methuselahs and diehards as well as soups with large final populations.[note 1][note 2] Version 1.x and later upload the results to the online database Catagolue and have a peer-review process for verifying hauls submitted to the site.

Versions 4.x and later of apgsearch use a backend known as lifelib to simulate soups, and can simulate various types of rules and symmetric soups.

All symmetries can be "inflated" using the "i" prefix, replacing each cell in the sample soup with a 2×2 alignment of cells in the same state and resulting in soups of size e.g. 32×32 for iC1 instead of 16×16 for C1. Multiple "i" prefixes can be stacked to "inflate" cells to 4×4, 8×8, etc.[2]

The 25pct and 75pct pseudo-symmetries were used in the past to investigate soups with initial densities of 0.25 and 0.75 respectively, but they fell into disuse and are not supported by v3.x and above.[note 3] Other pseudo-symmetries such as 25p, 32x32, 1x256X2+1 etc. have been used, but are not considered standard. apgsearch and Catagolue encourage users to use designated "test" symmetries to test modifications to the client.[3]

Although various orthogonal and diagonal gutter symmetries are possible in Conway's Game of Life, apgsearch does not currently have official support for searching with them. However, various users have modified apgsearch in order to search these symmetries and have submitted the results to Catagolue under custom symmetry names.

GPU searching

As of version 5.x, apgsearch supports soup searching on a GPU using CUDA which, depending on the GPU used, can process soups several times faster than a standard CPU search. The GPU deems soups "interesting" which meet certain criteria, and these are then fully censused by the CPU.[note 4] Therefore, the results are uploaded to separate symmetries on Catagolue to avoid distorting the main census statistics, with C and D replaced with G and H respectively.[4] The symmetries currently supported are:

A variety of notable natural and semi-natural (i.e. appearing in symmetric soups) patterns were first discovered using apgsearch:

The first known natural occurrence of a nonstandard spaceship was found during alpha testing of the script. The soup, which produced an LWSS on HWSS 1, was submitted to the conwaylife.com forums on August 26, 2014 by Adam P. Goucher.[7] Many other nontrivial spaceship flotillae have since been found.

34P14.1 was first discovered in the ash of a symmetric soup in September 2018 by carybe, but was not noticed on Catagolue until October.[13]

68P9 was first discovered in the ash of a symmetric soup in October 2018 by carybe.[14]

42100M was first discovered in October 2018 by Dave Greene, only two days after apgsearch added support for detecting methuselahs, becoming the longest-lasting known methuselah within a 16×16 bounding box at the time.[15] A month later, this was followed by Homer, discovered by Adam P. Goucher and lasting 42883 generations.[16]

Other rules

apgsearch has the ability to run soup searches for various rules other than Conway's Game of Life. In the past, this was restricted to outer-totalistic rules with two states, but versions v4.x and later have added support for various families of rules over time. However, only non-exploding rules can reasonably be investigated in practice unless a certain symmetry can be assured to never explode.

As of v4.86, apgsearch officially supports the following types of cellular automata:

Hexagonal symmetries

Symmetric soups can also be run for rules other than Conway's Game of Life. However, many of the symmetries of the Moore neighbourhood do not apply to the hexagonal grid, and hexagonal rules must therefore use a separate set of symmetries. As of January 2019, this includes the following:

The maximum period for spaceships and oscillators is 1,000 in apgsearch 1.x, 4,000 in apgnano (apgsearch 2.x), 1,280 in apgmera (apgsearch 3.x), and 1,048,576 in apgluxe (apgsearch 4.x and 5.x); higher-period objects are classified as PATHOLOGICAL. High-period linear-growth patterns may not be identified and instead reported as zz_LINEAR. Additionally, the maximum bounding box for any spaceship, oscillator or still life in versions 3.x and before is 40×40 due to the limits of the standard apgcode format; larger objects are classified as ov_ (oversized) in these versions.

Version history

Python versions

Two versions of apgsearch, versions 0.x and 1.x, were written in Python for use in Golly.

Version 0.x

apgsearch v0.x was the initial version of the script, first published on September 8, 2014. When running the script, the user is first prompted to enter the number of soups to be searched, the rule under which to search, and the initial seed for soup generation. The script proceeds to search soups in sets of 100 until either the specified number of soups has been exceeded, or the user stops the search by pressing <q>. After the search finishes, Golly opens an HTML window which displays the results.[23]Aidan F. Pierce modified this version to allow soup-searching non-totalistic Life-like cellular automata, and made a later modification to allow the results to be uploaded to Catagolue.

Version 1.x

apgsearch v1.x was first released on February 20, 2015. The main improvements from version 0.x are the ability to search symmetrical soups and the periodic uploading of results to Catagolue.[24] apgsearch 1.x supports the following different (pseudo-)symmetries:

C1

C2_1, C2_2, C2_4

C4_1, C4_4

D2_+1, D2_+2

D2_x

D4_+1, D4_+4

D4_x1, D4_x4

D8_1, D8_4

8x32

C++ versions

Four versions of apgsearch, versions 2.x through 5.x, were written in C++. These versions are much faster, and are intended to be run from the command line of a Unix shell.

Version 2.x

apgsearch v2.x, codenamed apgnano, was first published on July 19, 2015 and released onto the conwaylife.com forums on July 28. It uses a bespoke algorithm called Life128, partially written in assembly language for speed, and can utilize both the SSE2 instruction set on x86_64 CPUs. It can only searches asymmetric (C1) 16×16 soups in Conway Life (B3/S23).[25]

Version 3.x

apgsearch v3.x, codenamed apgmera, was first published on March 3, 2016 and released onto the conwaylife.com forums on March 19. It uses an algorithm called vlife, and unlike version 2.x, it supports arbitrary outer-totalistic rules, as well as the full range of symmetries from apgsearch 1.1. It can use any of the SSE2, AVX1 and AVX2 instruction sets on x86_64 CPUs.

Although the main program is written in C++, version 3.x contains a shell script and a Python file to generate assembly code for different rules and symmetries.[26]

Version 4.x

apgsearch v4.x, codenamed apgluxe and based on lifelib, introduced the following features:

See also

Notes

↑Only methuselahs lasting at least 25,000 generations, diehards lasting at least 500 generations, and soups with final populations of at least 3,000 are reported, and only in Conway's Game of Life.

↑ 2.02.1apgsearch estimates the lifespan of each soup before testing it more precisely, and is not guaranteed to detect all methuselahs with a lifespan of less than 26,000 generations.

↑The 25% pseudo-symmetry was also briefly used but abandoned due to conflicts with percent-encoding for URIs/URLs.

↑A soup is deemed interesting if it fails to stabilize with period 6 within 12,000 generations or reaches the boundary of the finite universe (excluding escaping spaceships) considered by the GPU. Large still lifes, low-period oscillators, and diehards are therefore usually ignored.