Q&A for ptbsearch

For scripts to aid with computation or simulation in cellular automata.
chris_c
Posts: 966
Joined: June 28th, 2014, 7:15 am

Re: Q&A for ptbsearch

Post by chris_c » January 4th, 2016, 9:29 am

Scorbie wrote: Ahh!!!! I think I made a mistake! A blank line is ignored (without incrementing y pos)by ptbsearch, right?.
I've never looked at that part of the code in detail, but yes, it does look like blank lines are completely ignored and do not translate into an empty row of cells in the input pattern. Instead I guess you need to put a single "." or something like that.

User avatar
Scorbie
Posts: 1693
Joined: December 7th, 2013, 1:05 am

Re: Q&A for ptbsearch

Post by Scorbie » January 4th, 2016, 11:03 am

Glad to find out the problem. After the thing is stable I'll post my ptbsearch-symm config and settings.

User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Re: Q&A for ptbsearch

Post by Saka » January 9th, 2016, 9:56 am

This IS the ptbsearch Q&A, so...
How do I compile and use ptbsearch? Do I compile each .c? What are the .h files for? How do I use it? Thanks!

User avatar
Scorbie
Posts: 1693
Joined: December 7th, 2013, 1:05 am

Re: Q&A for ptbsearch

Post by Scorbie » January 9th, 2016, 6:58 pm

If you're on windows running make.bat (Or simply typing make on the command line of the ptbsearch directory) would suffice. (Makefiles don't work, dunno why and it was a long time ago.)
If you're on Linux/ OS X, just type make in the console.

Google something like "How to compile multiple files" "Makefile tutorial" etc. if you want to know what exactly you are doing.

And one tip: the rock branch is quite nice so you might want to try that.

EDIT: And how to use ptbsearch: viewtopic.php?p=23900#p23900

User avatar
Scorbie
Posts: 1693
Joined: December 7th, 2013, 1:05 am

Re: Q&A for ptbsearch

Post by Scorbie » January 10th, 2016, 6:42 am

Okay, narrowed down a mysterious bug in my script. @chris when does the survive take snapshots in your symmetry hack? The snapshots are same for different patterns, so when I run uniq, some useful patterns are filtered out.

chris_c
Posts: 966
Joined: June 28th, 2014, 7:15 am

Re: Q&A for ptbsearch

Post by chris_c » January 10th, 2016, 7:46 am

Scorbie wrote:Okay, narrowed down a mysterious bug in my script. @chris when does the survive take snapshots in your symmetry hack? The snapshots are same for different patterns, so when I run uniq, some useful patterns are filtered out.
The version of survive in the symmetry branch outputs the pattern if and only if it lasts for at least 400 generations without being permanently damaged or becoming P2.

EDIT: And to actually answer the question, the last snapshot will be the last moment that all the catalyst cells are alive. I think because of the line "if(fail>150) break;" the snapshot will always come from generation (400-150) = 250 or later.

User avatar
Scorbie
Posts: 1693
Joined: December 7th, 2013, 1:05 am

Re: Q&A for ptbsearch

Post by Scorbie » January 10th, 2016, 9:55 am

Thanks :) I actually made a mistake with my code, not yours... But your explanation helped me remember what parts of the code do and fix the bug. I think it's fixed now :)

User avatar
Scorbie
Posts: 1693
Joined: December 7th, 2013, 1:05 am

Re: Q&A for ptbsearch

Post by Scorbie » January 12th, 2016, 12:36 am

Is is just me, or does ptbsearch really misses some collisions?
presgr.in

Code: Select all

..........**............
.....**..*.*............
.....*...*..............
......***.****..........
........z.z..*..........
....***.z.z.............
...*..z.zz..............
...**...................
........................
...**...................
...*..*...bb............
....**z..b..b...........
.***......bb............
*...*........aa.........
.***.........a.a........
....**z......a..........
...*..*..........a......
...**..........a........
...................a....
.................a......
.....................a..
...................a....
.......................a
.....................a..
test.list

Code: Select all

.C$C.C$C.C$.C!
Running the following:

Code: Select all

./ptb2 presgr.in test.list 45 0 25 1
generates nothing, while I expected:

Code: Select all

x = 16, y = 26, rule = B3/S23
10b2o$5b2o2bobo$5bo3bo$6b3ob4o$8bobo2bo$4b3obobo$3bo2bob2o$3b2o2$3b2o$
3bo2bo3b2o$4b3o2bo2bo$b3o6b2o$o3bo8b2o$b3o9bobo$4b3o6bo$3bo2bo$3b2o5$
9bo$8bobo$8bobo$9bo!
I don't think there are other causes to this problem because when I try the same search with different (opaque, by the way) catalysts, they seem to output some results.

chris_c
Posts: 966
Joined: June 28th, 2014, 7:15 am

Re: Q&A for ptbsearch

Post by chris_c » January 12th, 2016, 6:24 am

Scorbie wrote:Is is just me, or does ptbsearch really misses some collisions?
I don't think the beehive is restored for long enough to qualify as a valid result.

Call to "restored" is here. Definition of "restored" is here.

Meaning that after the placement of the final catalyst we need all of the catalysts to be cleanly restored for at least 10 generations out of the next 50 to output the result.

It looks like the beehive in the reaction you give is only cleanly restored for 2 generations.

User avatar
Scorbie
Posts: 1693
Joined: December 7th, 2013, 1:05 am

Re: Q&A for ptbsearch

Post by Scorbie » January 12th, 2016, 6:50 am

Ahh, you're right... I remembered you saying that before... Sorry for the inconvenience.

Post Reply