Showing posts with label polyiamonds. Show all posts
Showing posts with label polyiamonds. Show all posts

Monday, February 26, 2024

Enneiamonds Again

A breakthrough, of sorts. This was the first time I managed to solve something with the full set of enneiamonds without having to resort to any kind of help from computer solvers or anything to knock in the last few pieces. The last few solves I did with them there was always a little bit of 'cheating' going on, not necessarily using the computer so fully solve the end of the puzzle but to check that a solution existed with the pieces I had remaining. But none of that this time. The training wheels are off.

Solve time took a while, but it was lots of short bursts spread out over a week or so. The first 80% of it (solving left to right) came in one sitting, probably an hour or so, then the end was just twenty minutes or so here and there, between university and other things, often getting all but one piece in there. And then today, by fluke more than design I'm sure, I hit upon a solution.

(That one little green unit triangle is there to mark 50 units along the top edge - I'd started off with more there, marking out every ten rows so I didn't build to the wrong dimensions like I have a habit of doing - but as the region between 50 and 60 units was the hardest to complete that marker stuck around and I guess I forgot to tidy it up.)

Here's a nicer image of the full thing, because the photo isn't exactly clear when there's two or more pieces of the same colour bordering each other. Clear acrylic would have solved this, but hindsight and all that.

Fig. 1: The completed trapezium.

Thursday, February 11, 2021

"Fun" with Polyiamonds

Introduction

In branching out the blog to include not just polyominoes but other polyforms too, I couldn't help but notice one thing: my polyiamond solving game is atrocious. I had rationalised this in all sorts of ways in the past - the paucity of chunky yet asymmetrical pieces to hold onto until the endgame was my go-to excuse - and just treated them as a harder bunch of shapes to work with in general.

But realistically it's far more likely that the reason I can't manually solve even a heptiamond construction half the time is down to the fact that, compared to polyominoes, I just haven't put the hours of practice in building up a sort of intuition for the solving process. So I made it a sort of unofficial New Years' Resolution* to try and remedy this.

Bootcamp - Heptiamonds

This is where I discovered my apparent inability to solve polyiamonds. I have a nice little set of wooden heptiamonds I got laser cut a while back, and a little tray that holds them, a 7x12 parallelogram. Except the pieces spend most of their time in a little zip-lock bag because I struggle to get them all into the tray consistently.

Heptiamonds are pretty flexible with the shapes they can do; there's no real parity constraints or anything holding them back so you can go ham - triangles, parallelograms, hexagons, you name it they'll have a go. You can do a triangle with side length 13 and a central hole. I say 'you can' because I can't, and believe me I've tried.

One of the few things I could manage was the two identical parallelograms below, found more by sheer luck and perseverance than by any kind of breakthrough in solving technique:

Fig. 1: Two 6x7 parallelograms.
In general it seems that the trial and error aspect involved in solving heptiamond things overshadows any possible impact from being careful with piece ordering. So I moved on to octiamonds instead.

Octiamonds - a tale of woe

You get a little more choice for pieces with these lot. There's 66 of them so you'd better hope there'd be at least a few which aren't a complete pain in the arse. (See the ones I singled out in the octiamonds section of this older post.)

My first success of the year with these was the 6x44 parallelogram below. I solved this one right to left (well, left to right really, but the final image got flip turned upside down at some point while I was sobbing into my keyboard trying to get InkScape to behave itself.) About two thirds of the way through the solution I realised it might be wise to start solving from both ends and meet in the middle - the thin little 60° points are notoriously tricky, especially when you're down to a very limited set of pieces. And the endgame for this one - the little trial and error period where you just place and backtrack and hope for the best - was agonisingly long, as is always the case with polyiamonds. The last 9 or 10 pieces probably took longer than the 55 or 56 that preceded them. I guess it's the Pareto Principle in action - 20% of the pieces take 80% of the time.

Fig. 2: A 6x44 parallelogram with the 66 octiamonds.

Octiamonds have parity. It works pretty much the same way as hexominoes but this time it's up- and down-pointing triangles you have to keep an eye on. Twenty-two pieces have three of one and five of the other, the rest have 4 up and 4 down, as illustrated in the diagram below. (This seems like it should be too obvious to warrant a diagram but I have doubts about my ability to express things in plain text so I'll draw one anyway.)

