Squiggles

A forum where anything goes. Introduce yourselves to other members of the forums, discuss how your name evolves when written out in the Game of Life, or just tell us how you found it. This is the forum for "non-academic" content.
Post Reply
User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Squiggles

Post by pcallahan » February 7th, 2020, 10:06 pm

The idea is to start with tiles based on matching points like parentheses. The points along the bottom of each tile are connected with circular arcs. E.g., ()(()) would connect positions 0 and 1, 2 and 5, 3 and 4. When you place these tiles together, you may get one or more closed curves. Which ones pair up to form a simple closed curve without holes?

I think this is a versatile tile matching rule that is easy to check visually. That is, you can immediately see if the result is a simple closed curve without holes.
t.png
t.png (182.37 KiB) Viewed 5040 times
The Python script to create it using imagemagick.

Code: Select all

def parens(n):
  for res in parens_recur(n * 2, 0, []):
    yield res

def parens_recur(n, depth, sofar):
  if n == len(sofar):
    yield "".join(sofar)
  else:
    if len(sofar) + depth < n:
      sofar.append("(")
      for res in parens_recur(n, depth + 1, sofar):
        yield res
      sofar.pop()
    if depth > 0:
      sofar.append(")")
      for res in parens_recur(n, depth - 1, sofar):
        yield res
      sofar.pop()

def links(paren_string):
  stack = []
  for i in range(len(paren_string)):
    if paren_string[i] == '(':
      stack.append(i)
    else:
      yield (stack.pop(), i)

def perm(links):
  links = list(links)
  ix = [0] * len(links) * 2
  for i, j in links:
    ix[i], ix[j] = j, i
  return ix

def rotate(links):
  return [len(links) - i -1 for i in links[::-1]]

def loops(uplinks, downlinks):
  seen = [False for x in uplinks]
  loops = []
  for i in range(len(uplinks)):
    if not seen[i]:
      loop = []
      j = i
      while not seen[j]:
        seen[j] = True
        loop.append(j)
        j = uplinks[j]
        seen[j] = True
        loop.append(j)
        j = downlinks[j]
      loops.append(loop)
  return loops

def to_curve(loops, scale, x, y):
  yield "-fill black -stroke none -draw 'fill-rule evenodd translate %5.3f %5.3f path \"" % (x, y)
  for loop in loops:
    n = len(loop)
    yield 'M %5.3f 0' % (loop[0] * scale)
    for i in range(n):
      x1 = loop[i] * scale
      x2 = loop[(i + 1) % n] * scale
      sweep = ((0 if x1 > x2 else 1) + i) % 2
      radius = abs(x2 - x1) * 0.5
      yield 'A %5.3f %5.3f 0 0 %5.3f %5.3f 0' % (radius, radius, sweep, x2)
    yield ' Z'
  yield "\"'"

def to_upper(links, scale, x, y):
  edges = [i + (1 - (i % 2) * 2) for i in range(len(links))]
  yield "-fill black -stroke none -draw 'fill-rule evenodd translate %5.3f %5.3f path \"" % (x, y)
  for loop in loops(links, edges):
    n = len(loop)
    yield 'M %5.3f 0' % (loop[0] * scale)
    for i in range(n):
      x1 = loop[i] * scale
      x2 = loop[(i + 1) % n] * scale
      sweep = ((0 if x1 > x2 else 1) + i) % 2
      radius = abs(x2 - x1) * 0.5
      if i % 2 == 0:
        yield 'A %5.3f %5.3f 0 0 %5.3f %5.3f 0' % (radius, radius, sweep, x2)
      else:
        yield 'L %5.3f 0' % x2
    yield ' Z'
  yield "\"'"

n = 5
allix = [perm(links(s)) for s in parens(n)]

'''
for i in range(len(allix)):
  for j in range(len(allix)):
    print("*" if 1 == len(loops(allix[i], rotate(allix[j]))) else ".", end=' ')
  print()
  '''

