2017-03-06

Solving Deventer's Maze


I encountered Deventer's puzzles first while browsing some old treasures (A. K. Dewdney's book "The Magic Machine: A Handbook of Computer Sorcery"). The book itself (as well as its companion: "The Armchair Universe") is full of wonderful curiosities, guaranteed to attract the attention of a person seeking intellectual fodder.

Fig. 1. Deventer's Maze (or Oskar's Cube) visualized in RobWorkStudio.


Deventer's Maze (that's how A. K. Dewdney refered to it) - or Oskar's Cube - is one of many Oskar van Deventer's puzzles (his works can be found at: http://oskarvandeventer.nl/). This particular one is a clever 3D maze (see Fig. 1). Each of 3 cube sides casts a different shadow. The star-shaped piece inside restricts the movement of the center part, where all the rods connect. The goal is to navigate the center of the star through the invisible maze inside. One might, for example, choose to go from one corner to another.

The puzzle is quite tricky to purchase. With no means to obtain the artifact, I chose to make my own simulated version using the RobWork (www.robwork.dk) framework. I found the puzzle photos and used them to re-create the 3D models of the sides. I then created a RobWork representation of the device. The representation consists of several XML files in which the positions of the models which make up the cube sides are defined. The Scene.wc.xml is the file that you need to open in RobWorkStudio. It also defines the star as a mechanism of three prismatic joints moving orthogonally in X, Y and Z directions respectively.

The solution itself is quite simple and requires no programming whatsoever. Simply define the start and the goal configurations (using the Jog plugin to move the star while avoiding collisions). The planning can be done using one of the plugins (Planning) already included in RobWorkStudio package.
You have to use the RRT planner. Then, after the planning is complete, you can view the animation of the star moving about the maze using the Playback plugin.

Here's the video: https://youtu.be/EEDx81GYclU

And here's a link to GitHub project for if you want to play around with the maze: https://github.com/dagothar/deventer

I have also rendered the "invisible" maze inside (see Fig. 2).
Fig. 2. The "invisible" path inside the cube visualized.
That's just first of many curious things that I have on my mind at the moment. Delving into the details of the solution is certainly appealing. Perhaps I will dwell a little more on that in the near future.

It would be interesting to use some kind of haptic device to make the simulation more real. And to devise a method to generate random Deventer's mazes.

No comments:

Post a Comment