From this, we can discover that the total numbers of up and down triangles for the whole construction need to be either equal or differ by 4n where 0 ≤ n ≤ 11. And can you guess when I figured this out?

Camera phones in low light conditions: Not even once.

If you said 'right in the middle of a construction where the numbers of up and down triangles differ by 6' then give yourself a hearty round of applause.

The rough working out that I should have done before I placed 60 pieces...

The next time I could bring myself to attempt an octiamond construction I was a little bit more diligent with my parity checks before I set out, and it paid off. Being a bit sick of parallelograms but not wanting to do anything too adventurous I settled on an eight row high trapezium (or trapezoid as they're known in the US/Canada) which passed all the criteria - it has 8 more 'up' triangles than 'down' ones.

Fig. 6 or something: A height 8 trapezium.

Again, the solution took a while to find, but at least this time there was one.

Enneiamonds - the Final Boss of Polyiamonds**

I'm not sure what possessed me to tackle this one when I was clearly struggling with octiamonds, but I did anyway. Enneiamonds (blogger spell check has a vendetta against that word) have all the frustration of octiamonds and then some, and by far the biggest ball-ache is the introduction of holes. You need a hole for the holey enneiamond (the harbour enneiamond?) and then you need more holes to bring the total area up to something that divides nicely. Adding a further three makes the total coverage 1444 triangles which divides up nicely and allows two rhombi with two holes each to be made (Also 4 triangles with one hole each but let's not try to run before we can walk just yet.)

But knowing a solution should exist and finding that solution are two very different things.

It looks real pretty. And it looks very human-solved, the pieces getting chunkier and easier towards the top corner of the right hand rhombus. But don't be fooled. the last 15 pieces were done with a little electronic assistance.

I don't like doing this. And in fact when I started keying in the pieces which just wouldn't go, my intention was never to just find a solution - that makes for something of a hollow victory feeling when you put that last piece in and know deep down you didn't properly complete it. I initially just ran a search to check for the existence of a solution, but not the solution itself. If the program came back with '0 solutions found' I'd know to backtrack one more piece and try the search again until I reached a position where one or more solutions existed.

I used to do this back in the early days of heptomino solutions, before I got good enough at them to not need any assistance. And usually I'd need to backtrack 5 or 6 pieces and there'd be a couple of solutions lurking in that piece of search space. Not in this case, though - I had to remove fifteen pieces before it could find even one solution. If that's not irrefutable proof that polyiamonds are just a more obstinate breed than polyominoes I don't know what is. Anyway, I'd found a position where a solution was definitely possible, at least in theory. In reality, I fought on, trying configuration after configuration trying desperately to get the rest of the pieces in. The big triangle belonged in the very corner, that felt like a given; it just fit there so well and didn't seem to sit comfortably anywhere else. But beyond that I was just pushing pieces around pretty much at random, sometimes finding I could get all but one in, other times creating awkward little bays and peninsulas in the edge of the construction that seemed to exclude every other shape.

I spent way too long on this - several days' worth of mornings, lunch breaks and evenings - so I eventually decided I would do the unthinkable. I'd peek at a computer solution for those last 15 pieces. Not the entire thing; just the next few pieces, to point me in the right direction.

Key: Purple pieces were already placed, red bits I looked at the solution to find, yellow bits I did myself after the red bits were placed.

Armed with these handiest of hints, I managed (after another 20 minutes or so) to fit the last of the pieces in and gaze upon the finished construction. It still felt like a bit of a cop-out though. I suppose it's just part of the learning process - I did similar with heptominoes a year and a half ago and it wasn't long after that I was knocking out octomino rectangles in single afternoon sittings. Hopefully the next time I dig out the enneiamonds I'll be able to get a little bit further than this time, and before I know it I'll be able to just solve whatever with them without breaking a sweat.

~

* I don't know why I feel the need to prefix that with 'unofficial', it's not like there's anywhere I can go to make a New Years' Resolution official or legally binding or whatever.

** Until I make myself a set of dekiamonds, that is.

Monday, September 14, 2020

Enneiamonds

You know that feeling you get the instant it hits you you've bitten off more than you can chew? I may have got just a little bit of that feeling when I first tipped out the set of enneiamonds onto my desk:

The actual pieces themselves are smaller than I'd anticipated, due to me scaling down the SVG files I'd made then forgetting before I sent them off to be cut out. But they still work properly, now with the added bonus that they don't hog my entire tabletop when I'm mid-solution.

