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

Golly 2.7 is now available

For general discussion about Conway's Game of Life.

Re: Golly 2.7 is now available

Postby Andrew » May 28th, 2015, 8:14 pm

Scorbie wrote:Anyway, reporting a bug that I have ignored and have not noticed: When I try to run a script, the top most script is run before the script I clicked.

We managed to fix that bug so please download the latest 64-bit build for Windows from SourceForge (see link in my 1st post).

Note to other users: Only the 64-bit Windows build changed, so if you downloaded a different build from my website then there's no need to get it again from SourceForge.
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby Scorbie » May 29th, 2015, 5:38 am

Thanks, Andrew for fixing the small bug! I guess it was a problem related to uninstalled perl, right?
Best wishes to you, Scorbie
User avatar
Scorbie
 
Posts: 1322
Joined: December 7th, 2013, 1:05 am

Re: Golly 2.7 is now available

Postby Andrew » May 29th, 2015, 7:37 pm

No, nothing to do with Perl (the same bug could also happen if 2 subfolders inside Patterns were open and you clicked on a pattern file). It was due to some ugly wxMSW-specific code that I was able to remove.
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby gmc_nxtman » May 31st, 2015, 10:54 am

Hi Andrew, (again). There's a small thing that isn't critical or anything, it just bugs me a lot when testing large patterns on metacells of some sort or other environments. When testing a CA with 3+ states, zooming out causes the entire pattern to seemingly take on one state. It's just a small graphics thing, not too important, but it is annoying.
User avatar
gmc_nxtman
 
Posts: 1043
Joined: May 26th, 2015, 7:20 pm

Re: Golly 2.7 is now available

Postby Andrew » June 1st, 2015, 9:51 pm

gmc_nxtman wrote:When testing a CA with 3+ states, zooming out causes the entire pattern to seemingly take on one state.

Nothing "seeemingly" about it -- that's exactly what Golly does (and quite deliberately). We have discussed the possibility of doing some sort of color averaging when zoomed out, but it would have to be optional because it's likely to cause a significant slow down in the rendering speed. Probably the best way to do this would be to let users specify a small integer n (less than 10?) such that color averaging is only done at scales between 2^n:1 and 2^1:1. Note that at 2^10:1 each pixel represents about a million cells, so it would be quite slow to calculate an average color for a pixel covering a large, dense, multi-state pattern. But it would be a nice option to have, so maybe in 3.0!
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby gmc_nxtman » June 1st, 2015, 11:03 pm

Thanks for replying. I understand that it might be difficult for large zooms, but maybe there could be some sort of option if Golly > Preferences similar to the grid lines option, where you can select where it automatically stops the color averaging after zooming out too far. To rephrase, Golly would automatically stop performing color average calculations after zooming out a certain amount (the amount would be changable in Golly > Preferences).

Just an idea. ~gmc
User avatar
gmc_nxtman
 
Posts: 1043
Joined: May 26th, 2015, 7:20 pm

Re: Golly 2.7 is now available

Postby gmc_nxtman » June 1st, 2015, 11:23 pm

