ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Up-to-date conduit data for Hersrch

For scripts to aid with computation or simulation in cellular automata.

Up-to-date conduit data for Hersrch

Postby codeholic » October 5th, 2013, 3:38 pm

Does anyone maintain an up-to-date conduit library for Hersrch? The distribution is dated 2004, and I believe there are quite a few new conduits discovered since then.

P. S. And, by the way, has anyone managed to compile it under Linux?
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Up-to-date conduit data for Hersrch

Postby dvgrn » October 5th, 2013, 4:18 pm

codeholic wrote:Does anyone maintain an up-to-date conduit library for Hersrch? The distribution is dated 2004, and I believe there are quite a few new conduits discovered since then.

P. S. And, by the way, has anyone managed to compile it under Linux?

The Hersrch update thread has a link to a slightly modified version of Hersrch with a conduit library that's up-to-date as of the end of last year. Actually there are two libraries, one for regular searches and one for Spartan searches.

A new conduit or two may have sneakily appeared since then -- I've been too busy to pay proper attention lately.

I don't know of any really major Windows dependencies. It may not be an entirely trivial port -- there's a mysterious #include <Windows.h> line in PointSet.cpp, and I haven't tracked down exactly why that's needed. Hersrch is a nice old-fashioned console app, so it shouldn't be too much trouble to get it working in a reasonable operating system.
User avatar
dvgrn
Moderator
 
Posts: 5620
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Up-to-date conduit data for Hersrch

Postby Andrew » October 6th, 2013, 6:54 pm

I've managed to get Hersrch to compile and run on my Mac and Linux systems. Modified source files are here:

http://www.trevorrow.com/golly/Hersrch-Mac.zip

My source changes (about a dozen) are flagged by "AKT". The zip file also includes a Makefile and a hersrch executable (64-bit for Mac). I don't really know how to use Hersrch so haven't tested the executable other than seeing the usage message.
User avatar
Andrew
Moderator
 
Posts: 742
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Up-to-date conduit data for Hersrch

Postby dvgrn » October 6th, 2013, 7:58 pm

Andrew wrote:I've managed to get Hersrch to compile and run on my Mac and Linux systems. Modified source files are here:...

Looks good -- thanks! Now that Hersrch is finding its way onto more platforms, I'm a little more worried about the bug that someone, most likely I, added to Hersrch at some point. It's mentioned in the change log:

> crash... when running test.bat with F171 Bx222 Bx222 as impossible sequence

The crash doesn't happen with the original code, but it does with my very minimally modified version that prints out variable values and variant names. I'll take a look and see if I can make the crash go away, next time I'm feeling inspired.

Maybe now is a good time for me to think again about a GUI for Hersrch. Several times I've started writing a simple set of scripts that would allow you to select pieces of the current pattern and label them as start Herschel, end Herschel, or obstacle -- and describe the degrees of freedom somehow (I think this was where I got stuck).

Then the script would write out a Hersrch batch file automatically, run the search, and then display the resulting candidate tracks one after another, dropped into the correct location -- ideally discarding candidates that overlap the obstacles.

None of this is terribly difficult, really -- the biggest thing might be to adjust Hersrch to output LifeHistory patterns with the reaction envelopes included. But I might just write Python code to rebuild each track based on the string of variants reported for each candidate.

I guess one thing that's been stopping me on this project is the fact that I'd have had to apologize for having it only work on Windows... now I don't have that excuse any more!

Any thoughts on shipping Windows/Mac/Linux versions of this with Golly, and hopefully some other search utilities as well? It would be nice to have gencols, ptbsearch/catalyst, dr, etc. in working order, right along with Golly or as an optional package of some kind. Golly scripts could be used to make a decent GUI for several of these search programs.
User avatar
dvgrn
Moderator
 
Posts: 5620
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Up-to-date conduit data for Hersrch

Postby codeholic » October 7th, 2013, 3:53 pm

Thank you!
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Up-to-date conduit data for Hersrch