def nextpos(x, y):
   x += 85
   if x > 1700:
     x = 50
     y += 90
   return x, y

x = 50
y = 100
lines = ["magick -size 1800x1800 canvas:none "]
for i in range(len(allix)):
  lines.extend(to_upper(allix[i], 7, x, y))
  lines.append("-fill none -stroke blue -draw 'translate %5.3f %5.3f rectangle %5.3f 0 %5.3f %5.3f'" %
               (x, y, -5, (2 * n - 1) * 8 + 5, -n * 8 - 5))
  x, y = nextpos(x, y)

x = 50
y += 90

for i in range(len(allix)):
  for j in range(len(allix)):
    path = loops(allix[i], rotate(allix[j]))
    if len(path) == 1:
      lines.extend(to_curve(path, 7, x, y))
      lines.append("-fill none -stroke blue -draw 'translate %5.3f %5.3f rectangle %5.3f 0 %5.3f %5.3f'" %
               (x, y, -5, (2 * n - 1) * 8 + 5, -n * 8 - 5))
      lines.append("-fill none -stroke blue -draw 'translate %5.3f %5.3f rectangle %5.3f 0 %5.3f %5.3f'" %
               (x, y, -5, (2 * n - 1) * 8 + 5, n * 8 - 5))
      x, y = nextpos(x, y)
  lines.append("-fill red -draw 'translate %5.3f %5.3f rectangle 20 -3 26 3'" % (x, y)) 
  x, y = nextpos(x, y)
lines.append("t.png")

print(" \\\n".join(lines))

User avatar
PkmnQ
Posts: 1137
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Re: Squiggles

Post by PkmnQ » February 8th, 2020, 12:43 am

Sure like tiling, don’t you. This actually looks pretty good, if I had these in real life I would start matching them together to see what they would look like.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » February 8th, 2020, 12:32 pm

PkmnQ wrote:
February 8th, 2020, 12:43 am
Sure like tiling, don’t you.
You noticed!
This actually looks pretty good, if I had these in real life I would start matching them together to see what they would look like.
Well, if you have a printer, these ones are sized for printing and cutting. I haven't done it myself with these, at least not recently.
all42.png
all42.png (152.49 KiB) Viewed 5005 times
I had an idea for these kinds of matching tiles a few years ago, unconnected to Life or universality. I was thinking that you could make a set of flash cards for matching things, e.g. words and definitions, or words in foreign languages. If you place two matching cards together, you get a "valid" pattern, e.g. connected without holes, or maybe some other easily checked rule, and if not, you get something that violates the rule. This has advantages over matching by color:
  • At a glance, it's harder to guess how two of these cards will line up, as compared to red matches red, or jigsaw nub matches dent.
  • Patterns can be chosen that are not transitive. A matches B, B matches C, but C does not match A.
I never made the flashcards, but the idea stuck. I had some Postscript code for this that I lost, and I realized I can do it with svg paths and generate pictures with imagemagick.

Each tile is based on matched parentheses. The above use 5 matched pairs for a total of 42. The number of ways to match parentheses grows with n according to the Catalan numbers 1, 2, 5, 14, 42, 132, ...

Here's a picture of all combinations for n=4. Note that the lower tiles are rotated 180 degrees (the way it would work in real life).
t.png
t.png (96.29 KiB) Viewed 4998 times
On the subject of universality, what if we had a rotatable tiles with a pattern like this along each of their 4 sides, and an easily stated rule for validity, such as "connected with exactly 2 holes" or "two connected components with a hole in exactly one of them." What is the smallest tile set we need to implement universal Wang tiles?

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » February 9th, 2020, 3:41 pm

