## Muzik fails at WLS and gfind

For scripts to aid with computation or simulation in cellular automata.

### Muzik fails at WLS and gfind

Previously, on the c/10 spaceship thread:

dvgrn wrote:
muzik wrote:How exactly do I go about finding new spaceships (specifically, ones of new speeds) of my own? I know I've asked this three times...

Yeah, and I'm sorry I ignored the last two questions. Was hoping that someone else would answer, since I've never actually tried to compile and run gfind myself.

It's probably better to try for new spaceship speeds with gfind rather than any of the lifesrc flavors. On the other hand, gfind is a breadth-first search and is reported to take an hour to find the copperhead, while zdr says that a basic depth-first search algorithm found it in 19 seconds.

@zdr, a little more detail would be really useful here, to see if there's an obvious-with-hindsight flaw in the way everyone has been doing this kind of speculative search. I take it your search was constrained to a very narrow width and mirror-symmetry, to make a period-10 search space feasible? What other constraints are built in to your "basic dfs"?

Anyway, @muzik, in the absence of specifics from zdr, the place to start is probably... EDIT: gfind 4.9 -- link is in in my next message below.

Compiling C code tends to be impressively frustrating if you're not familiar with it. It's not actually all that difficult, but you might need to invest some hours in learning basic terminology. Otherwise you're likely to end up with a bad case of Blank Mind Syndrome -- but not the good kind of blank mind where you've reached enlightenment and are at peace with the universe. It's more like if you suddenly find yourself on stage, with a large audience waiting for you to give a 14-minute TED talk on Sumerian agricultural practices.

Maybe you'll have to download a C compiler, maybe you have one on your computer already -- it depends on your platform and operating system, so I won't try to go into the details here.

After you do your best on your own, with lots of help from Google, then your best bet might be to start a new thread called something like "Compiling gfind".

Write up the steps you took to try to get gfind to compile and run, in incredibly specific detail. You know, your OS version, which C compiler you're running, where you downloaded it from, what folder you put the gfind.v46.c file in -- everything that anyone would need to do everything that you did, exactly the same. Then quote the exact error message that is stopping you.

At that point probably someone with the same OS won't be able to resist helping you get to past the problem.

When you're done, the thread you will have made could be a really useful resource for other people trying to do the same thing.

muzik wrote:Looks like I don't know anything about anything at this point. How, exactly, do I use wls?

Some stuff goes from left to right when I start the search, and then it recedes back eventually and gives no results. I'm hopeless.

SO after pressing the submit button dvgrn posted, might as well respond here as well: Yes, I have zero knowledge of C. I've only learned the basics of HTML and Python so far, which probably will not help at all. I'll try and see if I can "teach myself" C, but life kind of doesn't work like that.

My computer is windows 10 (bought as windows 8 ), bought in December 2013, and has ~1TB of memory, so will it have a compiler?

And of course, if I ever get round to bothering with it, I will definitely try and post my experiences with gfind - it'll most likely be extremely helpful since I'm 14, autistic, lack knowledge of programming (at least right now) and am probably one of the most apathetic beings who has stolen oxygen from the general public.

dvgrn wrote:
muzik wrote:Looks like I don't know anything about anything at this point. How, exactly, do I use wls?

Some stuff goes from left to right when I start the search, and then it recedes back eventually and gives no results. I'm hopeless.

No, actually that's just what happens to everybody on their first WLS search.

The problem is that it's very easy to set up a search problem with too many unknown cells, and then search with a cell ordering that makes it unlikely that a solution will be found. WLS theoretically does an exhaustive search, but if you start on the left side of a big blank area and work toward the right, that often has the effect of making WLS go through trillions of left-edge combinations that don't work before it finds the first configuration that happens to work with... whatever it might eventually find in the middle.

