Re: Hacking apgsearch
Posted: June 23rd, 2016, 9:14 am
I like asking stupid questions:
Could you mod apgsearch 3.x?
Could you mod apgsearch 3.x?
In theory, I think so. In practice, I don't know enough of the low-level and hardware-specific tricks used in 3.x to do that, and it doesn't even compile using any compiler I can figure out how to get on my old Mac. It would just be far easier for me to write something completely from scratch. Anyone that knows how, though, please feel free to make a mod of 3.x (assuming it's actually possible and there's not some stupid hang-up I'm missing).muzik wrote:Could you mod apgsearch 3.x?
I thought semitotalistoc rules are supported by 3.x, no? I **think** that it is possible by merely tweaking rule2asm.py..muzik wrote:I like asking stupid questions:
Could you mod apgsearch 3.x?
not that I know how to do that.Scorbie wrote:I thought semitotalistoc rules are supported by 3.x, no? I **think** that it is possible by merely tweaking rule2asm.py..muzik wrote:I like asking stupid questions:
Could you mod apgsearch 3.x?
They aren't; apparently the boolean circuit corresponding to some rules ended up containing too many gates or something (I don't really understand this part especially well), so it was decided against. Tweaking rule2asm.py might be possible, but I don't know asm, so I'm not the one to test it, especially on my particular old computer. There may also be some other sections of the script (I would guess at least pseudo-object separation) that require knowledge of the particular rule, so those would take more work to mod.Scorbie wrote:I thought semitotalistoc rules are supported by 3.x, no? I **think** that it is possible by merely tweaking rule2asm.py..
Wrong thread? I think this one's really for apgsearch 1.x, not apg(mera|nano). That said: patch here.drc wrote:Can anybody have apgmera print every new object that appears
I had generated the rule, in particular it was generated by apgsearch-isotropic-v0.2.py while testing the rule. However, I specified the rule as "B2e3/S23-j" to both programs, not "B2e3_S23-j" as you say is required. This works fine in my script and I'd forgotten that the other script requires the exact name of an existing rule file. When I use the '_' the correct rule is processed but like @drc, soup search is very slow (~3 soups/s, increasing to ~7 soups/s if I reduce the sqrtspp_optimal value to 6.A for awesome wrote:Did either of you generate the rule table before searching the rule? This is a drawback of 0.21i: it does not autogenerate the rule table for you; you have to use isotropic-rulegen.py to make the rule and enter it using an underscore, not a slash. I'll try to improve this when I get back from vacation in three weeks, or sooner if I can.wildmyron wrote:I think you meant to post this on the Hacking apgsearch thread, but in any case something is going wrong with the rule parsing. When I tried a search with apgsearch-2016-2-06-v0.54+0.21i-update.py it was actually trying to search B23/S23 - doomed to failure. Searching works fine when I used my version of non-totalistic apgsearch (apgsearch-isotropic-v0.2.py) The search runs as expected. (No upload capability though.) I have no idea what's going wrong there.drc wrote:It's having a hard time searching B2e3/S23-j, an extremely stable rule. What's going on (and I said heyyeyaaeyaaaeyaeyaa)
Btw, that's a nice rule, lots of variety in the natural spaceships.
Code: Select all
# Phase I of stabilisation detection, designed to weed out patterns
# that stabilise into a cluster of low-period oscillators within
# about 6000 generations.
if (self.naivestab2(12, 10)):
return 4;
if (self.naivestab(16, 30, 200)):
return 4;
if (self.naivestab(32, 30, 200)):
return 5;Code: Select all
x = 3, y = 7, rule = B34et_S23-a4eit6
b2o$2bo$b2o2$3o$2bo$b2o!
A random stab in the dark: what are your memory limits in Golly (in File->Preferences->Control)? Might be that you're running out of memory and the OOM killer is kicking in.drc wrote:Whenever I try to search rules (i.e. B34et/S23-a4eit6) in the neighbourhood of CommonRepl, it always messes with my computer. It'll be going smoothly, then it will hit a pattern like this:
Then my ram explodes and chrome (playing youtube videos in the background) crashes. I don't know why this is.Code: Select all
x = 3, y = 7, rule = B34et_S23-a4eit6 b2o$2bo$b2o2$3o$2bo$b2o!
Is it just me, or are those tiny Knightships? Anyways, your computer may just be having trouble with infinite growth.drc wrote:Whenever I try to search rules (i.e. B34et/S23-a4eit6) in the neighbourhood of CommonRepl, it always messes with my computer. It'll be going smoothly, then it will hit a pattern like this:
Then my ram explodes and chrome (playing youtube videos in the background) crashes. I don't know why this is.Code: Select all
x = 3, y = 7, rule = B34et_S23-a4eit6 b2o$2bo$b2o2$3o$2bo$b2o!
Code: Select all
x = 16, y = 16, rule = B34et/S23-a4eit6
obbbbbobboooobob$
oobbobobbbobobbo$
boooobbbobboobob$
bbooboobbbbobobo$
obbooboboboobbbb$
bbbboobbbboboboo$
obbooobbobboobbo$
boooooboobbooobo$
bbbbobbooboooobb$
ooooobbbbbbooobo$
boobooobooboobbb$
boboobbbbbobobbo$
oobbbobbbbobbbbo$
obooobbbooooobob$
boobbbbboobobobo$
bobbbbboboooooob!
I have 4 GB... oh well, it can run most things just fine.Apple Bottom wrote:16 and 17 GB
It gets better; apgsearch hit a soup where two of these patterns interact, and Golly's currently using about 21.5 GB of memory. (That's actually more than I have in this machine, but so far everything's still running fine. Fingers crossed.)drc wrote:I have 4 GB... oh well, it can run most things just fine.
Code: Select all
x = 16, y = 16, rule = B34et/S23-a4eit6
booobobbbbooboob$
bbbooboobobbobob$
bboobboboobobboo$
oobooboobbooboob$
oooooobboobbbbbo$
bbbobooooboobobb$
bobobobobboooooo$
ooboobbooboooobb$
bbbobobbbbobbbob$
ooobobobbobboooo$
oboooboobobooooo$
ooboobobboobobbo$
bobbooobbobbobbb$
obobobbbboboobob$
obbboboobooobbob$
oooobbobbbbbbbbo!
Good question! I'm honestly not sure.muzik wrote:..how do you run non totalistic rules in HashLife?
I don't know, but I doubt it's terribly difficult to fix. Try it, and if it doesn't work, just go through the source code -- you can skip the long dictionary of object names and scores -- and add the linemuzik wrote:Does this still work with 2.8?
Code: Select all
g.setalgo("RuleLoader")Code: Select all
g.setrule(Code: Select all
g.setalgo("RuleLoader")
g.setrule(Start by modifying the hashsoup function to generate soups with the desired "symmetry" For 32x32 you will need more random bits than SHA256 gives you. SHA512 gives you double, but you still need more. You can do this by calculating multiple hash values from slightly modified versions of the input string, e.g:Saka wrote:I'm trying to add size symmetries for APG 1. They are L (32x32), S (8x8), and 1D (1 x 20). How do I do this?
Code: Select all
def hashsoup(instring, sym):
s = hashlib.sha512(instring+'a').digest() + hashlib.sha512(instring+'b').digest()
...
I answered it already: I just want to try this as my first "real" hacking attemptwildmyron wrote: you still haven't answered the question: Why?
Well, in that case: Carry on!Saka wrote:I answered it already: I just want to try this as my first "real" hacking attemptwildmyron wrote: you still haven't answered the question: Why?
On that note, SHA512 would yield enough for 20x20 soups -- might be interesting to investigate those since that's what Nathaniel's census used.wildmyron wrote:Start by modifying the hashsoup function to generate soups with the desired "symmetry" For 32x32 you will need more random bits than SHA256 gives you. SHA512 gives you double, but you still need more.