Here's one I've only sketched out, but what if we connect corners instead of sides with non-crossing arcs. Then which corner placements result in single closed curves without holes. For this size, there are 14 possible corner tiles. And here are some examples of combining them.
Screen Shot 2020-02-09 at 11.36.35 AM.png
Screen Shot 2020-02-09 at 11.36.35 AM.png (191.57 KiB) Viewed 4965 times
The simplest analysis might be to treat pairs of corner curves as edge curves and then see how those combine.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » February 12th, 2020, 4:49 pm

I just realized that the simple connected "blobs" are actually spanning trees of the boundary nodes (a node is just the interval of black space on each boundary). This is true for the corner tiles above as well as the original tiles.

This explains some of the requirements for connectivity. If there are n nodes, there must be exactly n-1 edges that connect them. If there are fewer, you cannot connect all the nodes. If there are more, there must be a cycle somewhere (a hole in the blob). That is a necessary but not sufficient condition. You can have n-1 edges that make two disconnected blobs, one of which has a hole in it.

hkoenig
Posts: 258
Joined: June 20th, 2009, 11:40 am

Re: Squiggles

Post by hkoenig » February 12th, 2020, 9:08 pm

Interesting. Here's a not well thought out game idea--

Use two or three colors for the black blobs. If I calculate correctly, there would be 90 tiles with two colors, 300 with three, and 1400 with four. Then the object of a two person (or more?) game would be to build a complete four tile pattern, drawing tiles randomly and passing if unable to play. Winner is the player making the most completed patterns, or first to complete N patterns.

Second would be same sort of coloring with 3, but allow any matching edges, so patterns can grow. Players score the size of the closed blobs created.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » February 13th, 2020, 12:49 pm

hkoenig wrote:
February 12th, 2020, 9:08 pm
Interesting. Here's a not well thought out game idea--

Use two or three colors for the black blobs. If I calculate correctly, there would be 90 tiles with two colors, 300 with three, and 1400 with four. Then the object of a two person (or more?) game would be to build a complete four tile pattern, drawing tiles randomly and passing if unable to play. Winner is the player making the most completed patterns, or first to complete N patterns.

Second would be same sort of coloring with 3, but allow any matching edges, so patterns can grow. Players score the size of the closed blobs created.
It's worth a try. I like the idea of building card decks that score hands based on intrinsic properties instead of arbitrary rules. Aside from simply connected curves, you can make comparisons based on number of components and holes. You could work out the probabilities to make it similar to a standard card game. Alternatively, if you could play test it, you might arrive at some rules intuitively.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » February 16th, 2020, 1:53 pm

Simple connected blobs without holes can be applied to recognize still life neighborhoods in CGOL. This illustrates the idea at a schematic level, but you could just as easily use thicker lines to make blobs.

Use an approach like the petal tiles to collect neighbor counts, but instead of representing a live cell with a petal, represent it as the absence of one side of an octagon. Then, the number of connected components of octagon vertices is the same as the number of absent edges. I.e., remove an edge and you get a simple connected path, remove 2 and you get two connected paths, remove 3 and so forth. For example:
Screen Shot 2020-02-16 at 9.39.30 AM.png
Screen Shot 2020-02-16 at 9.39.30 AM.png (36.53 KiB) Viewed 4851 times
Visually, the absent edges aren't as easy to see as petals or dots, but only two additional tiles are needed to recognize them. A straight line for connecting 2 components, and a y for connecting 3 components. If the number of components is not 2 or 3, then you will get either a cycle, a disconnected component, or both.
Screen Shot 2020-02-16 at 9.43.02 AM.png
Screen Shot 2020-02-16 at 9.43.02 AM.png (146.13 KiB) Viewed 4851 times
This stretches the concept of a tiling, and I'm not sure it helps that much beyond counting dots, which is already about as easy as recognizing connected blobs. It's a little more magical (a disadvantage in analysis, but maybe a plus for a puzzle) and I wanted to take the idea to its conclusion.

