In the 1990s, Sierra Entertainment developed a series of educational computer games called “Dr. Brain” (indeed, Dr. Kawashima was not the first one to use his doctoral title to sell edutainment). In the third installment of the series from 1994, called The lost mind of Dr. Brain, a puzzle called “Motor Programming” was introduced, apparently inspired by the Logo programming language. The goal is to guide the dog Rathbone towards a brain (Dr. Brain’s brain) by using simple instructions like ‘forward’, ‘turn left’, etcetera. In this game’s simplistic programming language there are no loops nor recursion, only subroutines. The challenge of the puzzle is that only a limited number of instructions are allowed, and only two subroutines (also with a limited number of instructions each).
This puzzle has now also reached the iPhone, in different guises, and through a twisted path of attribution and inspiration.
As far as I can reconstruct the history, the first to take over Dr. Brain’s puzzle was Matt Chase, who wrote a flash version in 2004 called Bill the Robot. He introduced the option to have multiple goals in one puzzle, so somewhat more complex puzzles became possible. This game was the inspiration for Daniel Yaroslavski, who made a flash version called Light-Bot in 2008. He introduced the possibility to use recursion, i.e. a subroutine can call itself. I did not actually get to a level in which recursion is necessary, but again this addition allows for much more complexity compared to the original Dr. Brain version.
Light-Bot was then adapted for the iPhone by Alcomi as iBot. However, this version was such a blatant copy of Light-Bot, that in the end this version was made available directly from Daniel Yaroslavsky through Armor Games as LightBot (iTunes Link, a screenshot is shown to the left). The game is very well made, with a very nice user interface. Matt Chase is mentioned in the liner notes (that is how I got to know about him). However, the original conceptual link to Dr. Brain is not mentioned (you learned that here).
Some time earlier, another similar iPhone game became available in the app store: Robo Logic (and the lite version RoboLogic Lite, shown here to the right). There is no mentioning of its origin, and in response to my question, the developer simply says that the “concept is not new and [my] levels are completly different.” This seems to be the normal reaction towards games and puzzles: a game-concept is free for all, and no reference is needed to its origin. I think this attitude is very unfortunate, to say the least. The functionality of Robo Logic indicates that the conceptual origin is Matt Chase’s Bill the Robot, because the idea of multiple goals is available, but recursion is not possible (as in LightBot). Still, Robo Logic is a nice game, though the user interface is slightly more cumbersome than LightBot because every instruction has to be dragged to its place in the program.
Check them out, and tell me if you find a level in LightBot where recursion is necessary!
[Update 22 february 2009] I have spent some more time with LightBot and this was very pleasurable time spent indeed. Recursion was not necessary, but the puzzles are still very interesting. Unfortunately, there are only 15 levels, but after level 10 the difficulty rises strongly. In particular level 12 was a challenge (my solution is shown here to the left).
There are a few idiosyncrasies in the way how the robot reacts to the instructions that are not mentioned in the help files, but which are important to be able to solve the higher levels:
- Jumping goes only one level up, but down as far as you want
- Going forward is ignored at an edge, i.e. to step down you have to use a jump
- Using the lightning-instruction is a switch, i.e. you will both turn a light on and out by using it.
- Using a lightning-instruction is ignored on normal tiles.
To explain the difficulty of level 12: the route to the finish is 31 instructions long. The problem is that by simple concatenating the subroutines there is a maximum of (12-1)+(8-1)+8=26 instructions possible. So you have to use some subroutines more than once. By nesting subroutines (without recursion), the theoretical maximum of instructions possible is 12*8*8=768, but that only allows for very repetitive movement patterns. The difficulty of level 12 is that the route has almost no repetitions! The trick is to use subroutines that contain instructions that are ignored in many situations (like a move straight on the brink of a drop). My solution in the end contained 69 instructions of which more than half were ignored!
Is this level really that difficult, or did I miss something? Does somebody have a shorter solution? By the way, LightBot is a free download…
[Update 9 April 2009] As requested in the comments, I added a screenshot with my solution of level 14.