How to use Afind (on a mac)
Posted: January 22nd, 2012, 1:08 am
This post is a follow-up to this discussion of how to use gfind on the mac: viewtopic.php?f=7&t=826
Download the latest version of afind here: http://plife.sourceforge.net/programs/afind.cc
As before, put it in your SearchPrograms folder.
Go to the terminal program, change your directory to SearchPrograms,
but this time, compile it using this command: g++ -o afind afind.cc
Unlike gfind, you specify searches in Afind using a separate text file.
Leave the terminal program for a moment, and make a text file called, say, "find-latest.txt".
Put the following specifications into the text file:
afind-0.5
width 12
period 2
rule b36/s23
and save the file in the SearchPrograms folder. The first line and the last line are required. The middle lines are ways to specify the search.
Return to the Terminal program and type this at the prompt: ./afind find-latest.txt
Depending on what options you put the find-latest.txt file, you might get an enormous outpouring of spaceships amazingly quickly. For periods 2 and 3 with reasonable widths, you'll often get many more spaceships much more quickly than with gfind. (But I believe gfind will be superior for higher periods, at least using the default specifications.)
The results are printed in Life 1.05 format (which readable by Golly, among others) right in the terminal program's output - copy and paste it the into Golly. You can copy-and-paste partial results - you don't need to wait for the program to terminate. Be sure to copy-and-paste the header information. Typical output looks like this:
====cut-and-paste======
#Life 1.05
#D Generated by afind-0.5.
#D Input parameters:
#D width = 14 (full_width = 28)
#D left_edge = 0
#D floating_rows = 0
#D period = 2
#D offset = 1
#D slide = 0
#D mode = even-bilateral symmetry
#D queue_size = 2^23
#D hash_size = 2^23
#R b3/s23
#D (73100) Sat Oct 1 14:44:25 2011
#P -160 -112
..................**........................**....................................**........................**..................
.....................*....................*........................................***.*...**......**...*.***...................
..................*...*.*..**......**..*.*...*.....................................**...*..............*...**...................
...................**...*..*........*..*...**......................................**.*.*...*......*...*.*.**...................
....................*.*.*.**........**.*.*.*..........................................*.*.**........**.*.*......................
.....................**.*.**........**.*.**..........................................**.*.*..........*.*.**.....................
......................*.*..............*.*.............................................**..............**.......................
.........................*............*.................................................*..............*........................
.......................*...**......**...*..............................................**..**.*..*.**..**.......................
.......................*......*..*......*...............................................****........****........................
........................*...*.****.*...*.................................................***.**..**.***.........................
.........................***..****..***...................................................*....**....*..........................
#D (73394) Sat Oct 1 14:44:25 2011
#P -160 -80
..................**.**..................**.**....................................**.**..................**.**..................
...................................................................................*.*....................*.*...................
..................*...*.....**....**.....*...*.....................................**.*.....**....**.....*.**...................
...................**.*..................*.**......................................**.*..*..*......*..*..*.**...................
....................*.*.*...*......*...*.*.*..........................................*.*..**......**..*.*......................
.....................**.*.***......***.*.**..........................................**.*.**........**.*.**.....................
......................*.*..............*.*.............................................**..............**.......................
.........................*............*.................................................*..............*........................
.......................*...**......**...*..............................................**..**.*..*.**..**.......................
.......................*......*..*......*...............................................****........****........................
........................*...*.****.*...*.................................................***.**..**.***.........................
.........................***..****..***...................................................*....**....*..........................
====cut-and-paste======
You'll find that spaceships get longer and longer for a specified width the longer you let a search go on.
Try adding another line to the search specifications file:
mode 0
or mode 1 or mode 2
to search for
asymmetrical spaceships, spaceships with odd symmetry, or spaceships with even symmetry.
The full list of parameters you can add (one per line in the text file) are:
"rule", "width", "period", "offset", "slide", "mode", "left_edge", "floating_rows", "queue_bits", and "hash_bits"
but frankly, I've only tried specifying with rule, width, period, and mode, and don't yet understand the others. You can scroll through the afind.cc source code and Eppstein's paper for hints on how to use the rest. I have noticed that afind is best for low periods, while gfind is better for higher periods.
One more tip for using the terminal program: the arrow keys allow you to scroll through your history of commands. That way, you don't have to retype the same command over and over.
Download the latest version of afind here: http://plife.sourceforge.net/programs/afind.cc
As before, put it in your SearchPrograms folder.
Go to the terminal program, change your directory to SearchPrograms,
but this time, compile it using this command: g++ -o afind afind.cc
Unlike gfind, you specify searches in Afind using a separate text file.
Leave the terminal program for a moment, and make a text file called, say, "find-latest.txt".
Put the following specifications into the text file:
afind-0.5
width 12
period 2
rule b36/s23
and save the file in the SearchPrograms folder. The first line and the last line are required. The middle lines are ways to specify the search.
Return to the Terminal program and type this at the prompt: ./afind find-latest.txt
Depending on what options you put the find-latest.txt file, you might get an enormous outpouring of spaceships amazingly quickly. For periods 2 and 3 with reasonable widths, you'll often get many more spaceships much more quickly than with gfind. (But I believe gfind will be superior for higher periods, at least using the default specifications.)
The results are printed in Life 1.05 format (which readable by Golly, among others) right in the terminal program's output - copy and paste it the into Golly. You can copy-and-paste partial results - you don't need to wait for the program to terminate. Be sure to copy-and-paste the header information. Typical output looks like this:
====cut-and-paste======
#Life 1.05
#D Generated by afind-0.5.
#D Input parameters:
#D width = 14 (full_width = 28)
#D left_edge = 0
#D floating_rows = 0
#D period = 2
#D offset = 1
#D slide = 0
#D mode = even-bilateral symmetry
#D queue_size = 2^23
#D hash_size = 2^23
#R b3/s23
#D (73100) Sat Oct 1 14:44:25 2011
#P -160 -112
..................**........................**....................................**........................**..................
.....................*....................*........................................***.*...**......**...*.***...................
..................*...*.*..**......**..*.*...*.....................................**...*..............*...**...................
...................**...*..*........*..*...**......................................**.*.*...*......*...*.*.**...................
....................*.*.*.**........**.*.*.*..........................................*.*.**........**.*.*......................
.....................**.*.**........**.*.**..........................................**.*.*..........*.*.**.....................
......................*.*..............*.*.............................................**..............**.......................
.........................*............*.................................................*..............*........................
.......................*...**......**...*..............................................**..**.*..*.**..**.......................
.......................*......*..*......*...............................................****........****........................
........................*...*.****.*...*.................................................***.**..**.***.........................
.........................***..****..***...................................................*....**....*..........................
#D (73394) Sat Oct 1 14:44:25 2011
#P -160 -80
..................**.**..................**.**....................................**.**..................**.**..................
...................................................................................*.*....................*.*...................
..................*...*.....**....**.....*...*.....................................**.*.....**....**.....*.**...................
...................**.*..................*.**......................................**.*..*..*......*..*..*.**...................
....................*.*.*...*......*...*.*.*..........................................*.*..**......**..*.*......................
.....................**.*.***......***.*.**..........................................**.*.**........**.*.**.....................
......................*.*..............*.*.............................................**..............**.......................
.........................*............*.................................................*..............*........................
.......................*...**......**...*..............................................**..**.*..*.**..**.......................
.......................*......*..*......*...............................................****........****........................
........................*...*.****.*...*.................................................***.**..**.***.........................
.........................***..****..***...................................................*....**....*..........................
====cut-and-paste======
You'll find that spaceships get longer and longer for a specified width the longer you let a search go on.
Try adding another line to the search specifications file:
mode 0
or mode 1 or mode 2
to search for
asymmetrical spaceships, spaceships with odd symmetry, or spaceships with even symmetry.
The full list of parameters you can add (one per line in the text file) are:
"rule", "width", "period", "offset", "slide", "mode", "left_edge", "floating_rows", "queue_bits", and "hash_bits"
but frankly, I've only tried specifying with rule, width, period, and mode, and don't yet understand the others. You can scroll through the afind.cc source code and Eppstein's paper for hints on how to use the rest. I have noticed that afind is best for low periods, while gfind is better for higher periods.
One more tip for using the terminal program: the arrow keys allow you to scroll through your history of commands. That way, you don't have to retype the same command over and over.