They're a lot like heptominoes, if you were to take everything I hate about heptominoes and turn it up to 11. There's a similar number of pieces (160 vs. 108), including one with a hole, but their complexity seems to be upped just a tiny little bit - I think it could be the mixture of 60° and 120° angles which pushes the difficulty a step beyond. And there's a very small selection of easy looking shapes (see the top left of the photo where I've tried to pick them out). It's less than the amount of nice heptominoes, but enough that it promises an endgame that feels a little less like the random trial-and-error ordeal of heptiamonds.

The total area of the enneiamonds is 1440 triangles, which is 4 less than 38²=1444 which means a triangle with side length 38 and four holes is (in theory) possible. A hole at each corner and a fourth hole dead centre; I decided not to think too hard about possible parity constraints and jumped right in.

There's a 'difficult zone' with polyiamonds. For small sets (hexiamonds and below) there are fewer pieces so usually you can solve puzzles with them fairly quickly. And for much larger sets the amount and variety of pieces is so great that no matter what kind of jagged mess you've got yourself into mid-solution, there's always a piece (maybe several) which will fit perfectly. And there's a good handful of the aforementioned chunky pieces that make the very end easier. Between these two extremes lies the heptiamonds and octiamonds - as mentioned in the previous post these seem unreasonably hard. And I was fearing that the enneiamonds would be the same.

I'm tempted to say that the enneiamonds fall just beyond the far side of the 'difficult zone'. But I can't really since I didn't actually finish solving the triangle manually. I got as far as the last 8 or so pieces then threw in the towel after half an hour or so of trying various possibilities. I resorted to inputting the remainder into a solver (Peter Esser's trisolve) and backtracking one piece at a time until I found a solvable state. From there I could have returned to the puzzle with the knowledge that it was at least doable but I was pushed for time, and I knew the sense of achievement would no longer be there.

The colours look nice, but they still don't allow you to see the borders between pieces very well.

Centering the hole in the middle was tricky too. With polyominoes it's easier; the grid on the green cutting mat is to the same scale as the pieces so I can just stick a monomino wherever the holes are going to be. But with this it was tougher - solve up to the rough place where the holey piece is going to go, then count rows in all three directions and shift the piece around until they're equal.

Had I not been on my lunch break (and conscious of how long I was spending playing around with these) there's a chance - yeah, a low one admittedly - that I could have solved the entire thing by hand. But for now, it's a respectable enough first attempt at solving something with this set. And I learnt some valuable lessons: mainly that some of the pieces I was holding onto weren't as cooperative as I'd previously hoped. There were a few long skinny pieces with fairly smooth edges that I'd kept back and these turned out to be a total ball-ache and part of the reason I gave up when I did.

Here it is, drawn out so you can see the individual pieces:

I tried drawing it in Inkscape instead of MS Paint this time, which was much faster but caused all these little variations in line thickness. Some day I'm going to have to learn how to properly use image editing software.

Monday, September 7, 2020

Polyiamonds: A Spotter's Guide

Introduction

Polyiamonds are the shapes made by connecting equilateral triangles edge-to-edge. What sort of polyiamond you've got depends on how many triangles it contains. If it's just the one triangle, you've got what could be called a moniamond or mono-iamond, but is probably better off just being called an equilateral triangle, for everyone's sake. Two equilateral triangles stuck edge to edge creates a rhombus, or diamond if we're using the 'iamond suffix.[1]

Now stick a third triangle onto one of the sides of this diamond. This creates the legendary triamond, which is just half of a regular hexagon. Now when it comes to adding a fourth triangle, things get interesting. Interesting enough to warrant a diagram.

Fig. 1: Can't beat a bit of MS Paint, eh?

There are three unique ways of attaching that fourth triangle, creating the three tetriamonds. There's not as much variation here as there is with the square-analogues, the tetrominoes. In fact, as you increase the number of triangles the total number of polyiamonds increases, but at a much slower rate than the polyominoes.

Fig. 2: Numbers of free n-ominoes, n-iamonds and n-hexes for n=1, ..., 10. Polyhexes grow stupid fast, but that's a story for another time.