It's much better to come up with a likely candidate for the middle, first. That constrains what the edge can look like, so that WLS can quickly throw away a lot more unworkable options and get to a solution quicker. There are settings in WLS for symmetry, and also for where to start the search and how to expand from there (diamond shaped, circular, etc.)

If you have trillions of useless combinations of edge cells to wade through, all of them theoretically potentially workable, WLS will never get amywhere. "Trillions" is probably an underestimate in many cases, especially at high periods. In practice you have to constrain the search space, probably until there are _no_ solutions, and then gradually widen it out until you find one solution, or just a few.

To bring the topic vaguely back toward the subject of this thread: it would be interesting to see if WLS can be set up to find a copperhead spaceship. Make an area that's about 12x16 by 10 ticks; fill in around the edges in every generation with a double layer of OFF cells; put a block in at T=0 (and maybe a few nearby generations); set up WLS so that generation 0 follows generation 9 at a 1-cell offset -- there's a setting for that, so make sure to go and find it.

Before you do that, maybe search for something easy like an HWSS first, or even a glider -- if you just leave WLS a *WSS or glider-sized area, it should be able to find a solution pretty much instantly, to give you some confidence that you know how to set all the settings correctly.

muzik wrote:My computer is windows 10 (bought as windows 8 ), bought in December 2013, and has ~1TB of memory, so will it have a compiler?

No, Windows is uniquely lousy about having any kind of useful programming language pre-installed. A good place to start might be to download Cygwin, though that opens a new can of worms for you by kind of pretending to be Linux, so there are some new conventions that are subtly different if you're used to working from a DOS command prompt.

If you don't know anything about DOS command prompts either, though, then maybe Cygwin is a good place for a fresh start! I _think_, even though you have a 64-bit system, you'll probably be happier with the 32-bit version of Cygwin, in terms of getting simple old C code like gfind to compile. EDIT: Or if you take Apple Bottom's advice, below, get the 64-bit version of cygwin and then make sure you use the latest gfind source code (updated to work with 64-bit compilers a few years ago).

Another likely option is the free version of Microsoft's Visual Studio, which has a C/C++ compiler included, and gives you a "Visual Studio Command Prompt" shortcut to start from. Not sure I can recommend that option in good conscience, though, so I'm not including a link...!

Again, any further experimentation or questions along code-compiling lines should probably go in a separate thread (new or existing), so that people who are interested in the copperhead specifically can talk about that here.

muzik wrote:WLS is acting differently now. Instead of racing to the right and back, it's slowly going back and forth.

How do I try to search for patterns of different sizes?

Just moving and continuing this conversation in a more relevant board.

Right now I'm just leaving my computer overnight to see if I can somehow rediscover the copperhead.

One thing: once, I could get WLS to search for a diagonal 3x3 spaceship (obviously the glider), but now I can't. Why is this?
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik

Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Muzik fails at WLS and gfind

I don't know why you can't find the glider; something in the settings.

To find the glider, I open wls, change the height and width to 4 each, change the period to 4, and change the translation to -1 cells right and -1 cells down. Then, start the search and the glider will pop out instantly.

The reason you have to have height and width at 4 (or more) and not 3 is that while one generation fits in a 3x3 box, all four together do not.

You can also use glide reflect to find the glider too. Set the period to 2, the translation to -1 cell right and 0 cells down and flip backwards diagonal. Run the search and the glider will appear.

In general I recommend trying to find some known low period ships to gain familiarity with the program as well as what strategies work best to find different things. Keep in mind that some known objects will take quite some time to find again. If you go searching for the weekender, it may take wls all weekend.