Postby Andrew » October 7th, 2013, 6:26 pm

dvgrn wrote:Any thoughts on shipping Windows/Mac/Linux versions of this with Golly, and hopefully some other search utilities as well?

Yep, I think it would be nice to have all the source code/docs/binaries for those tools in one place, and that might as well be the Golly repository. Probably best to move this discussion to the golly-test list so the other devs can have their say. And we'd obviously need to ask the various authors of those tools if they are happy with the idea.
User avatar
Andrew
Moderator
 
Posts: 742
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Up-to-date conduit data for Hersrch

Postby Kasuha » October 10th, 2013, 8:26 am

dvgrn wrote:The crash doesn't happen with the original code, but it does with my very minimally modified version that prints out variable values and variant names. I'll take a look and see if I can make the crash go away, next time I'm feeling inspired.

As far as I remember the crash was caused by the code trying to print out name of the conduit. Without modifications it just printed the name which was always available; with the modification it tried to print name of the variant with no variant selected (variants were irrelevant at that point) and crashed on null pointer reference or something like that.
Kasuha
 
Posts: 55
Joined: November 1st, 2012, 11:39 am

Re: Up-to-date conduit data for Hersrch

Postby MikeP » October 29th, 2013, 10:20 am

dvgrn wrote:Any thoughts on shipping Windows/Mac/Linux versions of this with Golly, and hopefully some other search utilities as well? It would be nice to have gencols, ptbsearch/catalyst, dr, etc. in working order, right along with Golly or as an optional package of some kind. Golly scripts could be used to make a decent GUI for several of these search programs.


I'd be interested in pursuing this. I've been thinking for a while about using Golly as a graphical interface for Bellman. Setting up the patterns and filters would be much easier in Golly than a text editor.

Also this might be just the prod that I need to get me to fix the remaining bugs, write it up properly, write tests for it etc!
MikeP
 
Posts: 81
Joined: February 7th, 2010, 9:51 am
Location: Cambridge, UK

Re: Up-to-date conduit data for Hersrch

Postby dvgrn » October 29th, 2013, 10:48 am

MikeP wrote:I'd be interested in pursuing this. I've been thinking for a while about using Golly as a graphical interface for Bellman. Setting up the patterns and filters would be much easier in Golly than a text editor.

Sounds great!

When I first started thinking about search-utility GUIs in Golly, it was always easy to put off the project because I could only use keyboard shortcuts -- there was no way to get a script to respond to mouse movements or clicks. But now I'm embarrassed to notice that it's been two years since Andrew quietly put in full mouse-event handling, and I still haven't done much of anything with the new feature.

The four new-since-Golly-2.3 scripts draw-lines.py, flood-fill.py, move-object.py and move-selection.py give some indication of what can be done now. But they only scratch the surface, I think.

Something I've been wishing for for a long time is a programmable toolbar in Golly, where you can associate each toolbar button with a script, and also write scripts that add buttons to the toolbar. That seems like the kind of thing that would be useful for hanging GUIs on search utilities -- you'd run Hersrch-tool.py to set up Golly to do Hersrch searches, and then the tools that go along with Hersrch are displayed: a button to mark the selection as the input Herschel, one to mark the output Herschel, one that allows the selection to be dragged diagonally to show the degrees of freedom available for the solution, etc., etc.

But now I'm wondering if something like this could be simulated using getevent(). Just define a corner of the viewport as a hotspot area, and display "buttons" there made out of Life cells.

-- Probably that's just an ugly kludge and an unnecessary distraction... but it's worth thinking about the possibilities. It would be good to come up with a somewhat standardized set of support scripts, that could be used as a GUI front end to collect information for any number of different search utilities -- Bellman, Hersrch, gencols, ptbsearch/catalyst, dr, and so on.
User avatar
dvgrn
Moderator
 
Posts: 5620
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI


Return to Scripts

Who is online

Users browsing this forum: No registered users and 3 guests