This of course is all assuming we're talking about 'free' polyiamonds anyway. That's free as in they can be rotated and flipped over, not free as in there's a bunch of unlockable shapes as in-game purchases or anything. If we allow the pieces to be rotated but not turned over, we get the sets of 'one-sided' polyiamonds, and if we disallow rotation too we get the 'fixed' polyiamonds. If we disallow rotation but allow pieces to be flipped over it would just be weird.

The 3 free, 4 one-sided and 14 fixed tetriamonds.

Pentiamonds

There are four free pentiamonds. And that's just not a big enough set to do a great deal with. But by considering reflections as distinct (i.e. the one-sided pentiamonds) we get a set of six which cover a total area of 30 triangles. This allows the set to be packed into a selection of little shapes, including a 3x5 parallelogram and these wobbly approximations of rectangles. And a dumpy not-quite-regular hexagon.


My recommendation at this point is to hack a set of these out of the back of a cereal box or something, they don't have to be exact as long as you can tell which piece is which, and have a crack at finding alternate solutions for the above shapes, or trying to find your own. It's also the kind of thing that could keep a child (or simple-minded adult, I raise my hand sheepishly) occupied for a while... Whole minutes of action-packed fun.

Hexiamonds


Now we're getting to the good stuff. Grab one of your pentiamonds from before, slap another triangle on there and you've got yourself a hexiamond. Keep doing it and eventually you'll wind up with the full set of 12 different shapes, each more spiky and irregular than the last. Twelve - just like the pentominoes. And if you're familiar with the pentominoes (and let's face it, if you aren't what are you doing on a site called Polyominoes The Blog anyway?) You'll know that you can do an awful lot with those twelve pieces. So this beckons the question, are the hexaimonds as versatile, as co-operative, as fun as their square siblings?
Well, the total area the hexiamonds cover is 6x12 = 72 unit triangles, which is promising. 72 divides up in various ways which suggests a selection of parallelograms at the very least - 2x18, 3x12, 4x9 and 6x6.

Fun fact: centre-aligned parallelograms always look off-centred. Though to be honest I didn't even try in this instance. Just slapped them into Paint and thought 'good enough'.

2x12 doesn't go. Too skinny. 3x12 doesn't either although you can get fairly close - real close in fact, 11 pieces - but the last piece just doesn't fit.

Close, but no cigar. (If the piece left over looked a bit like a cigar then that would have been way cooler.)

4x9 and 6x6 though, these are most definitely doable. There are 74 and 156 ways of solving these respectively (not counting rotations and reflections of the same solution) but they are deceptively tricky. That cereal box you cut your set of one-sided pentiamonds out of? Go find it, dig it out of the bin if necessary, turn it over and make a set of these pieces too. Yeah, you might have to turn the pieces over to find solutions with them and one of them might have 'RN FLAKES' or something written on one side. Too bad.
Alternatively, the board game 'Blokus Trigon' has pieces which are the stes of 1 through 6-iamonds. So if you have that you could use those. You even get a nice little board that allows the pieces to click in place when you're solving. This is what I did until I discovered the wide world of laser cutting (and the wide world of having the money to afford to get stuff custom laser cut.)

Any excuse to show off this set I made, complete with a nice little tray to hold them.

And if you get sick of parallelograms, there's no shortage of other shapes to solve too. There's the above four-row-high stretched hexagon for starters (purposely shown half-solved to entice readers to try and finish it themselves) and loads more - as long as its total area is 72 triangles and it's not too weird you're good to go.

Folks more artistic than me will be able to find all manner of solutions, I just tend to go for the obvious geometric shapes even though the symmetry of the base triangle lends itself well to snowflake-like sixfold symmetry. Think of them like a more frustrating version of Tangrams.


Heptiamonds

A deluxe wooden set of heptiamonds ('Deluxe' even though because wood was cheaper than acrylic...)