I really need to stop now.. just one more post for tonight. I think the color averaging can be done with a sort of "fractal method": (it's really weird, bear with me here) where, when running the HashLife algorithm, Golly would divide the components into 2x2 blocks, confirm their averages, and then confirm the averages of 4x4 blocks, etc... This way, it would only have to perform several succesive equations that only get easier as they go on; instead of performing one very large, time-taking calculation over billions or trillions of cells. This would probably be in the HashLife preferences, as "Enable fractal color averaging calculations" as a check box or something.

Just another abstract idea. ~gmc
User avatar
gmc_nxtman
 
Posts: 1043
Joined: May 26th, 2015, 7:20 pm

Re: Golly 2.7 is now available

Postby simsim314 » June 2nd, 2015, 3:19 am

Andrew wrote:Note that at 2^10:1 each pixel represents about a million cells, so it would be quite slow to calculate an average color


In this resolution I think people don't care about exact average. Maybe some sort of random sampling to define more or less reasonable color would suffice (say most popular). Random sampling, can work fast and be pretty exact for very low sampling rate (say 10 samplings for 10 colors and 1 dominant is pretty exact).
User avatar
simsim314
 
Posts: 1516
Joined: February 10th, 2014, 1:27 pm

Re: Golly 2.7 is now available

Postby calcyman » June 2nd, 2015, 5:37 am

Maybe some sort of random sampling to define more or less reasonable color would suffice (say most popular). Random sampling, can work fast and be pretty exact for very low sampling rate


In other words, a Monte Carlo method?

How would you compute a uniform random distribution over the live* cells in a particular node**? I mean, a non-uniform method is to look at the four child nodes, choose a nonzero one randomly, and continue recursively -- but that would weight a distant block and a huge universal computer equally.

* otherwise, if you zoom out by several orders of magnitude, the pattern will become invisible since each pixel would contain a density of less than 1/k, where k is the number of samples you're taking, and therefore have an expected colour of zero.

** a node represents a 2^N by 2^N axis-aligned square of cells, where N may be sufficiently large that you don't want this to take exponential time in the value of N.

I think the color averaging can be done with a sort of "fractal method": (it's really weird, bear with me here)


I wrote a C++ program about five years ago which takes a .mc file and produces an exquisitely-coloured image according to precisely the method you describe. The brightness of a pixel is logarithmic in the density of the corresponding node.

I suggested integrating it into Golly, but Tom Rokicki didn't like the idea of increasing the size of a hashlife node from 16 bytes to 19. The difference will be less noticeable in Golly64, increasing it from 32 bytes to 35.
What do you do with ill crystallographers? Take them to the mono-clinic!
User avatar
calcyman
 
Posts: 1332
Joined: June 1st, 2009, 4:32 pm

Re: Golly 2.7 is now available

Postby simsim314 » June 2nd, 2015, 6:00 am

calcyman wrote:How would you compute a uniform random distribution over the live* cells in a particular node**? I mean, a non-uniform method is to look at the four child nodes, choose a nonzero one randomly, and continue recursively


Yes definitely + you don't need to go too deep.

The point is very simple - assuming we have some dominant state in some area (like state 2 in LifeHistory), the user would like to see it when zooming out. If there is nothing dominant in the area, one can use the current state 1 color as well.

There is no point in averaging or some sort of advance color calculations - the user doesn't care about this. Just to see the basic color distribution in "low resolution", by dominant color.
User avatar
simsim314
 
Posts: 1516
Joined: February 10th, 2014, 1:27 pm

Re: Golly 2.7 is now available

Postby gmc_nxtman » June 2nd, 2015, 10:35 am

I think these are great ideas, but remember the original environment: metacells. Performing random calculations might not be the best method. I realized a problem in the original method: The pattern has to have a bounding box of 2^n • 2^n in order to perform the calculations. My solution to the problem goes like this: If the pattern has a bounding box of 2n + 1 • 2n + 1, or 2n • 2n + 1, in this case we'll just use odd by odd, it simply subtracts 1 from the bounding box of the pattern, divides the rest into 2x2 blocks, and performs the average calculations for the 2x2 blocks, and for the previously subtracted area. This process repeats.
User avatar
gmc_nxtman
 
Posts: 1043
Joined: May 26th, 2015, 7:20 pm

Re: Golly 2.7 is now available

Postby Andrew » June 2nd, 2015, 8:09 pm

calcyman wrote:I wrote a C++ program about five years ago which takes a .mc file and produces an exquisitely-coloured image according to precisely the method you describe.

Can you send me the code? Maybe we can integrate it into Golly somehow, or it might be useful as a separate app.
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby gmc_nxtman » July 18th, 2015, 7:34 pm

Another suggestion: Custom neighborhoods. Additions to neighborhoods have always been wanted, but I think there should be some "root neighborhoods directory" similar to the root rules directory where one can store .nh files as neighborhood data. The format would probably be best as this:

@NEIGHBORHOOD Margolus
@PHASES

#Phase 1
o.
..

#Phase 2

..
.o


When putting a neighborhood into any table file it would search in this directory for neighborhoods. Just a suggestion.

Also I really wish there was a "flip diagonally" button.

x = 8, y = 3, rule = B3/S23
o$o4bo$2o3b3o!
User avatar
gmc_nxtman
 
Posts: 1043
Joined: May 26th, 2015, 7:20 pm

Re: Golly 2.7 is now available

Postby dvgrn » July 18th, 2015, 10:21 pm

gmc_nxtman wrote:Also I really wish there was a "flip diagonally" button.

You can pretty easily make a "flip diagonally" keyboard shortcut, anyway, if you want such a thing. Just use File > Preferences > Keyboard to assign the key combinations of your choice to run scripts like this one:

flipdiagNWcorner.py:
import golly as g

r = g.getselrect()
if r == []: g.exit("No selection.")

clist = g.getcells(r)
if clist == []: g.exit("Nothing in selection.")

g.putcells(clist,0,0,1,0,0,1,"not")
norm = g.transform(clist,-r[0],-r[1])
flipped = g.transform(norm,0,0,0,1,1,0)
g.putcells(flipped, r[0], r[1])
g.select([r[0],r[1],r[3],r[2]])

It doesn't seem to me that this set of functions is general-use enough to need dedicated toolbar buttons available for everyone. For non-square selections you'd need some way to specify which of the four corners is the invariant one for the flip. I usually just use combinations of the rotation and vertical/horizontal flip keyboard shortcuts ( <, >, X, Y ) to get whatever diagonal flip I need.

Still, if you find the above to be useful, you can modify it to make three more scripts that hold the SW, SE, and NE corners invariant. Or did you have some other idea for how a diagonal flip would work?
dvgrn
Moderator
 
Posts: 3936
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly 2.7 is now available

Postby flipper77 » August 15th, 2015, 9:12 am

I'm using the 64-bit version of Golly 2.7b2 for Windows 7, and when I select a script, Golly decides to run the script at the very top of the visible part of the script window first, and once it stops after some event like canceling it manually or conditions aren't met, the script I originally wanted to run finally gets to run.
User avatar
flipper77
 
Posts: 197
Joined: October 24th, 2010, 3:25 am
Location: Spokane, WA

Re: Golly 2.7 is now available

Postby dvgrn » August 15th, 2015, 9:28 am

flipper77 wrote:I'm using the 64-bit version of Golly 2.7b2 for Windows 7, and when I select a script, Golly decides to run the script at the very top of the visible part of the script window first, and once it stops after some event like canceling it manually or conditions aren't met, the script I originally wanted to run finally gets to run.

This problem came up back in May, and as far as anyone knows it was resolved by the final 2.7 release build. The "b2" in the version name means it's a beta. In general if you run into a bug like this, it's worth checking to see if it still happens in the latest version.
dvgrn
Moderator
 
Posts: 3936
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly 2.7 is now available

Postby Kazyan » November 4th, 2015, 1:07 am

On my Ubuntu 14.04 system, Golly will occasionally segfault and quit after a key press. The program stalls for a split-second before quitting. It usually happens after Ctrl+Z, but I don't know if it's exclusively that shortcut; I haven't been keeping track.

I've tried reinstalling, which did not fix the problem. This is a 64-bit system, using the 64-bit version of Golly 2.7.
Tanner Jacobi
User avatar
Kazyan
 
Posts: 685
Joined: February 6th, 2014, 11:02 pm

Re: Golly 2.7 is now available

Postby Andrew » November 4th, 2015, 9:12 am

Kazyan wrote:On my Ubuntu 14.04 system, Golly will occasionally segfault and quit after a key press.

I recently found (and fixed) a seg fault that was 100% reproducible by typing any keys in the Prefs > Keyboard dialog. Is that where you are getting your seg fault? If so then you'll have to avoid setting keyboard shortcuts that way and instead do it by editing your GollyPrefs file (after quitting Golly).

If your seg faults are not occurring in Prefs > Keyboard then please try to isolate when they occur and let me know. A useful tip on Linux is to run Golly in the debugger by typing "gdb ./golly", then when you get the gdb prompt type "run". If and when you see a seg fault, go to the gdb prompt and type "bt" to generate a backtrace and post it here or email it to me. That should provide enough info for me to fix the bug.
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby Scorbie » November 4th, 2015, 9:34 am

Andrew wrote: A useful tip on Linux is to run Golly in the debugger
Just became curious: Did you compile Golly with debugging options on?
Best wishes to you, Scorbie
User avatar
Scorbie
 
Posts: 1322
Joined: December 7th, 2013, 1:05 am

Re: Golly 2.7 is now available

Postby Andrew » November 4th, 2015, 3:27 pm

Scorbie wrote:Did you compile Golly with debugging options on?

No, at least not what wxWidgets calls a debug build, but there seems to be enough symbol info in the executable to produce a useful backtrace.
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby Kazyan » November 4th, 2015, 6:31 pm

Just got a segfault; here's the backtrace:

#0  0x000000000f97f210 in ?? ()
#1  0x00000000004cd96f in ?? ()
#2  0x000000000043bf75 in ?? ()
#3  0x00000000004682a1 in ?? ()
#4  0x0000000000657cc3 in ?? ()
#5  0x0000000000657e34 in ?? ()
#6  0x0000000000658157 in ?? ()
#7  0x0000000000657c00 in ?? ()
#8  0x00000000005ec34d in ?? ()
#9  0x00000000005564b9 in ?? ()
#10 0x0000000000500d45 in ?? ()
#11 0x00007ffff6b6dce5 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff6b6e048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff6b6e30a in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff78c9447 in gtk_main ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x00000000005bbce2 in ?? ()
#16 0x000000000055628a in ?? ()
#17 0x0000000000615784 in ?? ()
#18 0x000000000041d432 in ?? ()
#19 0x00007ffff57e8ec5 in __libc_start_main (main=0x41d420, argc=1,
---Type <return> to continue, or q <return> to quit---
    argv=0x7fffffffdfe8, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffdfd8) at libc-start.c:287
#20 0x0000000000435191 in ?? ()
#21 0x00007fffffffdfd8 in ?? ()
#22 0x000000000000001c in ?? ()
#23 0x0000000000000001 in ?? ()
#24 0x00007fffffffe345 in ?? ()
#25 0x0000000000000000 in ?? ()


This one occurred when I pressed Ctrl+Z while a pattern was evolving, which would have reset it back to the original RLE at gen 0. The file was a CatForce result file of an in-progress search, so it may have been overwritten while the pattern was evolving, or was still being overwritten when I pressed Ctrl+Z.
Tanner Jacobi
User avatar
Kazyan
 
Posts: 685
Joined: February 6th, 2014, 11:02 pm

Re: Golly 2.7 is now available

Postby Andrew » November 5th, 2015, 6:10 pm

Kazyan wrote:Just got a segfault; here's the backtrace:

Hmm, not a lot of symbols in that backtrace! The Linux binaries on sourceforge were built by another Golly developer using configure tools that must have stripped out all the symbol info. A pity!

This one occurred when I pressed Ctrl+Z while a pattern was evolving, which would have reset it back to the original RLE at gen 0. The file was a CatForce result file of an in-progress search, so it may have been overwritten while the pattern was evolving, or was still being overwritten when I pressed Ctrl+Z.

Ouch. Not surprised to hear that things go horribly wrong if the starting pattern is being changed after Golly starts generating, although it would obviously be a lot nicer if we could avoid a segfault. I could send you my Linux version of Golly but that would only be a 32-bit build, so probably not what you want.

Would you be willing to build Golly from source? It's not that hard on Linux -- just download the src tarball from sf and follow the instructions in docs/Build.html (using makefile-gtk to build Golly so that symbol info isn't stripped).
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby Scorbie » November 10th, 2015, 2:34 am

