Re: Script request thread
Posted: February 5th, 2017, 8:18 pm
I request a function that returns true if the soup has stabilized, let it be called stabilized.
Can't you just pull the necessary code from apgsearch?Saka wrote:I request a function that returns true if the soup has stabilized, let it be called stabilized.
I'm lazyBlinkerSpawn wrote:Can't you just pull the necessary code from apgsearch?Saka wrote:I request a function that returns true if the soup has stabilized, let it be called stabilized.
The latest version (2.9b1) runs them just fine.shouldsee wrote:Does golly not support B0 non-totalistic rule yet?
Golly 2.9b1 can run B0 isotropic non-totalistic rules, anyway. Anisotropic rules with B0 can be simulated only in LifeViewer at the moment, and it's a little tricky -- you have to use the MAP and MAPODD script commands, which accept a base64-encoded 512-bit string.BlinkerSpawn wrote:The latest version (2.9b1) runs them just fine.shouldsee wrote:Does golly not support B0 non-totalistic rule yet?
Code: Select all
B0 without S8 --
Even generations:
-- NOT (rule bitstring)
(zeroes the first bit)
Odd generations:
-- (reversed rule bitstring)
(puts the zero S8 bit into the first bit)
B0 with S8 --
All generations:
-- NOT (reversed rule bitstring)
Test conversion of random isotropic rule into 512-bit MAP/MAPODD format --
Original rule: B0124cik/S1c25
Rule for even generations: B34-cik5678/S01-c34678 =
00000001000101111010000110010111000101110111101110010111011111100001011101111111000101110111111001101111111111110111111011101001000101110111101110010111011111100111101111111111011111101110100101101111111111110111111011101001101111111111111111101001100101110001011101111101000101110111111001111111111111110111111011101001011110111101111101111110111010011101111101111111111010011001011101111101111101110111111011101001111111111111111111101001100101111111111111111111111010011001011111111111111111111001011101111111
Base64: ARehlxd7l34Xfxd+b/9+6Rd7l357/37pb/9+6b//6ZcXfRd+f/9+6Xvffunff+mXffd+6f//6Zf//+mX//+Xfw
Rule for odd generations: B367c/S4etk678 =
00000001000101100000000000000000000101100110100000000000000000000001011001101000000000000000000001101000100000010001000001000001000101100110100000000001000001000110100010000001000001000010000101101000100000010000000000000001100000010001011101000001000101110001011001101000000000000000001001101000100000010000000000001001011010001000000100000000001000011000000100010110001000010001011101101000100000010000000000001001100000010001011100000001000101111000000100010110001000010001011100010110011110100001011101111111
Base64: ARYAABZoAAAWaAAAaIEQQRZoAQRogQQhaIEAAYEXQRcWaAACaIEACWiBACGBFiEXaIEACYEXAReBFiEXFnoXfw
Even-generation rule bitstring with bits in opposite order, compared with odd-generations rule -- should be exact inverse:
11111110111010011111111111111111111010011001011111111111111111111110100110010111111111111111111110010111011111101110111110111110111010011001011111111110111110111001011101111110111110111101111010010111011111101111111111111110011111101110100010111110111010001110100110010111111111111111110110010111011111101111111111110110100101110111111011111111110111100111111011101001110111101110100010010111011111101111111111110110011111101110100011111110111010000111111011101001110111101110100011101001100001011110100010000000
00000001000101100000000000000000000101100110100000000000000000000001011001101000000000000000000001101000100000010001000001000001000101100110100000000001000001000110100010000001000001000010000101101000100000010000000000000001100000010001011101000001000101110001011001101000000000000000001001101000100000010000000000001001011010001000000100000000001000011000000100010110001000010001011101101000100000010000000000001001100000010001011100000001000101111000000100010110001000010001011100010110011110100001011101111111
... and it is.Code: Select all
x = 37, y = 13, rule = B0124cik/S1c25
9ob8o3b5o2b9o$4bo5bo9bo5bo5bo$4bo5bo8bo12bo$4bo5bo8bo12bo$4bo5bo8bo12b
o$4bo5bo9bo11bo$4bo5b5o6b4o7bo$4bo5bo14bo6bo$4bo5bo15bo5bo$4bo5bo15bo
5bo$4bo5bo15bo5bo$4bo5bo8bo5bo6bo$4bo5b8o2b5o7bo!Code: Select all
x = 37, y = 13
9ob8o3b5o2b9o$4bo5bo9bo5bo5bo$4bo5bo8bo12bo$4bo5bo8bo12bo$4bo5bo8bo12b
o$4bo5bo9bo11bo$4bo5b5o6b4o7bo$4bo5bo14bo6bo$4bo5bo15bo5bo$4bo5bo15bo
5bo$4bo5bo15bo5bo$4bo5bo8bo5bo6bo$4bo5b8o2b5o7bo!
#C [[ MAP ARehlxd7l34Xfxd+b/9+6Rd7l357/37pb/9+6b//6ZcXfRd+f/9+6Xvffunff+mXffd+6f//6Zf//+mX//+Xfw ]]
#C [[ MAPODD ARYAABZoAAAWaAAAaIEQQRZoAQRogQQhaIEAAYEXQRcWaAACaIEACWiBACGBFiEXaIEACYEXAReBFiEXFnoXfw ]]What exactly is meant by this?shouldsee wrote:Regarding the non-totalistic rules, I would also like a script exchange the diagonal/orthogonal property of a given rule
Say B2e have 2 edge cells, this should be mapped to B2c.BlinkerSpawn wrote:What exactly is meant by this?shouldsee wrote:Regarding the non-totalistic rules, I would also like a script exchange the diagonal/orthogonal property of a given rule
I wondered if the idea was to make an invariant transformation. But it's definitely not invariant. A simple example will prove that, with no need for a script:shouldsee wrote:Say B2e have 2 edge cells, this should be mapped to B2c.
Similarly B2c->B2e, B2i->B2n, B2n-> B2i, B2a->B2a, B2k->B2k. Namely you rotat e the neighborhood by 45 degrees and read off the new config.
At the first instance I thought the dynamics would be invariant under this transformation. Now I am not quite sure of that. A script might be the easiest way to test it.
Code: Select all
x = 1, y = 1, rule = B1e/S012345678
o!Code: Select all
x = 1, y = 1, rule = B1c/S012345678
o!The reason for such thought is that orthogonal spaceships often have diagonal similars in some other rules, and sometimes they are remarkably similar, thus making me wonder whether we can establish some kind of mapping. As it unrolls, switching edge and corner will definitely not do the job. I will try to compile some examples before any in-depth discussion.dvgrn wrote: [...]
If the dynamics were invariant under this transformation, then bishops in chess would be just as powerful as rooks. And I suppose chessboards would have to have eightfold rotational symmetry... it's kind of a mind-bending counterfactual, so I'm not entirely sure.
You can establish a correlation between diagonal and orthogonal, but over a square lattice you can only do it between the von Neumann neighborhood and its diagonal equivalent, i.e. making these exchanges:shouldsee wrote:The reason for such thought is that orthogonal spaceships often have diagonal similars in some other rules, and sometimes they are remarkably similar, thus making me wonder whether we can establish some kind of mapping. As it unrolls, switching edge and corner will definitely not do the job. I will try to compile some examples before any in-depth discussion.
Code: Select all
1c <-> 1e
2c <-> 2e
2n <-> 2i
3c <-> 3e
4c <-> 4eI think there's a way to (dis)prove this from what we already know about standard Life. If the dynamics were invariant under this translation, then I would think that when a glider is translated rotationally by 45°, it would behave the same as a normal glider except orthogonally. But this isn't so.shouldsee wrote:At the first instance I thought the dynamics would be invariant under this transformation. Now I am not quite sure of that. A script might be the easiest way to test it.
Code: Select all
x = 18, y = 11, rule = B38/S23
bo15bo$o14b2o$3o13b2o6$o2bo11bo$obo12bobo$bo12bobo!Code: Select all
x = 1, y = 1, rule = B1c2i/S01234-c5678
o!I think I prefer that with B78:Rhombic wrote:Code: Select all
x = 1, y = 1, rule = B1c2i/S01234-c5678 o!
Code: Select all
x = 1, y = 1, rule = B1c2i78/S01234-c5678
o!PLEASESaka wrote:I request a function that returns true if the soup has stabilized, let it be called stabilized.
Saka wrote:PLEASESaka wrote:I request a function that returns true if the soup has stabilized, let it be called stabilized.
I can't speak for anyone else, but this request isn't a very tempting one for me, as it stands. If the stabilise3() function in apgsearch 1.1 isn't exactly what is needed, then what is needed?Saka wrote:I'm lazyBlinkerSpawn wrote: Can't you just pull the necessary code from apgsearch?
Code: Select all
def stabilized():
return (time_to_stabilzation()==0)Code: Select all
golly.run(time_to_stabilization())Code: Select all
x = 7, y = 11, rule = B3/S23
6bo$6bo$5bo$5b2o$4bobo$3bo$3b2obo$2bobobo$bo3bo$b2ob3o$ob2o2bo!
Start a new Scripts thread and post your best attempt at writing it, and it's a sure thing that someone will be unable to resist helping you finish it.gameoflifemaniac wrote:I would like a Lua script that creates the Fibonacci fractal, the fractal made by stacking Fibonacci numbers in binary...
Code: Select all
x = 2, y = 3, rule = B3/S23
bo$2o$bo!
Yes, that's fairly simple as these things go. Does the glider rewinder script do what you need? Just run it N times, or add a getstring() call at the beginning and call the rewind function N times in a row.Ethanagor wrote:Is it possible to make a script which could take any given glider and calculate where it would have been (and in what phase) N generations ago?