There are 24 heptiamonds (from here on in we're just going to concentrate on the 'free' ones) and at this point things get a little bit tougher. The pieces are just that little bit wigglier around the edges and that makes putting them together all the more frustrating. Various parallelograms can be made (see the image above), as well as a triangle with edge length 13 and one little triangular hole in the very centre. There's a bunch of other solution shape ideas over at the Polyform Puzzler site too, if looking at heptiamond solutions is your sort of thing.

One of the few shapes I've actually managed to solve by hand with the heptiamonds.

One of the (many) things that makes this set so tricky to solve with is the fact that there's relatively few pieces that fit nicely in a 60° corner. And when you're making a shape with triangles as a base unit, there's usually a few 60° angles knocking about.
I've noticed that when I solve by hand with these I tend to want to keep the longer thinner smoother pieces for the end. Whether that's any help whatsoever is up for debate, mind you. In fact that might explain why I'm so bad at solving these.

Another handy tip of course is just to get some polyiamond solving software going (Peter Esser's trisolve is the one that immediately springs to mind) - these make mincemeat of nearly every outline shape you can throw at it. Mincemeat in the good way.

Octiamonds


Now we're reaching the serious business. There are 66 of them which gives a total area of 528 triangles. And at this point the most popular technique for large polyomino constructions can be applied. That is, the age-old art of saving the more chunky blocky straight-edged pieces for the end. There's not a lot of octiamonds that fit this description but there's a few; enough to make the task of solving by hand a little less daunting than it first seems.

These guys. These absolute legends.

Sets of octiamonds are available from Kadon Enterprises. It's where I got mine, and it can be where you get yours if you're that way inclined. If not, lots of cereal boxes. You know the drill.

Enneiamonds

I don't know why the 'non-' prefix wasn't good enough for this lot but clearly it isn't. Just try googling 'noniamonds' and marvel at the complete lack of results that show up. 'Enneiamonds' on the other hand turns up a few sites (maybe even this blog if it gets popular!) with constructions from polyformists (is that a word?) far more dedicated than I.

An interesting thing happens when you reach the enneiamonds too. It's this:

Nine triangles can be made to completely surround another triangle, allowing for the fabled holey enneiamond to exist. Not quite as infamous as its distant relative, the harbour heptomino, but getting there. This makes it a little harder to fill shapes but it can be worked around, usually by introducing a few more holes and placing them symmetrically throughout the construction.

I've got a set of enneiamonds, laser cut out of four colours of acrylic in a way that makes them look very like primary school teaching aids, but as of yet I haven't finished any constructions with them. Peeling the protective sticky material off both sides of each piece was an ordeal enough.

Deciamonds or Dekiamonds, I'm not sure 

There are 448 of these, 4 of which have holes in them. Nevertheless, some brave and intrepid individuals have made things with the full set. Check out this over the the Poly Pages by Patrick Hamlyn. And this page which has a solution by John Greening, using a combination of several sets, all one inside the other like Russian dolls or something.

The 6- through 10-iamonds, found by John Greening (more information at the above Kadon Enterprises link.) I drew this up based on the photo on that page, but the photo itself is unclear in some places so I may have made mistakes.

Beyond these though, you're pretty much stepping into the unknown, venturing into unexplored territory.
Or if it's not unknown, there's certainly not enough pretty pictures of it up on the internet.

---


[1] FUN FACT: This isn't the etymology of the word diamond. The word 'diamond' came first and the suffix '-iamond' was back-formed from it at a later date.

Friday, March 27, 2020

Octiamonds

Polyiamonds are tricky. Even the smaller sets seem harder than their similarly-sized polyomino counterparts. Hexiamonds, for example. There's 12 of them, same as the pentominoes, and in a geometric sense they don't seem any more jagged or otherwise unruly, but for whatever reason solving anything with them seems a lot harder.
I mean, it could just be that I'm more used to polyominoes and that a sort of intuition for other polyforms would build naturally with time. And with polyominoes I know all the handy tips and tricks, which pieces (or types of pieces) are most useful in which situations, whereas with polyiamonds I don't have that (yet).
With larger sets of polyominoes, (i.e. hexominoes and above) a technique emerges of saving the more cooperative shapes for the end game, and as the sets get larger this pool of 'nice' pieces increases rapidly in size. But with (say) octiamonds it's not so obvious which shapes are the most useful. They're all pretty hideous, actually, at least to the untrained eye. The little hexagon made of six triangles is the closest analogue I can think of to the 2x2 square block that makes for nicely-behaved polyominoes. But there are only 4 out of 66 octiamonds which contain it and even these 4 pieces don't play especially nicely together with each other.

So the solution below was the result of about an hour and a half of stumbling about cluelessly followed by a flash of pure luck.
Fig. 1: The 66 octiamonds in a 12x22 parallelogram.
 Another fun fact: Drawing these out neatly is really hard too. Pixel art and triangles don't mix too well.