Got two questions about the current Golly program.

1) How does the python and perl scripting work? I tried to look at the source but couldn't find anything related to scripts there.
What I am hoping to do (not too seriously, actually.) Is to use a standalone python golly script that can work independently from Golly. Is it possible to extract only the "golly module" as in "import golly as g"? (I know that's not how it works. Expecting a dll or shared library of some sort.)

2) Where does Golly for android store custom rules and downloaded patterns? If I move the download an rle.gz file there, could golly use that?
Best wishes to you, Scorbie
User avatar
Scorbie
 
Posts: 1322
Joined: December 7th, 2013, 1:05 am

Re: Golly 2.7 is now available

Postby Andrew » November 10th, 2015, 7:14 am

Scorbie wrote:1) How does the python and perl scripting work? I tried to look at the source but couldn't find anything related to scripts there.

The bulk of the script-related code is in these files in the gui-wx directory:

wxscript.cpp/h -- high-level stuff
wxperl.cpp/h -- Perl specific stuff
wxpython.cpp/h -- Python specific stuff (the InitPython routine is a good place to start looking)

What I am hoping to do (not too seriously, actually.) Is to use a standalone python golly script that can work independently from Golly. Is it possible to extract only the "golly module" as in "import golly as g"?

No, I don't see any way of doing that.

