Puzzle o’ Tiles

Tuesday, July 19th, 2005

rocket puzzleThe previous post has got me thinking about images built out of tiles, and I need some cheering up, so I made this little block sliding puzzle. Enjoy!

Feel free to copy the source to make your own version. All you need to do is replace rocket.jpg with your own 300 x 300 image.

__________

UPDATE: Note that I had originally overlooked the issue of parity when randomizing the puzzle squares— This meant a 50% chance of getting an impossible puzzle! Apologies to anyone who might have been a victim of this temporary oversight ;)

__________

UPDATE2: how to solve ( one animated solution)

feed

10 Comments

  1. Chris D. says:

    I’ve always had trouble solving these, but I think I’ve finally found an algorithm I can use.  Finally.
    Thanks!

  2. Tim says:

    I was wondering how you managed to slice up a single image with javascript, but I see you were much more cunning ;)

  3. Shaun says:

    God, I’m so crap at solving these. My tiny monkey brain can’t think ahead more than one step at a time.

  4. mark says:

    Uh oh, I just realized what a complete bastard I am, allowing the randomizing function to sometimes generate impossible puzzles! I will change the algorithm shortly…

    BTW for more info about how this is possible, see: http://www.jimloy.com/puzz/15.htm

  5. mark says:

    Fixed now [I added a bubble sort to determine puzzle parity, and swapped 2 pieces to correct where required]

  6. Shaun says:

    Yay! Now my monkey brain can solve the puzzle!…
    …in 73 moves :(

  7. mark says:

    Since it is random the hardness can vary a lot, but on average I expect to take around 40-50 moves.

    Will be posted a 4×4 sometime I think :)

  8. mark says:

    Tim– Glad you appreciate the method I used… I was pretty chuffed that it worked :) Now if only I knew why it doesn’t work in Safari…

  9. Ashwin says:

    Hmmm… next to “it does not work in Safari” you can add “doesn’t work in Opera, either”… [:-(] The puzzle displays 8 copies of the same top-left photo slice in my browser.

  10. mark says:

    fixed in Opera, now there’s just the Safari problem [which looks like a scripting issue]

Leave a Comment