That leaves open the question of recognizing dead cell neighborhoods of 0, 1, 2, 4, 5, and 6. There are some problems here, the first being that a 0 neighborhood already gives an octagon with a cycle. We could just declare that cycle valid by fiat but then why not just count dots. There are some alternatives, like requiring the internal tile to connect the octagon, or using a present edge to represent a live neighbor. Unfortunately, all of these require more tiles and I am not sure it's worth pursuing.

Update: For example, to recognize 2 present edges (as opposed to two absent edges) two different middle connectors are needed. (Top row) The leftmost 3 below use the same connector, rotated, but the rightmost requires a different one to avoid creating a loop with the adjacent edges. To recognize 4 present edges (bottom row), two different middle connectors also suffice, assuming the neighbors are grouped as in viewtopic.php?f=7&t=2188&start=100#p88361
Screen Shot 2020-02-16 at 3.26.06 PM.png
Screen Shot 2020-02-16 at 3.26.06 PM.png (149.43 KiB) Viewed 4828 times
Recognizing 5 or 6 present edges is the same as recognizing 3 or 2 absent edges respectively.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » July 18th, 2021, 1:33 pm

pcallahan wrote:
February 9th, 2020, 3:41 pm
Here's one I've only sketched out, but what if we connect corners instead of sides with non-crossing arcs. Then which corner placements result in single closed curves without holes. For this size, there are 14 possible corner tiles.
For fun* I made a simple scratch app to set up different placements. It is here: https://scratch.mit.edu/projects/554168153/ and looks like this.
Screen Shot 2021-07-18 at 10.25.57 AM.png
Screen Shot 2021-07-18 at 10.25.57 AM.png (98.06 KiB) Viewed 1890 times
I haven't tried to enumerate the combinations and classify by disconnected shapes or number of holes. I may do this and see if there's a Sloane sequence, unless anyone else happens to know.

Update: I looked up the number of curves created by matching two tiles (original topic) after counting them with a python script. These correspond to the Closed meandric numbers (or meanders): number of ways a loop can cross a road 2n times.: 1, 1, 2, 8, 42, 262, 1828 ... That is a good description. I wonder if there is anything similar defined for the four corner case.

Update 2: I don't know if I ever really noticed this before, though I got close in viewtopic.php?f=12&t=4300&p=133747&sid= ... de1#p89654 A necessary, though not sufficient condition for matching two tiles (or adding the 4th tile above) can be found by counting connected components.

For example, in the first set of tiles, the sum of components in each tile separately must add to 6. I haven't fully worked out a proof, but let's see. Instead of looking at these as blobs, consider each pair of adjacent positions on each tile to be a node, and match them using non-crossing edges to preserve the connectivity of the blobs. For a tile with n nodes split into a forest of m components, there must be n-m edges (so for instance, there must be 2 edges to have 3 components on the original set of tiles).Then, to get a single component with combined tiles, there must be n-1 edges total, so n-m_upper + n-m_lower = n-1, from which it follows that m_upper + m_lower = n+1.

As noted, this is necessary but not sufficient. There are a lot of combinations that don't work because they leave holes (cycles) and are disconnected as a result.

*As opposed to the rest of this very serious endeavor.

ColorfulGabrielsp138
Posts: 288
Joined: March 29th, 2021, 5:45 am

Re: Squiggles

Post by ColorfulGabrielsp138 » July 19th, 2021, 6:56 am

pcallahan wrote:
July 18th, 2021, 1:33 pm
-snip-
What is your username on Scratch?

Code: Select all

x = 21, y = 21, rule = LifeColorful
11.E$10.3E$10.E.2E$13.E4$2.2B$.2B$2B$.2B15.2D$19.2D$18.2D$17.2D4$7.C$
7.2C.C$8.3C$9.C!
I have reduced the glider cost of quadratic growth to eight and probably to seven. Looking for conduits...

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » July 19th, 2021, 9:44 am

ColorfulGabrielsp138 wrote:
July 19th, 2021, 6:56 am
pcallahan wrote:
July 18th, 2021, 1:33 pm
-snip-
What is your username on Scratch?
I created a new account TileDemo just for these.

ColorfulGabrielsp138
Posts: 288
Joined: March 29th, 2021, 5:45 am

Re: Squiggles

Post by ColorfulGabrielsp138 » July 20th, 2021, 8:34 am

pcallahan wrote:
July 19th, 2021, 9:44 am
ColorfulGabrielsp138 wrote:
July 19th, 2021, 6:56 am
pcallahan wrote:
July 18th, 2021, 1:33 pm
-snip-
What is your username on Scratch?
I created a new account TileDemo just for these.
Sorry, but I couldn't subscribe to your account due to Scratch being banned.
This user was a friend of mine but she couldn't subscribe to your account either for some other reasons.
Maybe you could comment on the studios that she joined.

Code: Select all

x = 21, y = 21, rule = LifeColorful
11.E$10.3E$10.E.2E$13.E4$2.2B$.2B$2B$.2B15.2D$19.2D$18.2D$17.2D4$7.C$
7.2C.C$8.3C$9.C!
I have reduced the glider cost of quadratic growth to eight and probably to seven. Looking for conduits...

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » July 20th, 2021, 10:00 am

ColorfulGabrielsp138 wrote:
July 20th, 2021, 8:34 am
Sorry, but I couldn't subscribe to your account due to Scratch being banned.
This user was a friend of mine but she couldn't subscribe to your account either for some other reasons.
Maybe you could comment on the studios that she joined.
You don't need to subscribe. It's just https://scratch.mit.edu/users/TileDemo/

It's a new scratch account with the two projects I posted. I really don't do much with scratch. Sorry it's inaccessible. Anyway, this is just a simple demo and not a game like your friend's.

I put the scratch file up on github if that's accessible. https://github.com/PaulBC/grid-sat-solv ... iggles.sb3 Maybe not worth the trouble though. This isn't of much interest in terms of scratch programming. It's just a quick way to demo placing 4 of these tiles.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » July 21st, 2021, 12:12 pm

Getting back to this after more than a year...
hkoenig wrote:
February 12th, 2020, 9:08 pm
Interesting. Here's a not well thought out game idea--

Use two or three colors for the black blobs. If I calculate correctly, there would be 90 tiles with two colors, 300 with three, and 1400 with four. Then the object of a two person (or more?) game would be to build a complete four tile pattern, drawing tiles randomly and passing if unable to play. Winner is the player making the most completed patterns, or first to complete N patterns.
I'm not sure how close this idea is, because I get 56 pieces after assigning 4 colors to tiles. I am not assigning them to separate blobs. My idea was to add something like suits in a card deck to bring the combinations to just a little more than a standard card deck (a time-tested size for game play). Also, having 4 colors makes it possible to use a different one for each 4-tile set.

This could be a fast-paced game without a lot of strategy based on pattern recognition. If you can form a closed curve using just one color, then there are no repeated tiles, making these ones more restricted. After that, using all four colors is worth something, and after that, just getting a simple closed curve counts, but for less. No other combinations have value (at least in this simple form). I spent way too much time with Inkscape yesterday turning this into jigsaw like pieces. Here are what valid combinations would look like:
Screen Shot 2021-07-21 at 9.14.29 AM.png
Screen Shot 2021-07-21 at 9.14.29 AM.png (412.56 KiB) Viewed 1798 times
All the tiles are illustrated in this Google drawing.
https://docs.google.com/drawings/d/1el4 ... sp=sharing

Since shared links are a problem in some regions of the world, here is an archive of 56 transparent PNGs.
pieces.tgz
(1.44 MiB) Downloaded 54 times
The file names are meaningless and assigned by Inkscape.