2) Where does Golly for android store custom rules and downloaded patterns? If I move the download an rle.gz file there, could golly use that?

If external storage is present (ie. an SD card) then your rules, saved patterns, and downloaded patterns are stored in these locations:

/mnt/sdcard/Android/data/net.sf.golly/files/Rules/
/mnt/sdcard/Android/data/net.sf.golly/files/Saved/
/mnt/sdcard/Android/data/net.sf.golly/files/Downloads/

Are you saying you want to access these directories without using Golly? I don't know much about Android, but I'm guessing there are tools that allow you to do such things.
User avatar
Andrew
Moderator
 
Posts: 629
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly 2.7 is now available

Postby Scorbie » November 10th, 2015, 8:00 am

Andrew wrote:
I wrote:1) How does the python and perl scripting work? I tried to look at the source but couldn't find anything related to scripts there.
The bulk of the script-related code is in these files in the gui-wx directory:
wxscript.cpp/h -- high-level stuff
wxperl.cpp/h -- Perl specific stuff
wxpython.cpp/h -- Python specific stuff (the InitPython routine is a good place to start looking)
I wrote:What I am hoping to do (not too seriously, actually.) Is to use a standalone python golly script that can work independently from Golly. Is it possible to extract only the "golly module" as in "import golly as g"?

No, I don't see any way of doing that.
Hehe I only skimmed through wxpython.cpp and my mind got full of ????????s. Hopefully I wasn't too serious about that idea.
I probably won't do it, but just in case, there comes this question in mind. If I read it right, Golly uses a script by calling Python from the C program. If I write a Python library (with similar features) that calls the gollybase C code, would writing Python scripts with that library be substantially slower than running Python scripts in Golly?
Andrew wrote:Are you saying you want to access these directories without using Golly?
In a way, yes. I simply want to let Golly open the "rle.gz" files downloaded from conwaylife. Well it's a fairly simple task, but I can't see a way to do that inside Golly. (I should have said this earlier.)
Andrew wrote:I don't know much about Android, but I'm guessing there are tools that allow you to do such things.
I hope you are not referring to the "file manager" :wink: I think the task is simple and uncommon enough to do manually.
Best wishes to you, Scorbie
User avatar
Scorbie
 
Posts: 1322
Joined: December 7th, 2013, 1:05 am

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests