8
$\begingroup$

Help! I am trapped in a dungeon with multiple rooms full of sliding tiles! I need to find a way of sliding the tiles such that the 2x2 tile can be freed, by sliding it out of the exit on the North side of the dungeon.
There are some restrictions: every tile in a given room can only be slid if the 2x2 tile is completely inside that room, and that is the only tile that can traverse a passageway: ==.

Here is the floor-plan of the dungeon:

                  │ ░░░░░░░ │
              ┌───┘·········└───┐
              │     ┌─────┐     │
              │     └─────┘     │   119
              │ ┌─────┐ ┌─────┐ │
              │ └─────┘ └─────┘ │
              │ ┌─┐ ┌─┐ ┌─┐ ┌─┐ │
              │ │ │ └─┘ └─┘ │ │ │
              │ │ │         │ │ │
              │ └─┘         └─┘ │
              │ ┌─┐         ┌─┐ │
              │ └─┘         └─┘ │
              └───┐·········┌───┘
                  │ ░░░░░░░ │
              ┌───┘·········└───┐
              │ ┌─────┐ ┌─┐ ┌─┐ │
              │ └─────┘ │ │ │ │ │    54
              │ ┌─────┐ │ │ │ │ │
              │ └─────┘ └─┘ └─┘ │
              │ ┌─────┐ ┌─┐ ┌─┐ │
              │ └─────┘ └─┘ └─┘ │
              │ ┌─┐             │
              │ └─┘             │
              │ ┌─┐             │
              │ └─┘             │
              └───┐·········┌───┘
                  │ ░░░░░░░ │
              ┌───┘·········└───┐
              │ ┌─┐ ┌─┐ ┌─────┐ │
              │ │ │ │ │ └─────┘ │    41
              │ │ │ │ │ ┌─┐ ┌─┐ │
              │ └─┘ └─┘ └─┘ └─┘ │
              │ ┌─────┐ ┌─────┐ │
              │ └─────┘ └─────┘ │
              │ ┌─┐ ╔═════╗     │
              │ └─┘ ║     ║     │
              │ ┌─┐ ║     ║     │
              │ └─┘ ╚═════╝     │
              └─────────────────┘

Note: The 2x2 tile which must be freed is represented with a double outline. The number next to each room can be considered as a difficulty level, as it is the required number of single piece single unit moves.

Here is a more compact version, useful for shortening answers:

 |==|
++==++
| HH |
|HHHH|
|VSSV| 119
|V  V|
|S  S|
++==++
 |==|
++==++
|HHVV|
|HHVV|
|HHSS| 54
|S   |
|S   |
++==++
 |==|
++==++
|VVHH|
|VVSS|
|HHHH| 41
|SRR |
|SRR |
+----+
$\endgroup$
5
  • $\begingroup$ I've taken the liberty to change the visual representation of the dungeon to something that I think is easier to understand. Feel free to roll back it you don't like it. $\endgroup$
    – M Oehm
    Jul 24, 2017 at 7:13
  • $\begingroup$ Yes, sure. I didn't care about such practical considerations when proposing it. :) $\endgroup$
    – M Oehm
    Jul 24, 2017 at 9:17
  • $\begingroup$ The number next to each room can be considered as a difficulty level, as it is the required number of single piece single unit moves. Are you suggesting that we would present a solution with 121 visual steps? Or is this looking for a proof of some sort? $\endgroup$
    – Forklift
    Jul 24, 2017 at 12:31
  • $\begingroup$ Can you confirm that the third puzzle is actual able to be solved? $\endgroup$ Jul 24, 2017 at 16:17
  • $\begingroup$ @EngineerToast my solver confirms an extremely lengthy solution. $\endgroup$ Jul 24, 2017 at 16:48

1 Answer 1

9
$\begingroup$

Bottom Puzzle:

Bottom

Middle Puzzle:

Middle

Top Puzzle: (AKA: Pain and a half)

Due to the sheer number of steps, I had to animate this one.
It loops forever so, if you missed the beginning, just wait.
 
Top
 
My solution takes 119 steps.
I saved 10 steps thanks to Zizy Archer but OP has pointed out where I actually skipped steps in several places. I'm doing this all in Excel and never programmatically checked it. I added a helper to my original file and think I ferreted out all the issues. Every move either changes the color of two squares (single block moving or long block moving along its long axis) or two squares (long block moving along its short axis or big block moving). I programmatically found and then manually checked all the four square color changes. However, as OP has proven so excellent at finding my errors, here's a slower version of the GIF above in case someone else can find an error. That seems likely since I'm still two moves shorter than OP's solver that did the entire thing programmatically.
Top Slow
The steps count a two square movement in the same direction as two steps and does not include the first and last frames (starting position and escaped position). Per OP, this is how their solver counted as well.

$\endgroup$
12
  • $\begingroup$ just about the best explanation i have seen $\endgroup$
    – Jason V
    Jul 24, 2017 at 22:33
  • $\begingroup$ I use the same step metric, so there is a shorter solution to be found! $\endgroup$ Jul 24, 2017 at 23:17
  • $\begingroup$ @micsthepick I realized that my number of 128 includes the first and last positions. Are those both included in your number of 121? $\endgroup$ Jul 26, 2017 at 14:06
  • $\begingroup$ I don't include the either position (it takes 0 moves to get to the first position), and I also only count up to alignment with the end, not taking it through $\endgroup$ Jul 26, 2017 at 21:55
  • $\begingroup$ Actually, you don't completely follow this: "Of course, I count moving a single block two spots in one direction as being two steps". Between step 8 and 9 (or 7 and 8), you move the brown single block twice in one direction. $\endgroup$ Jul 26, 2017 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.