Page 2 of 6

Re: Q&A for ptbsearch

Posted: May 8th, 2015, 5:29 am
by Scorbie
Another thing I noticed recently:
The search distinguishes every block, no matter transparent or opaque, so the same solution might appear multiple times. This isn't even annoying compared to previous bugs, but just in case this can increase search speed, I'm posting this phenomenon here.

For example, these three lines from the output,

Code: Select all

................**!...............*.*!...............*.......*!..............**.....***!....................*!....................z*!zz..............zz!zz..............zz!!!!!!!!.....ab..aa!.....ab..a.a!.........a!.............................zz!.............................*!..............................***!................................*! 64 24 0 385 4 **!**!
................**!...............*.*!...............*.......*!..............**.....***!....................*!....................z*!*z..............zz!zz..............zz!!!!!!!!.....ab..aa!.....ab..a.a!.........a!.............................zz!.............................*!..............................***!................................*! 64 24 0 385 4 **!**!
................**!...............*.*!...............*.......*!..............**.....***!....................*!....................z*!zz..............zz!*z..............zz!!!!!!!!.....ab..aa!.....ab..a.a!.........a!.............................zz!.............................*!..............................***!................................*! 64 24 0 385 4 **!**!
if expanded,

Code: Select all

................**
...............*.*
...............*.......*
..............**.....***
....................*
....................z*
zz..............zz
zz..............zz







.....ab..aa
.....ab..a.a
.........a
.............................zz
.............................*
..............................***
................................*
 64 24 0 385 4 **!**!

................**
...............*.*
...............*.......*
..............**.....***
....................*
....................z*
*z..............zz
zz..............zz







.....ab..aa
.....ab..a.a
.........a
.............................zz
.............................*
..............................***
................................*
 64 24 0 385 4 **!**!

................**
...............*.*
...............*.......*
..............**.....***
....................*
....................z*
zz..............zz
*z..............zz







.....ab..aa
.....ab..a.a
.........a
.............................zz
.............................*
..............................***
................................*
 64 24 0 385 4 **!**!
make the same following solution:

Code: Select all

x = 33, y = 22, rule = B3/S23
16b2o$15bobo$15bo7bo$14b2o5b3o$20bo$20b2o$2o14b2o$2o14b2o8$5b2o2b2o$5b
2o2bobo$9bo$29b2o$29bo$30b3o$32bo!
And the only difference is the top-leftmost block, which are, respectively,

Code: Select all

zz *z zz
zz,zz,*z

Re: Q&A for ptbsearch

Posted: May 8th, 2015, 1:28 pm
by chris_c
Scorbie wrote:Another thing I noticed recently:
The search distinguishes every block, no matter transparent or opaque, so the same solution might appear multiple times.
Yeah I can think of a way to fix that --- treat block catalysts as a special case in the code and only classify a block as transparent when three of the cells in the block have died. A couple of other things that I think are higher priority to add are:

1. Allow the user to specify the initial pattern using rle (either LifeHistory or standard).
2. Better post-processing of results. It's tedious and error-prone to have to look through thousands of results by hand. I will have to have a look at how simsim has handled this kind of thing in CatGL/CatForce.

Re: Q&A for ptbsearch