When searching for spaceships, it's helpful to set "Force an On cell in column" to the same as the horizontal offset of what you're searching for (for the copperhead that's 1). I also uncheck the impact checking. I don't know if others have had more luck with this either way.
-Josh Ball.

velcrorex

Posts: 339
Joined: November 1st, 2009, 1:33 pm

### Re: Muzik fails at WLS and gfind

velcrorex wrote:I don't know why you can't find the glider; something in the settings.

To find the glider, I open wls, change the height and width to 4 each

OH, that's what I was doing wrong.

Funny thing is that the first time I did it I had a 3x3 width/height instead, and rather than getting the pattern it brought up a dialog box saying it found 2 things (which I can only assume to be the J and Y phases of the glider).

I tried to search for a LWSS using something similar to your method, but then the dreaded "has stopped working" dialog box of hell popped up D:
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik

Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Muzik fails at WLS and gfind

muzik wrote:Trying to find the ship with wls now. 6x12 bounding box, translating downwards by 1 cell, and searching for period 10.

6x12 is going to be way too small -- the copperhead has a 13x10 phase, and it's safer to add another row so that it doesn't overflow the search area as it moves.

Really it's okay to add permanent-OFF cells all the way around something like a 15x12 bounding box. One thing you can try is to put in a complete copperhead in one frame, and make sure that WLS can fill in the other nine frames without running into any errors.

Then you progressively replace ON and OFF cells with unknown cells, until WLS starts taking longer to fill the unknown cells back in again. Eventually you might work your way back to all unknown cells, with a boundary of OFF cells, and then see how long the full search takes -- or subtract or add a frame and see if there's a c/9 or c/11 blockhauler of a similar size.

(Don't get your hopes up too much there, though. Searching by analogy doesn't seem to work very often in practice...!)

dvgrn
Moderator

Posts: 5698
Joined: May 17th, 2009, 11:00 pm

### Re: Muzik fails at WLS and gfind

velcrorex wrote:You can also use glide reflect to find the glider too. Set the period to 2, the translation to -1 cell right and 0 cells down and flip backwards diagonal. Run the search and the glider will appear.

As an aside, how would one do this in JLS? I have tried almost the exact same thing in JLS (except period 3) to try to find c/6 diagonal ships, but it always, even when I set only one cell, reports "0 solutions found" quite quickly. According to what you're saying, it's not a bug in the algorithm itself; either there's something obvious I'm missing, or JLS has a program-specific bug.
x₁=ηx
V ⃰_η=c²√(Λη)
K=(Λu²)/2
Pₐ=1−1/(∫^∞_t₀(p(t)ˡ⁽ᵗ⁾)dt)

$$x_1=\eta x$$
$$V^*_\eta=c^2\sqrt{\Lambda\eta}$$
$$K=\frac{\Lambda u^2}2$$
$$P_a=1-\frac1{\int^\infty_{t_0}p(t)^{l(t)}dt}$$

http://conwaylife.com/wiki/A_for_all

Aidan F. Pierce

A for awesome

Posts: 1816
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

### Re: Muzik fails at WLS and gfind

Depending on where you are setting your cells, you may be limiting the possibilities quite severely. I suspect JLS is working correctly. Make sure you can find the glider, then set the period to 3. If you're quickly getting no results, try widening the search area, and setting on cells further back from the tip of the leading edge of the search.

If anyone can think of a small c/6 glide reflect ship in a different lifelike rule, you could try configuring to search for that to make sure you have things set up correctly.

EDIT: Scratch most of the above. I can't even find the glider with this setup in JLS. Anyone have more experience with JLS?
-Josh Ball.

velcrorex

Posts: 339
Joined: November 1st, 2009, 1:33 pm

### Re: Muzik fails at WLS and gfind

Okay, ill-timed ban aside, I can now successfully find the weighted spaceships using these specifications: period 4, translates 2 cells to the right, and a bounding box larger than the ships. Can't remember anything else way too specific I did.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik

Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Muzik fails at WLS and gfind

muzik wrote:
Sokwe wrote:
Linicks wrote:can you show the recipe using gfind on how to get this?

The ship can be found by running gfind with the following parameters.

I'm running a similar search using WLS, see if anything pops up overnight

Left this search on, nothing significant since.

It's proceeding really damn slowly
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik

Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland