My
- Writing a script to solve it at home.
- Memorizing the solution.
- Collecting my ~10$ prize.
Python to the rescue.
I entered all the information about the puzzle
My approach is to build a 4x4x4 array of zeros and try to fill it with squares. I defined a Point3D class for the millionth time. And set-up the cube.data = [3,1,2,1,1,3,1,2,1,2,1,2,1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,2,3,1,1,1,3,1,2,1,1,1,1,1,1,1,1,1,3,1]
Two small questions that came up during the writing:
1. Does anyone know about a simple implementation of Point3D in Python, so I won’t have to write it again.
2. Does anyone know about a simpler way to define the 4x4x4 cube other
cube = [] for x inxrange ( 4):ll = [] for y inxrange ( 4): l = [] for z inxrange ( 4): l. append ( 0)ll . append ( l) cube. append ( ll )
Now I define all the valid moves in the puzzle, and include recursively the next valid moves, as it depends on the last move.
XDirectionP = (Point3D( 1, 0, 0), []) XDirectionM = (Point3D(-1, 0, 0), []) YDirectionP = (Point3D( 0, 1, 0), []) . . . XDirectionP[1].append(YDirectionP) XDirectionP[1].append(YDirectionM) XDirectionP[1].append(ZDirectionP) XDirectionP[1].append(ZDirectionM) YDirectionP[1].append(XDirectionP) . . .
The main recursion is as
def nextMove ( pos ,dataLeft ,currentDirections ): global cube globalhighestLevel if 0 ==len ( dataLeft ): return True
length =dataLeft [ 0] for move incurrentDirections :newPos =pos + (move[ 0] * length) ifisValidLocation ( newPos ): iftryToSetCubes ( pos , move[ 0], length,len ( dataLeft )): ifnextMove ( newPos ,dataLeft [ 1:], move[ 1]): return TrueclearCubes ( pos , move[ 0], length) return False
Apparently this solution, is good
2.
I’ve translated the result into a string of first letters of the valid moves (Left, Right, Up, Down, In, Out), just to get the 46 letters string “RULODRIULOLILURORIRODLOLUIUODIROUIRDODILDROLUR”.
Next I called my good friend Werner, to manifest a sentence out of the string so it would be easier to memorize. The genius came up with the following:
“Recently, upon learning
3.
Here I returned to the restaurant with two of my good friends who helped me with acting like I’m going trail n’ error to
Alas!!!, I shouted out loud, realizing that not only am I not going to get a free meal, but I will probably have to buy them a new puzzle. Fortunately, they told me not to worry, and that it happens all the time, they would replace the cord by next week, so I could try again then.
Now three weeks later and they still didn’t fix it! I started to look-up this puzzle to check where they bought it, and I found the following web site:
http://www.gaya-game.co.il/
Or more specifically:
http://www.gaya-game.co.il/?categoryId=31183&itemId=60119







