JavaLifeSearch (JLS)

For scripts to aid with computation or simulation in cellular automata.
User avatar
Aleph
Moderator
Posts: 2313
Joined: February 18th, 2021, 11:18 am

Re: JavaLifeSearch (JLS)

Post by Aleph »

This is just the contents of the repl I used to make the code that made the code that I used to patch JLS back in 2022 or so. More for archival purposes than anything else; it's likely going to appear to be little more than spaghetti code with documentation even worse than JLS's own code. :skull:
https://drive.google.com/file/d/1k5rl08 ... sp=sharing
User avatar
Scorbie
Posts: 1728
Joined: December 7th, 2013, 1:05 am

Re: JavaLifeSearch (JLS)

Post by Scorbie »

Here's a program similar to the one I used to find the p4 strictly volatile oscillator. (Credits to DroneBetter for the suggestion)
I'm not 100% sure if it works perfectly or is the same as what I used in the search, but a few simple searches seems to indicate that it's working okay.

To Use:
  • Run the jar file as usual
  • Press Ctrl-T.
  • There should be an additional pane called "Hacks". Go to "Hacks".
  • Check the "Strictly Volatile p4 filter" checkbox.
  • Search as you would do with normal JLS.
Mostly for wwei: here's the strictvolp4.java I used for the patchkit. Sharing the source in case there might be an error.

Code: Select all

{"classname":"StrictVol4"}
/////SNIP POINT
{"dxyg":[[0,0,0],[0,0,1],[0,0,2],[0,0,3]]}
/////SNIP POINT
{"filtername":"strictvol4"}
/////SNIP POINT
{"filterlabel":"Strictly Volatile P4 filter"}
/////SNIP POINT
public static int size=4;
/////SNIP POINT
public static boolean invalid(int state){
  if(state == 2 * 27 + 2 * 9 + 2 * 3 + 2){
    return true;
  }
  if(state == 2 * 27 + 0 * 9 + 2 * 3 + 0){
    return true;
  }
  if(state == 0 * 27 + 2 * 9 + 0 * 3 + 2){
    return true;
  }
  return false;
};
/////SNIP POINT
public static boolean unbreakable(int state){
  if(state == 2 * 27 + 2 * 9 + 2 * 3 + 0){
    return true;
  }
  if(state == 2 * 27 + 2 * 9 + 0 * 3 + 2){
    return true;
  }
  if(state == 2 * 27 + 0 * 9 + 2 * 3 + 2){
    return true;
  }
  if(state == 0 * 27 + 2 * 9 + 2 * 3 + 2){
    return true;
  }

  if(state == 2 * 27 + 2 * 9 + 0 * 3 + 0){
    return true;
  }
  if(state == 2 * 27 + 0 * 9 + 0 * 3 + 2){
    return true;
  }
  if(state == 0 * 27 + 0 * 9 + 2 * 3 + 2){
    return true;
  }
  if(state == 0 * 27 + 2 * 9 + 2 * 3 + 0){
    return true;
  }

  if(state == 0 * 27 + 0 * 9 + 0 * 3 + 2){
    return true;
  }
  if(state == 0 * 27 + 0 * 9 + 2 * 3 + 0){
    return true;
  }
  if(state == 0 * 27 + 2 * 9 + 0 * 3 + 0){
    return true;
  }
  if(state == 2 * 27 + 0 * 9 + 0 * 3 + 0){
    return true;
  }

  if(state == 0 * 27 + 0 * 9 + 0 * 3 + 0){
    return true;
  }
  return false;
};
/////SNIP POINT
public boolean propagate(){
  return true;
};
Edit: stupid me, I found a typo. Will fix and upload.
Edit2: typo fixed, testing...
Edit3: I'm 90% sure it's correct this time
Edit4: it can find all the components in the p4 strictly volatile oscillator
JavaLifeSearch.zip
(337.02 KiB) Downloaded 44 times
Sokwe
Moderator
Posts: 3398
Joined: July 9th, 2009, 2:44 pm

Re: JavaLifeSearch (JLS)

Post by Sokwe »

Here are JLS save files of 100x100 period-20 grids where the cells have been set OFF except along a diagonal strip of a specified width (up to 31):
jls-diagonal-setups.zip
(208.47 KiB) Downloaded 47 times
The reason I keep such a folder of JLS save files is that it can be a bit of a pain to set all of the OFF cells when setting up a diagonal search. Now, when I want to run a diagonal search at a particular width, I just load the relevant file and reduce the period and grid size as necessary.
-Matthias Merzenich
Post Reply