Update: This must be what hkoenig means about coloring the blobs. Out of 14 tiles, 1 has a single connected component, 6 have 2 components, 6 have 3 components, and 1 has 4 components. If you give each component a different color out of 2 choices (red and blue), you get 1*2 + 6*4 + 6*8 + 1*16 = 90. (I haven't gone up to higher numbers of colors).

So in this case the tiles must be matched by color. A solution can consist of a single simply connected blob of one color or two simply connected blobs, one of each color.

At least for the 4-component pieces there are colorings without any solutions. If you color the dots red-blue-red-blue or blue-red-blue-red, then any way of connecting like colors requires a crossing. I think the other pieces are OK, but I haven't checked.

So maybe a set of 88 tiles is ideal for a game. It makes the coloring part of the system rather than an extra tacked onto it. It should not be hard to make up those tiles with what I have in Inkscape already (it's the beziers that take so much time).

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » July 21st, 2021, 5:47 pm

hkoenig's idea is interesting, but I think it makes for a harder matching problem. Here are the kinds of solutions you get with two colors:
Screen Shot 2021-07-21 at 2.42.56 PM.png
Screen Shot 2021-07-21 at 2.42.56 PM.png (110.54 KiB) Viewed 1776 times
Here is a sheet of all 88 tiles (excluding the two that require crossing). I colored this by hand in Inkscape, but I think it's correct.
Screen Shot 2021-07-21 at 2.42.45 PM.png
Screen Shot 2021-07-21 at 2.42.45 PM.png (704.56 KiB) Viewed 1776 times
I can upload a set of transparent PNGs if anyone wants (but only if someone does).

One natural puzzle is whether it is possible to build 22 sets using each tile exactly once. I have not even tried.

Update: The answer is no (unless anyone sees a flaw in this reasoning). Each valid tile set is either one connected component of the same color or two connected components of different colors.

For reasons explained in a previous post, you can only get one connected component if the sum of the components of the individual tiles is 9. Then the tiles together supply 7 connecting edges between the 8 nodes (pairs of adjacent points) along the edge of the tiles. Similarly, you can only get two connected components if the sum of components of the individual tiles is 10 (supplying 6 connecting edges total). (The numeric condition is necessary but not sufficient.)

Thus, there cannot be 22 connected sets if the total of individual tile components exceeds 22*10=220. But let's do the accounting: There are 1 (tile) * 2 (colorings) * 1 (component) = 2 or two components among the tiles with 1 component, likewise 6*4*2=48 for tiles with 2 components, 6*8*3=144 for tiles with 3 components, and 1*14*4=56 for tiles with 4 components. 2+48+144+56=250, which is far in excess of 220.

So how many sets can we form without reusing any tiles? To make n<22 sets, we would need to find a subset of tiles with a number of individual components equal to 9k + 10(n-k) for some k between 0 and n inclusive.

Update 2: Suppose we eliminate "unhelpful" tiles from consideration. A 2-component tile set requires 10 components in individual tiles, so we want an average of 2.5 components per tile. We have too many components, so it helps to eliminate tiles with 3 or 4 components. The 4-component tiles aren't that interesting anyway (I know, sour grapes) so lets get rid of all 14 of them. We're left with 74 tiles, and a component count of 194. This is still not good enough, because even if we could make 74/4 = 18.5 tile sets, we would require that there be no more than 185 components. Next eliminate 18 of the 3-component tiles. This reduces the component count to 194-3*18 = 140. It reduces the tile count to 74-18 = 56 (56 again, for some reason!). 56/4=14 tile sets, and we now have the right number of total components to make 2-component sets for each of them.

It follows that the most tile sets we can make out of the 88 tiles is 14, not 22. There's a lot of wiggle room in removing 3-component tiles, so this may be attainable. We'd have to move 3 colorings on average of each of the 6 curve sets. (I may ping the thread with a new post if I find a nice solution.)

Update 3: A more detailed component count doesn't rule out a solution. In the reduced set, there are 2 1-component tiles, 24 2-component tiles, and 30 3-component tiles. To make a sum of 10 with 1-component tiles, you need 3 of the 3-component tiles. Otherwise, you need 2 2-component and 2 3-component. So if we use 6 of the 3-component tiles with the 1-component tiles, we have 24 left, matching number of 2-component tiles, as required.

Update 4: This is not worth pinging the thread, but here's a partial solution ignoring the 4-component (completely disconnected) tiles.
Screen Shot 2021-07-23 at 9.07.33 AM.png
Screen Shot 2021-07-23 at 9.07.33 AM.png (605.87 KiB) Viewed 1737 times
My strategy was to begin with asymmetric pieces and use all different types, so I could get 4 sets for the price of one. This stopped working after I ran out of asymmetric pieces. Now I have two more tiles to make and I think I'm stuck. (Maybe need to formalize this and run a backtracking search).

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » July 23rd, 2021, 9:31 pm

This isn't as clean a solution as I would like. My goal was to exclude 18 tiles out of the 4 with 3 or fewer components so that if a tile is excluded, then every tile that can be made by flipping or inverting colors is also excluded. The ones in the red box are excluded, but their color inversions are present.

Anyway, I did manage to construct 14 2-component 2-color tile sets with the 56 remaining tiles (I did this in Inkscape and unless I accidentally duplicated a tile, this should be correct). Note that all 18 remaining tiles have 3 components, so if you fit 4 of these together, you will always get at least 4 components (more if you create a hole).

Solution:
Screen Shot 2021-07-23 at 6.23.45 PM.png
Screen Shot 2021-07-23 at 6.23.45 PM.png (528.77 KiB) Viewed 1732 times
Still working on making the excluded set symmetric if possible. Maybe it's time to automate.

Update: Here's a computer-generated solution (the Python script output some numbers and I placed the tiles by hand). After generating all sets of 4 distinct tiles that fit together (there are a little over 2000) I used backtracking with a random ordering to fit non-overlapping placements. The 18 leftover tiles are more random than my efforts. I still want to find one that preserves symmetry.
Screen Shot 2021-07-25 at 10.23.00 PM.png
Screen Shot 2021-07-25 at 10.23.00 PM.png (526.21 KiB) Viewed 1684 times
Update 2: Finally, a solution that preserves symmetry. When a tile is one of the 18 rejected, the tiles attainable from it as flips and color inversions are also rejected. I got to this with a little guesswork and a backtracking search, but I just realized that this is a great application for a SAT solver. I may ping the thread with that (or maybe I should take a break for now).
Screen Shot 2021-07-26 at 12.41.39 AM.png
Screen Shot 2021-07-26 at 12.41.39 AM.png (446.58 KiB) Viewed 1682 times

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Squiggles

Post by pcallahan » August 20th, 2021, 12:22 pm

I finally did a laser cut order of these. Unfortunately, the laser only "prints" in one color by burning a line (or region) of the material. The jigsaw pieces here are shaped to enforce color boundaries. Here's how it came out (80 pieces total, so that's 6 spare pieces around the bottom).
20210818_173353.jpg
20210818_173353.jpg (313.83 KiB) Viewed 1462 times
You can decode the color from the jigsaw shape, though it's tedious. Most pieces go clockwise around the disk, but for both blue paths on a side it points counterclockwise. If the side has a red and blue path, then the jigsaw piece has an extra notch on the blue side.

The material used is called "taskboard" and it's 1.5mm thick. It's made of wood pulp. The only problem with these pieces is they jiggle a lot. The kerf (material removed) is supposedly 0.2mm wide. I believe if the pieces themselves were thicker, there would be less jiggle.

They forgot the engraving on the first set I ordered and I used the failed set to add curves myself, this time in color. The process was a lot more time-consuming, because I had to print out the patterns on an inkjet printer, cut them as carefully as I could with scissors, and glue them on. The result was good (it removed the jiggle too), but I don't think I'll ever do that again.
20210813_162208.jpg
20210813_162208.jpg (203.54 KiB) Viewed 1462 times

Post Reply