Difference between revisions of "Tutorials/gfind"

From LifeWiki
Jump to navigation Jump to search
(knightship → oblique spaceship)
m (Ian07 moved page Tutorials/Gfind to Tutorials/gfind without leaving a redirect: lowercase)
(No difference)

Revision as of 03:38, 4 August 2020

Oh, so you want to learn gfind, eh?

Things to do first

If you haven't, go to the Compiling C Code tutorial first.

Basic gfind

Let's start by opening gfind, if you forgot how, here:

cd /C/gfind
./gfind

Now, you should see a line that says:

gfind 4.9, D. Eppstein, 20 August 2011 
Rule (return for help):

If so, good, you've started up gfind. Now, try typing in the following:

b3/s23

That's the rule we are going to search. Now press enter, it should give a big list of "stuff" that looks like this:

Constructing c/2 edge filters... found 12156/65536 patterns
Searching for speed c/2, width 12.
Searching for speed c/2, width 12, glide-reflect symmetry.

x = 11, y = 5, rule = B3/S23
b2o5b2o$b3o4b3o$ob2o3bob2o$3o4b3o$bo6bo!

Searching for speed c/3, width 8.
Searching for speed c/3, width 8, glide-reflect symmetry.
Searching for speed c/3, width 9, glide-reflect symmetry.
Searching for speed c/3, width 15, bilateral symmetry.

x = 15, y = 9, rule = B3/S23
b2obobobobob2o$o3b3ob3o3bo$bob2obobob2obo$2bob2o3b2obo$5bo3bo2$
5bo3bo$6b3o$6b3o!

Searching for speed c/4, width 6.
Searching for speed c/4, width 6, glide-reflect symmetry.
Searching for speed c/4, width 7, glide-reflect symmetry.
Searching for speed c/4, width 11, bilateral symmetry.
Searching for speed c/4, width 12, bilateral symmetry.
Searching for speed c/4, width 13, bilateral symmetry, gutter.
Searching for speed 2c/4, width 6.

x = 4, y = 5, rule = B3/S23
b2o$3o$2obo$b3o$2bo!

Searching for speed c/4, width 6, diagonal.

x = 3, y = 3, rule = B3/S23
obo$2o$bo!

Searching for speed c/5, width 5.
Searching for speed c/5, width 5, glide-reflect symmetry.
Searching for speed c/5, width 6, glide-reflect symmetry.
Searching for speed c/5, width 9, bilateral symmetry.
Searching for speed c/5, width 10, bilateral symmetry.
Searching for speed c/5, width 11, bilateral symmetry, gutter.
Searching for speed 2c/5, width 5.
Searching for speed 2c/5, width 5, glide-reflect symmetry.
Searching for speed 2c/5, width 6, glide-reflect symmetry.
Searching for speed 2c/5, width 9, bilateral symmetry.
Searching for speed 2c/5, width 10, bilateral symmetry.
Searching for speed 2c/5, width 11, bilateral symmetry, gutter.
Searching for speed c/5, width 5, diagonal.
Searching for speed c/5, width 9, diagonal, bilateral symmetry.
Searching for speed c/5, width 11, diagonal, bilateral symmetry, gutter.
Searching for speed c/5, width 12, diagonal, skew gutter.
Searching for speed c/6, width 4.
Searching for speed c/6, width 4, glide-reflect symmetry.
Searching for speed c/6, width 5, glide-reflect symmetry.
Searching for speed c/6, width 7, bilateral symmetry.
Searching for speed c/6, width 8, bilateral symmetry.
Searching for speed c/6, width 9, bilateral symmetry, gutter.
Searching for speed 2c/6, width 4.
Searching for speed 2c/6, width 7, bilateral symmetry.
Searching for speed 2c/6, width 8, bilateral symmetry.
Searching for speed 2c/6, width 9, bilateral symmetry, gutter.
Searching for speed 3c/6, width 4.
Searching for speed 3c/6, width 4, glide-reflect symmetry.
Searching for speed 3c/6, width 5, glide-reflect symmetry.
Searching for speed 3c/6, width 7, bilateral symmetry.
Searching for speed 3c/6, width 8, bilateral symmetry.
Searching for speed 3c/6, width 9, bilateral symmetry, gutter.
Searching for speed c/6, width 4, diagonal.
Searching for speed c/6, width 7, diagonal, bilateral symmetry.
Searching for speed c/6, width 8, diagonal, glide-reflect symmetry.
Searching for speed c/6, width 9, diagonal, bilateral symmetry, gutter.
Searching for speed c/6, width 10, diagonal, skew gutter.
Search complete.

Look, it has some RLEs! But before we go into that, let's break it down a bit. You see, there are a lot of lines that look like "Searching for speed XX, width XX, XXX, XX", where X is a different thing. Let's see what each "X" means:

Searching for speed c/5, width 11, diagonal, bilateral symmetry, gutter.
  • Searching for speed c/5: This is the speed it's searching in, like c/2, c/3, and so on. In this case, it is looking for c/5 spaceships.
  • width 11: This is the width of the spaceship it's looking for, in this case, 11 cells, which means it's looking for a c/5 11-cell-wide spaceship.
  • diagonal: This means it is looking for a diagonal spaceship, lines without this mean it's looking for an orthogonal one.
  • bilateral symmetry: This means it will search symmetrical spaceships, which are usually easier to find.
  • gutter: A gutter is an empty space between halves of a bilaterally symmetric spaceship.

Unfortunately, it did not find a c/5 bilaterally symmetric diagonal gutter spaceship, but for some others, it did. Let's look at the RLE that is shown after Searching for speed c/3, width 15, bilateral symmetry.:

x = 15, y = 9, rule = B3/S23 
b2obobobobob2o$o3b3ob3o3bo$bob2obobob2obo$2bob2o3b2obo$5bo3bo2$
5bo3bo$6b3o$6b3o!

Now, if you copy and paste that into Golly, you will see a Dart, you've succeeded in rediscovering a spaceship! You can do this with other rules too, try b2/s, b34/s34, or b368/s236.

Parameters

You can also specify some parameters, like speed. To do that, after the rule, type in "/o(Speed)v/l(Level)", Speed is the speed (Although if you enter e.g. 7, it will search c/7, 2c/7, and 3c/7), and Level is the level of depth it will go to, a higher level will generally mean bigger ships and longer search. The following will search for a c/4 at level 75:

b3/s23/o4v/l75

It should take only about 1 minute or less, don't worry about the extra lines of outputs. After it's done, it should output the following RLE:

x = 16, y = 22, rule = B3/S23 
4bo2b2o2bo$4bob4obo$obobo6bobobo$obo10bobo$o14bo2$2o3b6o3b2o$bo
4b4o4bo$b4o6b4o$2b3o6b3o$2b3ob4ob3o2$6b4o$4b3o2b3o$2bo2b2o2b2o2b
o$4bo6bo$o3bo6bo3bo$obo10bobo2$3o10b3o$3o10b3o$bo12bo!

There! You have found a c/4 spaceship.

Word of Caution

Do not create articles for your discoveries on the LifeWiki. Report them to the ConwayLife.com forum instead, especially if the ship is interesting, e.g.:

  • A new speed
  • An oblique spaceship
  • The smallest of its speed
  • Does something super cool (Like turn a glider into copies of itself)

If the ship is notable, someone else will (sooner or later) create an article for it.