User:GUYTU6J/Drafts
This is for more serious drafting work. If nothing here, I will put a notice for fun that says {{MediaWiki:Noarticletext-nopermission}}
Drafts for Tutorials/General technology
//Maybe it has been obsoleted by the official Game of Life textbook, so not sure if this part will be further developed in the future. But the rephasing and reorienting thing seems worth completing...
Extra piece of tips: rephasing and reorienting
So far we have done a lot of editing with oscillators and guns, and you may notice that every Gosper glider gun I have set up here is at the same phase. This way it could be intuitive for a novice and also efficient in terms of number of live cells, but may not meet the demands of professionals and the Optimization Game™. What is the objective in an Optimization Game™? Professionals are obsessed with minimizing the bounding box of a certain construction (e.g. a gun for the glider gun collection) at the cost of increasing population as well as other complexity. Admittedly, devices taking up less space are favourable when they are used in larger patterns, so let's look into practical techniques of moving an oscillating thing while keeping correct timing with respect to other components.
We will start from this 90-degree reflector:
Before adjusting, the input glider is better moved a bit farther from the reflector. Periodicity of the reflector require a minimum delay of 30 ticks, which is not a multiple of 4, the glider's period. The smallest multiple of 4 above 30 is 32, and as distance = time × speed, we find the spatial offset correponding to 32 ticks to be 32 × (1,1)c/4 = (8,8). So select the glider and run the script at Scripts/Lua/shift.lua that will give a dialog named "Shift selection". (Alternatively the keyboard combination shift+S can be used.) Since the glider comes from northwest, the parameters sending it back should be both negative, that is to say the input of the script is -8,-8 in this case. After shifting there is an extra 2 ticks to advance, which can be done by hand easily.
Next, we need to turn to LifeHistory and check the reaction envelope. Run toHistory.lua under the same folder (or keyboard combination alt+H) and run the same pattern by, say, 120 ticks, and then the envelope will be shown in blue:
Now it is clear when viewing diagonally that, for the top gun, its block on the left will be the limiting factor of adjustment. Try applying shift.lua and shifting the block along the direction of gliders from the top gun; we found that it can move (-7,7) at most (shown in red) without blocking the input lane. Can we move the rest of said gun directly? Nope, that will break the device (try yourself). We have to do some simple calculation about its rephasing.
- From the perspective of a glider, it takes (7,7)/((1,1)c/4) = 7 × 4 = 28 ticks to cover the distance, but after shrinking the distance dissapears;
- To compensate for that, the glider gun has to be delayed by 28 ticks;
- Since the Gosper glider gun operates at period 30, delaying by 28 ticks is equivalent to advancing by 30 - 28 = 2 ticks. Advancing a pattern in time is more convenient than delaying it, because you can set up a key combination for advancing a selected region.
Reverting the edits and going back to normal Life by using toStandard.lua (or keyboard combination alt+J), it is time to copy the glider gun to a new layer and advance it there.
...
Drafts for Tutorials/Glider_syntheses#spark-search-Python3.py_-_finding_cheaper_substitutes_for_sparks
//IIRC someone once suggested splitting the tutorials, so before that happens or is rejected this piece will remain here. Say you would like to synthesize a C2-symmetric p8 oscillator by using the following clean reaction extracted from one of the soups:
The beehive and gliders are easy, but the two regions that hit beehive looks complex, and indeed trying synthesise-patt.py on it gives no results. Then the job will be presented to spark-search.py, for which the necessary python script and collision database files needs to be put in a folder. Start a new Golly window, switch to LifeHistory and prepare the following pattern:
As the primitive reaction is rotationally symmetric, it suffices to consider one half, and it is put on the left with the beehive in state 1 and the unknown region to be replaced in state 3. 40 cells to the right is the pattern evolved by 3 ticks, with cells expected to be ON in state 1 and OFF in state 2, and other stray cells removed. Now run the script and enter some parameters in the dialogs:
- Direction - use S so that the reaction approaches straight down from above. Note that the only other option is SE, meaning that the input pattern should be prepared with the specific orientations.
- Delay - use 3 because the evolution takes 3 ticks as specified in the pattern above.
- "Cell increase at penultimate step" - use the default 1 is enough; for all the technical details see original post.
- Horizontal offset between before/after - use the default 40 as specified in the pattern above.
- Final population - use the default -1 to ignore this and get the maximum number of results.
- Gencols filename - use the default "3g". This should be one of the collision database files without the .col suffix. Here "3g" contains collisions involving two SE gliders meeting one SW glider; for other options see original post.
- Symmetry - use x, which means that when testing, the input reactions is examined not only in the original orientation but also flipped in the x direction. As usual, for other options see original post.
Kick off the script, and wait patiently as it goes through the collisions; this will take about five minutes. The results are layed out horizontally like this:
Each column corresponds to a candidate result, where the first subpattern shows the 3-glider collision, the second how the reaction approaches the beehive, and the third the outcome of interaction 3 ticks later. Most of them are dirty as we did not care about final population, but fortunately there is a clean one, the ninth from right. Combining two of it with the beehive and sending in the remaining gliders...
Ta-Da! The elegant synthesis has been completed in a total of 2+8=10 gliders.
The target is a 16-bit still life using the following reaction from one of the soups.
x = 12, y = 13, rule = B3/S23 3b2o$o3bo$o3b2o$o5b2o$b2o2$10b2o$5bo3bobo$4b3o3bo$3b2obo$3b3o$4bobo$5b 2o!
The region from below has some synthesise-patt.py and octohash.py results, but they interfere with the boat.
x = 67, y = 18, rule = B3/S23 bo$2bo42b2o$3o42bo3b2o$43bobo3b2o$43b2o2$42bo$42b2o$41bobo$61bo$18bo 41bobo$16b2o42bo2bo$17b2o42b2o3bo$66bo$62bo3bo$16b3o43b2o$16bo44bobo$ 17bo!
... One of the popseq results is compatible with the boat.
x = 26, y = 31, rule = B3/S23 3bo$4bo$2b3o15$bo$b2o19b2o$obo18bobo$22bo2$3b3o$5bo$4bo6b2o$12b2o$11bo 6b3o$18bo4b3o$7b2o10bo3bo$6bobo15bo$8bo!
Drafts for a hypothetical Tutorials/gencols
Input:
gencols.exe -rule B3/S23 -pat jsp22.life jsp22.life -nph 22 -tc 2 23 -gen 23 -nosynch -del1 -del2 -filt g > cols.txt
Output: a cols.txt containing
#R S23/B3 ..................**!...................*................*!...................*.*.............***!....................**...**.......*.***!........................****......*..***!.......................***..*......****!........................***.*.......**...**!.........................***.............*.*!..........................*................*!...........................................**!!**!.*!.*.*.............***!..**...*........*...*!......*.**......*....*!.....*....*......**.*!......*...*........*...**!.......***.............*.*!.........................*!.........................**! .**!**!..*! 5 (4,-1,-1) ..................**!...................*!...................*.*.............***!....................**...*........*...*!........................*.**......*....*!.......................*....*......**.*!........................*...*........*...**!.........................***.............*.*!...........................................*!...........................................**!!**!.*................*!.*.*.............***!..**...**.......*.***!......****......*..***!.....***..*......****!......***.*.......**...**!.......***.............*.*!........*................*!.........................**! *!.**!**! 5 (4,1,1) ..................**!...................*.......*!...................*.*..............**!....................**............**..*!........................***.......**.**!........................**.**.......***!........................*..**............**!.........................**..............*.*!...................................*.......*!...........................................**!!**!.*!.*.*.............***!..**...*........*...*!......*.**......*....*!.....*....*......**.*!......*...*........*...**!.......***.............*.*!.........................*!.........................**! ..*!*.*!.**! 5 (4,1,1) ..................**!...................*!...................*.*.............***!....................**...*........*...*!........................*.**......*....*!.......................*....*......**.*!........................*...*........*...**!.........................***.............*.*!...........................................*!...........................................**!!**!.*.......*!.*.*..............**!..**............**..*!......***.......**.**!......**.**.......***!......*..**............**!.......**..............*.*!.................*.......*!.........................**! **!*.*!*! 5 (4,-1,-1)
Input:
gencols.exe -rule B3/S23 -pat jsp22.life jsp22.life -nph 22 -tc 2 23 -gen 23 -nosynch -del1 -del2 -filt g | makematrix.exe -space 60 > jsp22pairs.txt
Output: a jsp22pairs.txt containing
#R S23/B3 #P 0 0 ..................**. ...................*................*. ...................*.*.............***. ....................**...**.......*.***. ........................****......*..***. .......................***..*......****. ........................***.*.......**...**. .........................***.............*.*. ..........................*................*. ...........................................**. . **. .*. .*.*.............***. ..**...*........*...*. ......*.**......*....*. .....*....*......**.*. ......*...*........*...**. .......***.............*.*. .........................*. .........................**. #P 60 0 ..................**. ...................*. ...................*.*.............***. ....................**...*........*...*. ........................*.**......*....*. .......................*....*......**.*. ........................*...*........*...**. .........................***.............*.*. ...........................................*. ...........................................**. . **. .*................*. .*.*.............***. ..**...**.......*.***. ......****......*..***. .....***..*......****. ......***.*.......**...**. .......***.............*.*. ........*................*. .........................**. #P 120 0 ..................**. ...................*.......*. ...................*.*..............**. ....................**............**..*. ........................***.......**.**. ........................**.**.......***. ........................*..**............**. .........................**..............*.*. ...................................*.......*. ...........................................**. . **. .*. .*.*.............***. ..**...*........*...*. ......*.**......*....*. .....*....*......**.*. ......*...*........*...**. .......***.............*.*. .........................*. .........................**. #P 180 0 ..................**. ...................*. ...................*.*.............***. ....................**...*........*...*. ........................*.**......*....*. .......................*....*......**.*. ........................*...*........*...**. .........................***.............*.*. ...........................................*. ...........................................**. . **. .*.......*. .*.*..............**. ..**............**..*. ......***.......**.**. ......**.**.......***. ......*..**............**. .......**..............*.*. .................*.......*. .........................**.
Add #Life1.05 at the top and change file extension to .lif before pasting into Golly