Posted: May 8th, 2015, 9:09 pm
by Scorbie
chris_c wrote:2. Better post-processing of results. It's tedious and error-prone to have to look through thousands of results by hand. I will have to have a look at how simsim has handled this kind of thing in CatGL/CatForce.
Yeah. Really need this feature. (I think Catgl isn't too good at organizing results... Maybe benchmarking catforce would do.)
chris_c wrote:1. Allow the user to specify the initial pattern using rle (either LifeHistory or standard).
I think that's kinda hard to parse... I am currently using a Golly script for converting a LifeHistory pattern to a ptbsearch pattern:

Code: Select all

import golly as g
import datetime

# The header isn't important. You can change it to whatever you want or even remove it.
header = "#Scorbie \"Dongook Lee\" " + str(datetime.datetime.today()) + "\n#P\n"
# Change it to your ptbsearch path
ptbpath = "C:\Users\LDU\Life\ptbsearch"
pattern = ''
 
r=g.getselrect()
if len(r)==0:
  r=g.getrect()
  if len(r)==0: g.exit("No pattern, nothing to do.")
sel = g.getcells(r)
if len(sel)==0: g.exit("Nothing in selection.")
 
# State 1: a State 3: b 
cellchar = ['.', 'a', '.', 'b', 'z', 'c', '*']
for y in xrange(r[1],r[1]+r[3]):
    for x in xrange(r[0], r[0]+r[2]):
        pattern += cellchar[g.getcell(x, y)]
    pattern+='\n'

savepath = g.savedialog('Save file','all files(*.*)|*',ptbpath)
try:
    with open(savepath,'wb') as file:
        file.write(header+pattern)
    g.show("File successfully saved in " + savepath)
except:
    g.exit("Unable to save file.")

Re: Q&A for ptbsearch

Posted: May 8th, 2015, 9:28 pm
by Freywa
Wait, Scorbie, I see the name "Lee Dongook" in that Historical Life-to-ptbsearch script. Is that your real name and does that mean you're a South Korean?

Re: Q&A for ptbsearch

Posted: May 8th, 2015, 9:45 pm
by Scorbie
Whoops. Yeah. Right. Why? (Send me a pm?)
(By the way, it's a common name and surname so I'm not likely to be the person you know, if that is the case.)

Re: Q&A for ptbsearch

Posted: June 6th, 2015, 11:22 am
by Scorbie
Bad news. ptbsearch crashes when given an intermediate result as the input file.
How to reproduce the bug:
I used this file(picol.lif):

Code: Select all

aa.
bb.
...
.a.
aa.
a.a
and ran this successfully:

Code: Select all

ptb2 picol.life spartan.list 50 0 1 0 30 > picol1.col
but the program crashed when I ran this:

Code: Select all

ptb2 picol1.col spartan.list 70 0 31 0 50 > picol11.col
The symptoms are subtly different with different params:
70 0 31 0 (without the last param) gives some results but crashes anyway.
70 1 31 1 50 doesn't crash but doesn't output anything. Not sure if this is working normal.

Re: Q&A for ptbsearch

Posted: June 7th, 2015, 7:04 am
by chris_c
Scorbie wrote:Bad news. ptbsearch crashes when given an intermediate result as the input file.
Strange. I can't reproduce any of those crashes. The "spartan.list" is 769 byte file found in Sokwe's ptbsearch.zip, correct?

In other news, I added RLE support to ptbsearch some weeks ago but I was too lazy to report. The new features are:

1. LifeHistory RLE can be used as the test pattern if the file extension is ".rle".
2. LifeHistory RLE in single line format can be used to define catalysts.
3. Catalysts can be easily removed from consideration by adding "#" at the start of the line.
4. Blank lines in the catalyst file are now ignored.
5. Lines that begin with "##" in the catalyst file are used as descriptors for any following lines and a summary of the catalysts being used in the current search is printed to stderr at the start.

Using the above features I added a minimal working example of ptbsearch finding the semi-snark here.

More detailed description of the above features was added to the README:

Code: Select all

+   If the filename of the test pattern ends in ".rle" then it is assumed
+   that the data is in RLE format. In plain RLE, live cells are translated
+   to '*'. In LifeHistory format state 1 translates to '*', state 3 to 'a'
+   and state 5 to 'b'. States 2 and 4 are ignored. No other states may be 
+   present.
+
+   RLE can also be used in the list of perturbers. RLE is assumed to be in
+   use if there is at least one instance of the character '$' on the line.
+   State 1 corresponds to '*' while states 3 and 5 correspond to 'z'. All
+   RLE for a single catalyst must appear on one line. Lines that begin with
+   two hash signs '##' are used as descriptors for the following catalysts.
+   Lines that begin with a single hash sign '#' are ignored, as are lines
+   that are purely whitespace. At the start of the program's execution a
+   summary of the catalysts that are being used is printed to stderr.
Are these crashes reproducible for you with the latest version of the code?

http://github.com/ceebo/ptbsearch

Re: Q&A for ptbsearch

Posted: June 7th, 2015, 8:38 am
by Scorbie
chris_c wrote:The "spartan.list" is 769 byte file found in Sokwe's ptbsearch.zip, correct?
Correct. Strange. I'm not sure if I can compile your version in windows... I'll give it a try.
It compiles well but still gives me a segfault. I'm not sure why. I'll report if it is related to something important.

Re: Q&A for ptbsearch

Posted: June 7th, 2015, 11:28 am
by Scorbie
Erasing the long long posts as there is an explanation by chris_c below. Sorry about the interruption, if anyone was concerned.

Re: Q&A for ptbsearch

Posted: June 7th, 2015, 9:01 pm
by Scorbie
Erasing the long long posts as there is an explanation by chris_c below. Sorry about the interruption, if anyone was concerned.

Re: Q&A for ptbsearch

Posted: June 8th, 2015, 5:57 am
by chris_c
Scorbie wrote:I think I got it. In ptbsearch2.c, line 9

Code: Select all

static char out[8000];
but in ptbsearch2.c, line 109, which is:

Code: Select all

makeString(tmp.cellList, tmp.ncells, out);
the length of out > 8000 on some situations. I recall it was about 40000 when I called print strlen(out).
Great! Yes, I can reproduce that crash. Sorry, when I read your first post even though you made it clear that you were talking about intermediate results I completely missed that you were using the output of the first command as the input for the second. Unfortunately, this is not how ptbsearch works. The input pattern is only ever supposed to be a single pattern. I think that effectively the second command is creating a single pattern that is the union of all the intermediate patterns laid out in a grid. That is why the hard-coded limits for out and alignstore are inadequate.

To use ptbsearch on a list of patterns there is a note about a ptblist.pl in the README but I have never used it myself.

Also a quick note about the command line arguments you have been using:

Code: Select all

ptb2 picol.life spartan.list 50 0 1 0 30
This says:

max-generation for all perturbers = 50
number of perturbers = 0 + 1 = 1
min-generation for all perturbers = 1
transparent perturbers = 0
max-generation for first perturber = 30

Now because there is only one perturber anyway this would be equivalent to:

Code: Select all

ptb2 picol.life spartan.list 30 0 1 0
i.e. there is never any need to set max-generation for first perturber when only using one perturber.

I think it would be easier to just run:

Code: Select all

ptb2 picol.life spartan.list 50 1 1 0 30
rather than working with an intermediate step like you were doing before.

Re: Q&A for ptbsearch

Posted: June 8th, 2015, 6:58 am
by Scorbie
chris_c wrote:To use ptbsearch on a list of patterns there is a note about a ptblist.pl in the README but I have never used it myself.
Thanks!! That was exactly what I was looking for!
chris_c wrote:Also a quick note about the command line arguments you have been using:
Yeah, you're right about that. I was just using that as a test case, so no worries.

I wanted to use the intermediate step thing, mostly because there are a lot of situations where adding many catalysts just take a lot of time.

And this is what I get from unthorough searches:
(I know these are all known or useless, but I guess these results aren't bad for using a new perl script, don't you think?)

Code: Select all

x = 100, y = 22, rule = B3/S23
12b2o48b2o$12b2o26bo13b2o6bo$40b3o11b2o4bobo19b2o$13bo29bo16b2o20bobo$
12b2o28b2o11bo28bo$12bobo39b2o28b2o$54bobo$24b2o$24b2o61b2o$2b2o56b2o
25b2o$3bo56bobo$3o59bo25bo$o53b2o6b2o23b2o$54b2o31bobo8b2o$80b2o16b2o$
80b2o3$9b2o$10bo$7b3o$7bo!
By the way, I think this is the usage that the author intended:

Code: Select all

ptb2 input.in cats.list [max gen] [# of cats-1]
                        [min gen] [# of transparent cats]								 
                        [max gen of first interaction]
                        > output.col
survive <cell labels to ignore> [opaque cats max recovery time]
        < result.col | uniq.pl (optional)| makematrix.pl > output.life
ptblist intermediate-result.col cats.list [max gen] > output.col
where uniq.pl saves only one each group of results that evolve into the same pattern.

Re: Q&A for ptbsearch

Posted: June 9th, 2015, 6:08 pm
by Scorbie
Does anyone know the order of the output patterns of ptbsearch? Does it equal to the order of the first catalyst?

Re: Q&A for ptbsearch

Posted: June 9th, 2015, 7:46 pm
by chris_c
Scorbie wrote:Does anyone know the order of the output patterns of ptbsearch? Does it equal to the order of the first catalyst?
Yes, the first catalyst that interacts is chosen by the order of the catalysts in the input file. Then, amongst successful results that have the same first catalyst, the second catalyst is ordered in the same way, etc... etc...

Re: Q&A for ptbsearch

Posted: June 11th, 2015, 7:44 am
by Scorbie
Suggesting dimer/tetramerization of known catalysts and catalysts I have seen occasionally:

Code: Select all

x = 69, y = 39, rule = B3/S23
3b2o15b2obo2bob2o10bo$3bobo14b2ob4ob2o9bobobo$bobob3o30bob2ob3o20bo$ob
o5bo11b2ob4ob2o8bo7bo7bobo6bobobo$bo5bobo11bobo2bobo8b2o6bobo6b2obo5b
2o2bo$2b3obobo12bobo2bobo16b2o10bo9b2o$4bobo13b2ob4ob2o7b2o15b2ob2o4b
2o$5b2o29bobo6b2o8bo8bo2b2o$20b2ob4ob2o7bo7bo9bob2o5bobobo$20b2obo2bob
2o8b3ob2obo10bobo6bo$40bobobo$43bo14$56bo$20bo$20bo2bo11bobobo17b3o$o
2bobo2bo11b3o10b3ob2obo17bo$4ob4o23bo7bo$4bo13bo2bo2b2o7bo6b2o16b2o2bo
$2bo3bo11b4o3bo6b2o20bo2bob4o$bob3obo14b3o15b2o12b4o$2bo3bo13bobo9b2o
6bo17b3o$4bo13b3o12bo7bo14bo3bo$4ob4o8bo3b4o8bob2ob3o15b3o$o2bobo2bo8b
2o2bo2bo9bobobo20b4o$54b4obo2bo$54bo2b2o!
What do you think? Are some of them too big?

EDIT: Here are the compilation of catalyst polymers:

Code: Select all

#Rotated skew long hooks (Eater equivalent + long hook)
....*z.
z*..*..
z.*.*..
..*.*.z
..*..*z
.z*....

.z*....
..*..*z
..*.*.z
z.*.*..
z*..*..
....*z.

.zz...
.*...z
..****
......
****..
z...*.
...zz.

.zz...
.*...z
..****
......
****..
z...*.
...zz.

#Dock on dock (Eater hook equivalent)
z*..*z
*....*
.****.
......
.****.
*....*
z*..*z

**...**
*.*.*.*
..*.*..
..*.*..
*.*.*.*
**...**

#Dual Eater
...zz.....
...*.*....
.*.*.***..
*.*.....*.
.*.....*.*
..***.*.*.
....*.*...
.....zz...

.....zz...
....*.*...
..***.*.*.
.*.....*.*
*.*.....*.
.*.*.***..
...*.*....
...zz.....

...*....
..*.*...
...*.*..
z**..*..
z....**.
.**....z
..*..**z
..*.*...
...*.*..
....*...

....*...
...*.*..
..*.*...
..*..**z
.**....z
z....**.
z**..*..
...*.*..
..*.*...
...*....

#Eater 2
zz.*..*.zz
zz.****.zz
..........
**.****.**
.*.*..*.*.
.*.*..*.*.
**.****.**
..........
zz.****.zz
zz.*..*.zz

#Eater 3
.zz............
z..z..**.......
z.z....*..*....
.z.....*.*.*...
....z*.*..*.*..
....*..*...*...
.*....*........
.*****...*****.
........*....*.
...*...*..*....
..*.*..*.*z....
...*.*.*.....z.
....*..*....z.z
.......**..z..z
............zz.

............zz.
.......**..z..z
....*..*....z.z
...*.*.*.....z.
..*.*..*.*z....
...*...*..*....
........*....*.
.*****...*****.
.*....*........
....*..*...*...
....z*.*..*.*..
.z.....*.*.*...
z.z....*..*....
z..z..**.......
.zz............

#Hook with tail
*.*..
**.*.
...*.
**.**
.*...
.*.**
..*.*

...*.**
.***.*.
*.....*
.*.***.
**.*...

#Long hook with tail
...*..
*.*.*.
**..*.
....**
**....
.*..**
.*.*.*
..*...

..*...
.*.*.*
.*..**
**....
....**
**..*.
*.*.*.
...*..

.**.*...
..*.***.
.*.....*
*.....*.
.***.*..
...*.**.

...*.**.
.***.*..
*.....*.
.*.....*
..*.***.
.**.*...

#Table on table
z..z
****
....
****
z..z

z*.*z
.*.*.
.*.*.
z*.*z

#Eater + Hook with tail
...*.*.*..
.***.**.*.
*.......*.
.*......**
**........
........**
**......*.
.*.......*
.*.**.***.
..*.*.*...

#Bi-table
*..z.z..*
****.****
....*....
..*...*..
.*.***.*.
..*...*..
....*....
****.****
*..z.z..*

**.....**
.*..*..*.
.*.*.*.*.
z*..*..*z
..*.*.*..
z*..*..*z
.*.*.*.*.
.*..*..*.
**.....**
#Eater with table
**..z..z..**
*...****...*
.***....***.
....*..*....
.***....***.
*...****...*
**..z..z..**

**...**
*.*.*.*
..*.*..
..*.*..
z*.*.*z
.*...*.
.*...*.
z*.*.*z
..*.*..
..*.*..
*.*.*.*
**...**

#Gourmet Catalyst
....z.......
...*.*.*....
..*.**.***..
..*.......*.
.**......*.z
.........**.
.**.........
z.*......**.
.*.......*..
..***.**.*..
....*.*.*...
.......z....

.......z....
....*.*.*...
..***.**.*..
.*.......*..
z.*......**.
.**.........
.........**.
.**......*.z
..*.......*.
..*.**.***..
...*.*.*....
....z.......

#Barge (Boat equivalent)
.z..
z.*.
.*.z
..z.

..z.
.*.z
z.*.
.z..

#Long Ship (Ship eqivalent)
zz..
z.*.
.*.z
..zz

..zz
.*.z
z.*.
zz..

#Ship and Eater
........**.
........z.z
.........zz
...........
......*z...
.......*...
....***....
...*.......
...z*......
...........
zz.........
z.z........
.**........

.**........
z.z........
zz.........
...........
...z*......
...*.......
....***....
.......*...
......*z...
...........
.........zz
........z.z
........**.

..........**.
..........z.z
...........zz
.......*z....
......*.*....
......*......
....*.*......
....z*.......
zz...........
z.z..........
.**..........

.**..........
z.z..........
zz...........
....z*.......
....*.*......
......*......
......*.*....
.......*z....
...........zz
..........z.z
..........**.

#Bookend
........zz
......z..*
......***.
...*......
...****...
......*...
.***......
*..z......
zz........

zz........
*..z......
.***......
......*...
...****...
...*......
......***.
......z..*
........zz

.......*z
......*.z
......*..
...**.**.
....*....
....*....
.**.**...
..*......
z.*......
z*.......

z*.......
z.*......
..*......
.z*.**...
....*....
....*....
...**.*z.
......*..
......*.z
.......*z

#Twit
*z.............
*z...z.........
....z.*........
.....*.*.......
.......*.......
.......*.*.....
........*.z....
.........z...z*
.............z*

.............z*
.........z...z*
........*.z....
.......*.*.....
.......*.......
.....*.*.......
....z.*........
*z...z.........
*z.............

*z.......
*z.......
.........
.........
..z......
.z.*.....
..*......
...***...
......*..
.....*.z.
......z..
.........
.........
.......zz
.......**

.......**
.......zz
.........
.........
......z..
.....*.z.
......*..
...***...
..*......
.z.*.....
..z......
.........
.........
zz.......
**.......

#Reflector hook
.....zz
....z.z
....*..
.....*.
..***..
.*.....
..*....
z.z....
zz.....

zz.....
z.z....
..*....
.*.....
..***..
.....*.
....*..
....z.z
.....zz

.......zz
.....*..z
....*.*z.
....*....
.z*.*....
z..*.....
zz.......

zz.......
z..*.....
.z*.*....
....*....
....*.*z.
.....*..z
.......zz

#Beehive tail thing
...z*.*z
....*.*
....*.*
.zz.*.*.zz
z..*...*..z
.**.....**

.**.....**
z..*...*..z
.zz.*.*.zz
....*.*
....*.*
...z*.*z

.z
*.z
*.z
.*...z
..****

..****
.*...z
*.z
*.z
.z

....z
...z.*
...z.*
z...*
****

****
z...*
...z.*
...z.*
....z

And here's the catalyst list if you're interested:

Code: Select all

#Rotated skew long hooks (Eater equivalent + long hook)
....*z.!z*..*..!z.*.*..!..*.*.z!..*..*z!.z*....!
.z*....!..*..*z!..*.*.z!z.*.*..!z*..*..!....*z.!
.zz...!.*...z!..****!......!****..!z...*.!...zz.!
.zz...!.*...z!..****!......!****..!z...*.!...zz.!
#Dock on dock (Eater hook equivalent)
z*..*z!*....*!.****.!......!.****.!*....*!z*..*z!
**...**!*.*.*.*!..*.*..!..*.*..!*.*.*.*!**...**!
#Dual Eater
...zz.....!...*.*....!.*.*.***..!*.*.....*.!.*.....*.*!..***.*.*.!....*.*...!.....zz...!
.....zz...!....*.*...!..***.*.*.!.*.....*.*!*.*.....*.!.*.*.***..!...*.*....!...zz.....!
...*....!..*.*...!...*.*..!z**..*..!z....**.!.**....z!..*..**z!..*.*...!...*.*..!....*...!
....*...!...*.*..!..*.*...!..*..**z!.**....z!z....**.!z**..*..!...*.*..!..*.*...!...*....!
#Eater 2
zz.*..*.zz!zz.****.zz!..........!**.****.**!.*.*..*.*.!.*.*..*.*.!**.****.**!..........!zz.****.zz!zz.*..*.zz!
#Eater 3
.zz............!z..z..**.......!z.z....*..*....!.z.....*.*.*...!....z*.*..*.*..!....*..*...*...!.*....*........!.*****...*****.!........*....*.!...*...*..*....!..*.*..*.*z....!...*.*.*.....z.!....*..*....z.z!.......**..z..z!............zz.!
............zz.!.......**..z..z!....*..*....z.z!...*.*.*.....z.!..*.*..*.*z....!...*...*..*....!........*....*.!.*****...*****.!.*....*........!....*..*...*...!....z*.*..*.*..!.z.....*.*.*...!z.z....*..*....!z..z..**.......!.zz............!
#Hook with tail
*.*..!**.*.!...*.!**.**!.*...!.*.**!..*.*!
...*.**!.***.*.!*.....*!.*.***.!**.*...!
#Long hook with tail
...*..!*.*.*.!**..*.!....**!**....!.*..**!.*.*.*!..*...!
..*...!.*.*.*!.*..**!**....!....**!**..*.!*.*.*.!...*..!
.**.*...!..*.***.!.*.....*!*.....*.!.***.*..!...*.**.!
...*.**.!.***.*..!*.....*.!.*.....*!..*.***.!.**.*...!
#Table on table
z..z!****!....!****!z..z!
z*.*z!.*.*.!.*.*.!z*.*z!
#Eater + Hook with tail
...*.*.*..!.***.**.*.!*.......*.!.*......**!**........!........**!**......*.!.*.......*!.*.**.***.!..*.*.*...!
#Bi-table
*..z.z..*!****.****!....*....!..*...*..!.*.***.*.!..*...*..!....*....!****.****!*..z.z..*!
**.....**!.*..*..*.!.*.*.*.*.!z*..*..*z!..*.*.*..!z*..*..*z!.*.*.*.*.!.*..*..*.!**.....**
#Eater with table
**..z..z..**!*...****...*!.***....***.!....*..*....!.***....***.!*...****...*!**..z..z..**!
**...**!*.*.*.*!..*.*..!..*.*..!z*.*.*z!.*...*.!.*...*.!z*.*.*z!..*.*..!..*.*..!*.*.*.*!**...**!
#Gourmet Catalyst
....z.......!...*.*.*....!..*.**.***..!..*.......*.!.**......*.z!.........**.!.**.........!z.*......**.!.*.......*..!..***.**.*..!....*.*.*...!.......z....!
.......z....!....*.*.*...!..***.**.*..!.*.......*..!z.*......**.!.**.........!.........**.!.**......*.z!..*.......*.!..*.**.***..!...*.*.*....!....z.......!
#Barge (Boat equivalent)
.z..!z.*.!.*.z!..z.!
..z.!.*.z!z.*.!.z..!
#Long Ship (Ship eqivalent)
zz..!z.*.!.*.z!..zz!
..zz!.*.z!z.*.!zz..!
#Ship and Eater
........**.!........z.z!.........zz!...........!......*z...!.......*...!....***....!...*.......!...z*......!...........!zz.........!z.z........!.**........!
.**........!z.z........!zz.........!...........!...z*......!...*.......!....***....!.......*...!......*z...!...........!.........zz!........z.z!........**.!
..........**.!..........z.z!...........zz!.......*z....!......*.*....!......*......!....*.*......!....z*.......!zz...........!z.z..........!.**..........!
.**..........!z.z..........!zz...........!....z*.......!....*.*......!......*......!......*.*....!.......*z....!...........zz!..........z.z!..........**.!
#Bookend
........zz!......z..*!......***.!...*......!...****...!......*...!.***......!*..z......!zz........!
zz........!*..z......!.***......!......*...!...****...!...*......!......***.!......z..*!........zz!
.......*z!......*.z!......*..!...**.**.!....*....!....*....!.**.**...!..*......!z.*......!z*.......!
z*.......!z.*......!..*......!.z*.**...!....*....!....*....!...**.*z.!......*..!......*.z!.......*z!
#Twit
*z.............!*z...z.........!....z.*........!.....*.*.......!.......*.......!.......*.*.....!........*.z....!.........z...z*!.............z*!
.............z*!.........z...z*!........*.z....!.......*.*.....!.......*.......!.....*.*.......!....z.*........!*z...z.........!*z.............!
*z.......!*z.......!.........!.........!..z......!.z.*.....!..*......!...***...!......*..!.....*.z.!......z..!.........!.........!.......zz!.......**!
.......**!.......zz!.........!.........!......z..!.....*.z.!......*..!...***...!..*......!.z.*.....!..z......!.........!.........!zz.......!**.......!
#Reflector hook
.....zz!....z.z!....*..!.....*.!..***..!.*.....!..*....!z.z....!zz.....!
zz.....!z.z....!..*....!.*.....!..***..!.....*.!....*..!....z.z!.....zz!
.......zz!.....*..z!....*.*z.!....*....!.z*.*....!z..*.....!zz.......!
zz.......!z..*.....!.z*.*....!....*....!....*.*z.!.....*..z!.......zz!
#Beehive tail thing
...z*.*z!....*.*!....*.*!.zz.*.*.zz!z..*...*..z!.**.....**!
.**.....**!z..*...*..z!.zz.*.*.zz!....*.*!....*.*!...z*.*z!
.z!*.z!*.z!.*...z!..****!!..****!.*...z!*.z!*.z!.z!
....z!...z.*!...z.*!z...*!****!!****!z...*!...z.*!...z.*!....z!
EDIT2: Making the list let me make these questionable tetramers. Do they have enough space?

Code: Select all

#C [[ VIEWONLY ]]
x = 76, y = 31, rule = B3/S23
3b2o19b2o$2bobo19b2o21b2o2bo2bo15b2o$2b2o43bo3b4o13bo2bo$48b3o17b3o$5b
2o19bo23bobo$5bo19bobo23b2o15b2obob2o$6b3o17bo42bob2obo$8bo18b3o39bo$
29bo38b2o6$24b2o6b2o$24b2o6b2o$b2o6b2o57b2o2b2o$obo6bobo54bo2bo2bo2bo$
2o8b2o14bo4bo14b2o2bo2bo2b2o8b3o4b3o$25bobo2bobo13bo3b4o3bo11b4o$3b2o
2b2o17bo4bo15b3o4b3o9b2obo2bob2o$3bo4bo18b4o19bo2bo13bo6bo$4b4o39b3o4b
3o10bo6bo$27b4o15bo3b4o3bo8b2obo2bob2o$4b4o18bo4bo14b2o2bo2bo2b2o11b4o
$3bo4bo16bobo2bobo33b3o4b3o$3b2o2b2o17bo4bo34bo2bo2bo2bo$68b2o2b2o$2o
8b2o$obo6bobo12b2o6b2o$b2o6b2o13b2o6b2o!
EDIT3: This symmetrical form of MikeP 1 could work... Although I have never seen it working except honeyfarm searches.

Code: Select all

#C [[ VIEWONLY ]]
x = 8, y = 8, rule = B3/S23
6bo$2b2obobo$o2bob2o$2o2bo$5b2o$6bo$4bo$4b2o!

Re: Q&A for ptbsearch

Posted: June 11th, 2015, 12:39 pm
by chris_c
Scorbie wrote:What do you think? Are some of them too big?
I don't know. In fact it's hard to say if this kind of thing will make searches faster or not. I profiled the code and the first thing to say is that 98% of the time is spent inside the placeNewPerturbor function.

What this function does is run the current pattern up to MAX_GEN and returns an array of triples (x, y, t) that says "when the perturbor is displaced by (x, y) the interaction begins at time t".

There seem to be two phases to this function. The first phase is just a dumb convolution between the catalyst and the existing pattern. By finding the first time that the catalyst gets within 2 cells of the existing pattern you get a lower bound on the interaction time. The second phase is a more detailed test of interaction and gets rid of things like a glider flying past the edge of a block without any interaction.

Profiling seems to suggest that both phases take around 50% of the time.

Doing a polymerisation should help with the convolution phase because I guess the time taken in this step should be roughly proportional to the size of the perimeter of the catalyst (but that is a completely untested hypothesis).

But in the interaction phase, ptbsearch generates the entire catalyst and everything within 2 cells and checks if there is any interaction. It seems like this would lead to quite a bit of unnecessary work in the case of big polymerised catalysts.

I'm not saying I know the answer for definite, but I reckon you should keep things simple until you are sure there is a benefit.
Scorbie wrote: And here's the catalyst list if you're interested:
Cool. Maybe you generated those with a script, but with my latest ptbsearch hacks it should be possible to use LifeHistory RLE to define catalysts. Also you could consider using "## Catalyst Description" to get a summary of the catalysts at the start of execution.

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 12:47 am
by Scorbie
chris_c wrote: Scorbie wrote:
What do you think? Are some of them too big?

I don't know. In fact it's hard to say if this kind of thing will make searches faster or not.
You are right. I perturbed a b-heptomino as a test. Most of the polymers slowed the search down, but there are some of them that increased the speed of the search. It was not because of polymerization itself, but because polymerization hinders not-expected-catalysis, such as the snakelike reaction of a (long) long hook with tail/gourmet catalyst/eater with hive or a tublike reaction of an eater2.
But I think that problem could be solved by attatching boats to the catalysts (as Sokwe did with the dual eater):

Code: Select all

x = 28, y = 12, rule = B3/S23
3bo10bo8bo$obobo6bobobo4bobobo$2o2bo6b2o2bo4b2o2bo$4b2o9b2o7bobo$11b2o
12bobo$12bo2b2o9b2o$12bobobo$13bo2$10bo$9b2o$9bobo!
I'm not too sure if the dimer or the boat-attatched catalyst is faster. I'll check later.
I don't think I'm going to check that soon, but here's a gliderproof version of the BTS that seems to be way faster than the original one: (The tetramer is slightly faster but some solutions are discarded due to steric hindrance.)

Code: Select all

#C [[ VIEWONLY ]]
x = 8, y = 7, rule = LifeHistory
4.2A$3.A.A$3.A$CA.5A$C.A4.A$2.A.3A$.2C.C!

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 4:14 am
by Scorbie
chris_c wrote:2. Better post-processing of results. It's tedious and error-prone to have to look through thousands of results by hand. I will have to have a look at how simsim has handled this kind of thing in CatGL/CatForce.
This is already supported by a post-processing perl script, namely uniq.pl. I think you already know that now.

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 5:37 am
by Scorbie
chris_c wrote:Cool. Maybe you generated those with a script, but with my latest ptbsearch hacks it should be possible to use LifeHistory RLE to define catalysts. Also you could consider using "## Catalyst Description" to get a summary of the catalysts at the start of execution.
Sorry for not trying that soon. I was using my minor code changes heavily before. I'm using the latest version now and it's way easier to make catalysts. But one thing that bugs me is that the default program for .rle extension is golly (obviously) so when I click it, I get to see wrecked catalysts in golly while I would like them to open like a text file. And as a really really minor personal preference I sometimes need a 'c' character in the input file... Besides these minor things everything else works so nice. Thanks.

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 6:32 am
by chris_c
Scorbie wrote:I'm using the latest version now and it's way easier to make catalysts. But one thing that bugs me is that the default program for .rle extension is golly (obviously) so when I click it, I get to see wrecked catalysts in golly while I would like them to open like a text file.
I don't understand why you would want the "rle" file to open in a text editor. The check for "rle" extension is only done on the input pattern. It's probably better to leave the catalyst definition with extension ".list". For example, for the semi-snark:

semisnark.rle:

Code: Select all

x = 11, y = 16, rule = LifeHistory
2A$2A5$2.C$.2C$.C.C5$9.C$8.2C$8.C.C!
semisnark.list:

Code: Select all

## Eater1
2.AC$.A.A$.A$2A!
A$3A$3.A$2.AC!

## Block
AC$AC!
CA$CA!

## Tub
.A$A.A$.A!
I think it's fine that semisnark.rle should open up in Golly.
Scorbie wrote:And as a really really minor personal preference I sometimes need a 'c' character in the input file... Besides these minor things everything else works so nice. Thanks.
What is the reference to the "c" character in the input file? You lost me there.

Glad to see you experimenting with the best form of the catalysts. When you decide what works best I will definitely add the results to the repo.

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 7:05 am
by Scorbie
chris_c wrote:I don't understand why you would want the "rle" file to open in a text editor. The check for "rle" extension is only done on the input pattern. It's probably better to leave the catalyst definition with extension ".list".
I first saved the catalyst file to something.list and that didn't work. Maybe I made a mistake in the process. Yeah, it shoudn't be a problem if only the input file has the rle extension.
chris_c wrote:Scorbie wrote:
And as a really really minor personal preference I sometimes need a 'c' character in the input file...

What is the reference to the "c" character in the input file? You lost me there.
Sorry about the ambiguity. I meant that sometimes I need more than two labels of cells.

For instance, I would like to add catalysts to this reaction:

Code: Select all

x = 14, y = 13, rule = B3/S23
11b2o$11b2o2$12bo$3bo7b2o$2bobo6bobo$2bo2bo$3b2o3$b2o$o2bo$b2o!
Maybe I want both results that do and don't restore the original block. (the don't part probably for further searches)
Then I would probably make this input file (three labels) and run the search:
test.in

Code: Select all

...........aa.
...........bb.
..............
............a.
...c.......aa.
..c.c......a.a
..c..c........
...cc.........
..............
..............
.cc...........
c..c..........
.cc...........

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 8:14 am
by chris_c
Scorbie wrote:I meant that sometimes I need more than two labels of cells.
Ah, I see. So at the moment we have State1 <-> "*", State3 ,<-> "a", State5 <-> "b".

Probably you would prefer if State1 <-> "a", State3 ,<-> "b", State5 <-> "c".

Hmmm... I don't think there are any downsides to this change are there?

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 8:31 am
by Scorbie
Ahh, I see what you mean.
Could we think a little more before changing it?
I am not sure what exactly * means in the input file.

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 8:44 am
by Scorbie
After (quite limited) testing, I learned that snakeish boat-bit interaction is THE most important rate determining factor. Any catalyst need not a polymerized form, but rather need a snake-free form in order for a speed up.

EDIT:
Finished a brief test. Here are the seemingly optimal catalysts:

Code: Select all

#C [[ THUMBNAIL VIEWONLY ]]
x = 49, y = 54, rule = LifeHistory
4.2C6.2C.A$3.A.A6.2C.3A17.AC4.CA3.AC$.3A.A.A10.A4.CA6.CA2.A5.C.A.A.C$
A4.2A.A3.2A.3A5.A7.C.A.A7.A.A$A.2A4.A4.A.A8.3A6.A.A.C5.A.A$.A.A.3A5.A
.A10.A6.A2.AC4.CA.AC$3.A.A8.A17.CA$3.2C2$27.2C8.2C8.2A$2.A.A10.A9.C2.
A8.C.A7.2C$2.2A.A6.A.A.A8.3A10.CA$5.A6.2A2.A5.A23.C$2.2A.2A9.2A4.6A8.
AC7.A.C$3.A8.2A13.A9.A8.A$3.A.2A6.A2.2A4.3A9.3A6.3A$4.A.A6.A.A.A3.A2.
C8.A8.A$14.A6.2C10.CA6.C.A$42.C$30.AC$2.C27.A.C$.A.A.A25.2C7.2C$A.2A.
3A32.2A$A7.A$.3A.2A.A$3.A.A.A$6.C2$17.2C13.A2.C.2C$16.C.C13.4A.A$16.A
6.C.2C10.A.A$.A2.C2.2A8.A3.3A.A6.2A3.2A.A$.4A3.A5.3A3.A4.A.A3.A.A6.A$
5.3A5.A6.A.2A.2A.A2.A.A.5A$.3A10.A6.A.A4.A3.A.A$A3.4A4.C.C8.A.3A6.A.
4A$2A2.C2.A4.2C8.2C.C7.2C.C2.A9$39.A2.C.C2.A$39.4A.4A$29.2C.2C9.A$16.
CA.AC8.C3.C7.A3.A$4.A.A.A8.A.A10.3A7.A.3A.A$2.3A.2A.A7.A.A21.A3.A$.A
7.A4.2C.A.A.2C7.3A10.A$.A.2A.3A4.C2.A3.A2.C5.C3.C5.4A.4A$2.A.A.A7.2A
5.2A6.2C.2C5.A2.C.C2.A!
The four on the bottom are the ones I'm not sure. I'm pretty sure the leftmost(Eater and hook with eater) is the optimal form, but not too sure about the other three.

Also, there are some catalysts that I couldn't test because there weren't working examples. I think one of these patterns are in the optimal form.

Code: Select all

#C [[ THUMBNAIL VIEWONLY ]]
x = 19, y = 15, rule = LifeHistory
4.2C$4.C.A5.2C$5.A.C4.C.A$6.2C5.2A4$6.C10.C$2.2A.C.C5.2A.C.C$A2.A.AC
4.A2.A.AC$2A2.A6.2A2.A$5.2A9.A.A$2A4.A4.2A4.2A$A.A.A6.2A$.2A.2A!
(MAJOR EDIT:) Except for these ones, the optimal forms can be viewed in here:
(EDIT: the canonical BTS dimer is not optimal, see the next post)
https://github.com/Scorbie/ptbsearch/bl ... /catalysts

EDIT2: Here are the catalyst files I use. scorbie.list are the collection of my favorite catalysts. xxxlite.list are the ones I thought to be appearing often, but I think it's based on my personal preference so you would probably add or remove some catalysts.

Re: Q&A for ptbsearch

Posted: June 12th, 2015, 8:37 pm
by Scorbie
(EDIT) The dimer forms are slightly faster than the monomer forms. The optimal ones seem to be these:

Code: Select all

#C [[ THUMBNAIL VIEWONLY ]]
x = 21, y = 9, rule = LifeHistory
12.A2.C.2C$12.4A.A$3.C.2C10.A.A$.3A.A6.2A3.2A.A$A4.A.A3.A.A6.A$A.2A.
2A.A2.A.A.5A$.A.A4.A3.A.A$3.A.3A6.A.4A$2.2C.C7.2C.C2.A!
Where the right one is the dimer of the canonical form (tablish thing on the right) and the left one is a slightly smaller variant. I have tested that the left one is considerably faster than other forms, but haven't tested the right one.

Here are the catalysts in list format. (I haven't checked and updated the canonical form.)

Code: Select all

#BTS variant (dimer)
2.2C.C$3.A.3A$.A.A4.A$A.2A.2A.A$A4.A.A$.3A.A$3.C.2C!
3.C.2C$.3A.A$A4.A.A$A.2A.2A.A$.A.A4.A$3.A.3A$2.2C.C!
3.2A$2.A2.A$C2.A.A$C3A.AC$$CA.3AC$.A.A2.C$.A2.A$2.2A!
2.2A$.A2.A$.A.A2.C$CA.3AC$$C3A.AC$C2.A.A$2.A2.A$3.2A!
#BTS canonical form (dimer)
.A2.C.2C$.4A.A$6.A.A$.2A3.2A.A$A.A6.A$A.A.5A$.A.A$3.A.4A$2.2C.C2.A!
2.2C.C2.A$3.A.4A$.A.A$A.2A3.2A$A6.A.A$.5A.A.A$6.A.A$.4A.A$.A2.C.2C!
4.2A$2A.A2.A$.A.A.A2.C$.A.A.3AC$CA.A$3.A3.AC$C2A4.A$C2.3A.A$2.A2.A.2A$3.2A!
3.2A$2.A2.A.2A$C2.A.A.A$C3A.A.A$5.A.AC$CA3.A$.A4.2AC$.A.3A2.C$2A.A2.A$4.2A!