How to solve the 36 Cube puzzle – hints & solution

For Christmas, I got the 36 Cube puzzle. It is consists of 36 towers in 6 colors and 6 different sizes and a base plate with 6 by 6 slots to plug in the towers. These slots are of different heights. The goal is to place one towers of every color in each row and column. And theĀ  towers must fit to form a level cube.

After some tries, I came to the conclusion that this puzzle is the work of the devil and that I should not waste more brain cycles on solving it. So I wrote a little python script to solve the puzzle for me.

Show sourcecode

My program quickly came up with a correct placement for 34 towers – but it failed to find the complete solution.

[('P', 5), ('Y', 3), ('O', 2), ('B', 1), ('R', 4), ('G', 6)]
[('Y', 4), ('O', 1), ('P', 6), ('R', 2), ('G', 5), ('B', 3)]
[('O', 6), ('B', 5), ('R', 3), ('G', 4), ('P', 1), ('Y', 2)]
[('R', 1), ('G', 2), ('Y', 5), ('P', 3), ('B', 6), ('O', 4)]
[('B', 2), ('P', 4), ('G', 1), ('Y', 6), ('O', 3), ('R', 5)]
[('G', 3), ('R', 6), ('B', 4), ('O', 5), ('X', 2), ('X', 1)]

Legend:
P = Purple, Y = Yellow, O = Orange, B = Blue, R = Red, G = Green, X = Empty
The number is the size of the tower.
As you can see, I didn’t waste much time on making the output pretty :)

36cube almost solved

So close and yet so far

After spending lots of time verifying that my program was working correctly, I became impatient and googled for help. I found an answer, but it revealed to much, taking all the fun.

Therefore, I split my solution into multiple hints. If you are stuck, reveal just one of them at a time and try to figure it out by yourself. It is way more rewarding!

Hint #1 (show):

Hint #2 (show):

Hint #3 (show):

Hint #4 (show):

Hint #5 (show):

Even if you uncovered all hints, the puzzle is still far from solved. You can still tinker with it forever.

Spoiler alert: Don’t uncover the solution, unless your are really desperate!

Solution (show):

8 Responses to “How to solve the 36 Cube puzzle – hints & solution”

  1. Derrick Niederman says:

    Daniel,

    I came across your “36 Cube” solution page and enjoyed it a great deal. I don’t know whether my name is familiar, but it might be if you read the very fine print on either the puzzle packaging or the rules pamphlet, where I’m cited as the inventor of the puzzle.

    Truth be told, I once rued the very concept of solution pages such as yours, but I liked the way you handled the process and slowly unwrapped the solution. I couldn’t have asked for more, and I certainly hope that you enjoyed the puzzle.

    Although the puzzle has been out for a year-plus now, I have yet to see the solution process described as I originally described it to ThinkFun. Specifically, I was envisioning that people would get to 34, either repeatedly on their own or perhaps with computer assistance. (Yes, I took some pleasure in the fact that the puzzle couldn’t be solved by computer alone.) There are many different ways to achieve 34 correct towers, and the common denominator is that they all have an intractable set of four towers that are just plain wrong — two colors and two heights, but no way to make them flat. Of course, that’s the situation in a 2×2 version of this puzzle, and in fact the 2×2 and 6×6 sizes are the only cases where no “Euler square” exists. But once you reduce to the 2×2 case you can see that you can make the towers flat with a little hijinx. That’s precisely what I did in designing my original prototype, and I thought that maybe the characterization of the “34s” would be a common route to success, but thus far I haven’t heard it mentioned.

    Anyway, congrats and thanks again for the write-up.

    Derrick

  2. Derrick,

    I’m glad you like my solution and the way I present it. I don’t know if anyone who finds this page actually reveals the first hint and then goes back to figure it out, but I think it is better to give people the choice.

    I don’t know if I would have come up with a complete solution on my own, but I enjoyed the puzzle a lot anyway and I think even if one knows the solution there is still a lot of fun in store. For example, one could code a more elegant solver, as my approach is rather brute force, or dive into the mathematical background of the puzzle.

    Thanks a lot for taking the time to comment!

  3. Hi Derrick and Daniel – this is Andrea at ThinkFun – I enjoyed reading Daniel’s posting and of course Derrick’s response – I will be sure that Bill Ritchie @ ThinkFun sees this so that we can continue to evolve the best “hints” and unraveling of solution – Cheers! Andrea

  4. Colin says:

    Hi Folks

    In case you’re interested, I’ve included the VB.net source code for solving the puzzle. It’s probably similar to Daniel’s but I wrote it from scratch just for fun. Turns out there are four unique solutions (not counting just swapping all the towers of two colors.)

    Derrick, I’m curious that you seemed to be alluding to the idea that there was another way to solve this puzzle than a depth first search (either human or computer). Can you elaborate?

    Sub Main()
    Dim h(,) As Short = { _
    {4, 2, 1, 0, 3, 5}, _
    {3, 0, 4, 1, 4, 2}, _
    {5, 4, 2, 3, 0, 1}, _
    {0, 1, 5, 2, 5, 3}, _
    {1, 3, 0, 5, 2, 4}, _
    {2, 5, 3, 4, 1, 0} _
    }

    Dim u(5, 5) As Boolean ‘color, height
    Dim ux(5, 5) As Boolean ‘color, x
    Dim uy(5, 5) As Boolean ‘color, y
    Dim c(5, 5) As Short
    Dim x As Short = 0
    Dim y As Short = 0

    For i As Short = 0 To 5
    For j As Short = 0 To 5
    u(i, j) = False
    ux(i, j) = False
    uy(i, j) = False
    c(i, j) = -1
    Next
    Next

    Dim ct As Short = 0

    Do
    ‘find next one for x,y
    Dim h1 As Short = h(x, y)
    For c1 As Short = c(x, y) + 1 To 5
    If Not u(c1, h1) AndAlso Not ux(c1, x) AndAlso Not uy(c1, y) Then
    ct += 1
    c(x, y) = c1

    If x = 5 And y = 5 Then
    For i As Short = 0 To 5
    For j As Short = 0 To 5
    Console.Write(c(j, i) & ” “)
    Next
    Console.WriteLine()
    Next
    Console.WriteLine(“(” & ct & “)”)
    Console.WriteLine()
    Continue Do
    End If

    u(c1, h1) = True
    ux(c1, x) = True
    uy(c1, y) = True

    x += 1
    If x = 6 Then
    x = 0
    y += 1
    End If
    Continue Do
    End If
    Next
    ‘rollback
    c(x, y) = -1

    x -= 1
    If x = -1 Then
    x = 5
    y -= 1
    If y = 0 Then ‘no point rolling back to the first row, which is arbitary.
    Exit Do
    End If
    End If

    Dim c2 As Short = c(x, y)
    Dim h2 As Short = h(x, y)
    u(c2, h2) = False
    ux(c2, x) = False
    uy(c2, y) = False
    Loop

    Console.Read()
    End Sub

  5. Colin says:

    Daniel, can you elaborate on what you meant in the clues? I didn’t read them properly until now, and I find it strange that I came to the same solution as you, without handling any exceptions. Is there really something unique about some of the pieces? I thought the unique thing was that some of the rows of the base had more than one base of a particular height (thus getting around Euler’s pesky problem)

  6. Hi Colin,

    thanks for your comprehensive response and your solution.

    I think the fields (1,2) and (3,2) are special. At (1,2), any tower of height 6 matches, but only the yellow tower of height 5. At position (3,2), any tower of height 5 matches, but only the violet tower. I hope that answers your question.

  7. Colin says:

    OK, time for a confession. I never touched the actual puzzle. I got my tower heights from your solution (discarding your color information). So I never realized that there was a ‘trick’ and just threw the processing power at it. I assumed that the base was obviously not a latin square. But apparently it does appear to be one. Consequently, I retract my original comments

    So this isn’t a puzzle in the genre of rush hour, it’s a ‘find the mechanical trick’ puzzle.

    Incidentally I think thinkfun should make a version of this where no towers are special, but the base can be shuffled to create challenges of varying difficulty. What do you think?

    I’d be interested to know if you think this would have been a better puzzle if there were no secrets.

  8. Krocker says:

    Thank you for the hints!!! I looked through the first three till the catch hit me :D Previously I had done a complicated analysis of the options and I remember me complaining multiple times “MY LOGIC IS SOUND! WHAT IS WRONG?” so I eventually gave it up (not being able to give up and look for the solution), but recently I decided to finally feed my growing curiosity so I found this web site and saw the option for hints (Thank you SO much!) I am very happy now and still feel like I solved it. Thank you again!!! :D

Leave a Reply