Robot Unlock is a puzzle game by Madflame Software in which you're challenged to program a robot to perform certain tasks. What sort of tasks, you ask? Is it vacuuming the carpet starting along the outside walls and working in toward the center? Is it making breakfast sandwiches and wrapping them in foil for you and your co-workers to nosh on during the day? Is it riding a unicycle through a world of perilous flashing neon blocks? Nope, it's a much simpler, more worthy task. MATHS. Write that down in your copy book now.

In each level of Robot Unlock, your goal is to program a path for your Executor robot to travel around a series of command tiles that alter the robot's stored memory. Your memory consists of four slots, each of which hold a number. In some levels your starting digits are randomly generated, while in others the numbers are constants, but your goal always remains the same; change the input (Initial Code) in your memory to match the output (Required Code) on the right. As instructed by Ted, your friendly robot guide, the Required Code has to match a certain set of criteria based on the Initial Code, such as swapping the numbers in the first two memory slots or comparing the input values and moving the third-largest to slot 1.

Your instruments through this journey are a range of mathematical stepping stones which can be placed along the Executor's path, as well as two indicators to mark your position in the memory, colored dark green and light green. You can move the memory pointers left and right using the double-arrow tiles, then perform mathematical equations that compare the numbers held by the pointers, with the output replacing the number in one of your slots. It would take a long time to discuss every possible operation, but know that you can perform the four basic operation (add, subtract, multiply, divide), force the robot to take a detour if one number is greater than another, and other functions.

Once you think you know how to program your speedy robot, use the toolbars at the top to select the tiles to drop down below. You have three palettes to choose from, including one that features commands relating to the dark green memory pointer, one for the light green pointer, and a blue tileset that corresponds to the movements of the Executor itself. Click on a tile to use, then click on the grid to plop it down there. When everything's in place, hit the play button and watch as your robot works it's magical mathematical mojo. Your bot will follow the tiles you've set until it falls into "the abyss" surrounding the play area. If your memory matches the required output, you'll unlock a new level for fiddling about in.

**Analysis:** Robot Unlock taps into a very basic concept employed by what is essentially its chemistry-based predecessor, SpaceChem. Each level challenges you to solve a complicated problem using only the resources and space provided. As I was playing through this game, I found myself frequently longing for a way to change higher numbers into 1s and 0s quickly, without repeatedly ticking down one digit at a time until the target is reached. There's not a false sense of difficulty that comes from the lack of available tools, but a pleasurable challenge of simplicity that hits you in the forehead when you realize how quick and easy the task is (for example, dividing a number by itself gives you a 1, subtracting a number from itself gives you 0).

That said, finding those solutions can still be a tricky mess. Determining the plan of action is often times the hardest part of each puzzle, given how few resources you have to work with. One factor that greatly contributes to the difficulty is the randomness of the input numbers given. Very much unlike SpaceChem, where the inputs are constants (or are limited to three possibilities), any integer (with a limit of +/-100ish) is fair game. You can't just program a path that works for one set of numbers that you think might pop up, you've got to program a path that works for *every* set of numbers.

Along this same vein, there's a pseudo-bug worth mentioning. Since the numbers are randomly generated, it's entirely possible that a set of numbers will satisfy the output conditions, without a single tile laid down. In the early levels, this is overlooked and treated as a valid solution. As far as introducing people to concepts goes, this isn't the greatest way to start off the game, since you can bypass levels in which you familiarize yourself with critical strategies. However, this is corrected in later levels with the requirement that your program must function three consecutive times in order to pass. It's a good save, but it really would be worth considering for use earlier in the game.

Unfortunately, this game's interface is a bit crude, which can lead to some confusion if you're not careful. One problem is that while selecting tiles, there's no way to tell what tile in the palette you've selected, such as highlighting your choice or a separate indicator. Also, Ted's instructions, though helpful, can linger on the screen a bit too long with no way of working around them or clearing them without waiting a short period of time. They're minor presentation quibbles, but they can become grating after a while.

Still, Robot Unlock packs some difficult challenges into a fun atmosphere. Just like other programming games, you might spend more time working outside of the game to produce an answer, but seeing your analysis pay off in the end (with, well, pixely fireworks) is worth it, just to know you trounced the troublesome task. If you're looking for a number-crunching challenge that emphasizes how you crunch rather than the numbers themselves, Robot Unlock is here to satisfy your need. And who knows, maybe it does help with the vacuuming.

**Windows**:

Download the free full version

**Mac OS X**:

Not available.

Try Boot Camp or Parallels or CrossOver Games.

## Walkthrough Guide

(Please allow page to fully load for spoiler tags to be functional.)

Okay, here's my shot at a walkthrough for the first 18 levels. (I haven't gotten any further yet, and it's way too late to keep playing.)

For each level, I've written a description of what you need to do, then, nested in additional spoiler tags, I have some hints as to how you can do it (usually just 1, but a few levels have additonal levels), and finally a spoiler tag hiding my own solution which you can copy into the program. It's all nested so you can't accidentally get to the solution without going through the hints.

Note that I've sometimes applied a little trickery which may make my particular solutions seem slightly less straight-forward than they could be. If you are having trouble following the logic, try slowing the robot down with the down arrow key and take one step at a time.

For all levels, I've done my best to ensure the output follows the actual rules exactly, but as with any kind of programming, there may be bugs. :)

Note that the game is rather picky about the copied solutions - you have to be careful that no hidden line breaks snuck in while you copy them. Paste into a text editor first (e.g. Notepad) so you can make sure you copy the right thing.

Level 1Go from 0 0 0 0 to 1 1 1 1.

Use ++ to increment the current cell and >> to switch cells.

01"%-#%/$%-%%/&%-'%/(%-

Level 2Go from 0 0 0 0 to 1 2 3 4.

You can use the increment function for every thing, but you can save a little space by using the + operation to add cell values.

02&%-'%/(%-)%-*%<+%/,%5-%-.%&.&/.'5.(5

Level 3Go from 0 0 0 0 to 2 2 2 2.

You can use the # operation to jump to the second half of the playing field, but the first half is enough space to solve the puzzle.

03&$&&%-&&''$/'%-'&-($5(%/(&/)$%)%$)&5

Level 4Calculate 2 + 3 * (7 - 5) and store the result in First.

Remember the order of operations: first parentheses, then multiplication, then addition. The correct result is therefore 8.

If you're really desperate, you can cheat - the game doesn't check how you reached a result, so you can just add First to itself 2 times (2 + 2 = 4, 4 + 4 = 8).

04$%/%%/&%='%6(%<)%<*%7+%=,%B

Level 5Swap First and Second.

You may use Third and Fourth as you wish, so start by copying First to Third.

05$%<%%<&%B'%6(%/)%<*%B+%6,%0-%5.%//%=0%5

Level 6Like Level 1, but the starting values are random.

You have to subtract each cell from itself - this will get the cell to 0, at which point you can increment and move on to the next cell.

06$%6%%-&%/'%<(%C)%:*%<+%/,%6-%-.%//%<0%&0&C0':

Level 7Let First be the remainder of dividing Second by Third (that is, First = Second modulo Third).

The cells only store integers - if a division yields a fractional part, it is discarded, e.g. 11 / 10 = 1. In programming, this kind of division is called

integer division.Due to this integer division, A / B * B = A - (A modulo B).

07$%<%%5&%<'%8(%7)%=*%6+%*

Level 8Copy First to Second, Third and Fourth.

Instead of moving back to First to make the copy, you can move to the last copied value instead - that is, you copy First to Second, then Second to Third, and finally Third to Fourth.

08$%/%%<&%C'%=(%5)%/)&5*%<*&=+%<+&C,%C,&<-%=-&<.%5.&//%&/&%

Level 9Set First to 1 if all values are the same, otherwise to 0.

This is where the colored directional arrows come into play. They compare whether the value at their color pointer is greater than the value at the other pointer, and are activated if this is the case.

If light > dark, then a light arrow will be followed. If light < dark, then a dark arrow will be followed. What then happens when light = dark?

09"$/#$3#%0#[email protected]$%0$&6%$/&$3&%0&&0&'6'[email protected]'%0'&0''6($/)$3)%/)&6*[email protected]*%/*&6+$/,$6-$-

Level 10Calculate the maximum value of First and Second, and of Third and Fourth; then take the smaller value of these two and put it in First.

The simplest way to do this is to set First = max(First, Second) and Third = max(Third, Fourth). Then, set First = min(First, Third).

10"%/#!'#"/##C#$0#%1$!&$"B$%'%%<&%<'%<(%/)!')"0)#6)$/)%1*!&*"B*%'+!&+"B+%/,%/-!'-"=-#C-$<-%1.!5

Level 11Reverse the order of the cells.

What you want to do is to swap First and Fourth, and Second and Third.

There's a trick you can do to swap two different values using only addition and subtraction - simply perform the following operations: A = A + B, B = A - B, A = A - B. You can only assign to the first operand, however, so you'll have to rewrite it a bit...

One way to rewrite this is as B = B + A, A = A - B, B = B + A, A = -A.

11"%=#%B$%6%%B&%*'%/(%=)%B*%6+%B,%*

Level 12Go from 0 0 0 0 to 1 10 100 1000.

Start by getting 10 in Second.

12"%-#%-$%<%%B&%D'%D(%B)%.*%/+%/,%5-%7.%//%50%71%7

Level 13Add Second to First, but without the arithmetic operators.

This is where it gets a bit tricky. You have to construct a loop which increments First until all of Second has been added. That means you'll also have to decrement Second every time, and stop when it hits 0.

13"%0#%0$%-%%<&%''%3(%/)%/*%-+%/,%/-%;.%32%%

Level 14(NOTE: Game description is incorrect here.)

Calculate a Boolean expression: First = Second OR NOT (Third AND Fourth). (Don't know what that means? Read up on Boolean algebra on Wikipedia.) 0 represents False, and 1 represents True.

All four cells start with random values, so it's a good idea to start by resetting First to 0.

If Second is 1, you can use a principle called short-circuiting: the result will be 1 regardless of Third and Fourth, so you don't have to check those at all in that case.

14"%6#%<$%@$&-%%<&%@&&<&'A&(-'%-''&

Level 15(NOTE: Game description is incorrect here.)

Go from 0 0 0 0 to 32 64 128 256.

Once you get First to 32, every other cell can be filled in correctly with 2 additions.

15"%-#%-$%7%%7&%5'%<(%B)%B*%<+%/,%B-%B.%</%/0%B1%B

Level 16Copy Second to First, but without the arithmetic operators.

Clearly, you have to set up a loop. This time, keep incrementing First as long as Second > First.

16)$A)%<)&$*$-+$?

Level 17(NOTE: Game description is incorrect here.)

Go from 0 0 0 0 to 10 20 30 40, but without the arithmetic operators.

There's enough room to lay out 100 increment operations and path the robot around it. I don't know of any better solution for this one.

17"!'"%$#&&#''$"&$#'$$&$%'$&/$(&$)'%!-%"-%#-%$-%%-%&-%'-%(-%)-%*-&!-&"-&#-&$-&%-&&-&'-&(-&)-&*-'!-'"-'#-'$-'%-'&-''-'(-')-'*-(!-("-(#-($-(%-(&-('-((-()-(*-)!-)"-)#-)$-)%-)&-)'-)(-))-)*-*!-*"-*#-*$-*%-*&-*'-*(-*)-**-+!-+"-+#-+$-+%-+&-+'-+(-+)-+*-,!-,"-,#-,$-,%-,&-,'-,(-,)-,*--!--"--#--$--%--&--'--(--)--*-.!-."-.#-.$-.%-.&-.'-.(-.)-.*-/!//#//%&/&%/'&/(%/)&/*%0!&0"%0#&0$%

Level 18Swap First and Second, but without the arithmetic operators.

Store one value in Third, then gradually increment or decrement First and Second.

18"%<#%<$"'$#3$$:$%1$&'%"&%%'%&$&%='"''#@'$-'%>'&'("'(#3($.(%1(&')"&)%')&$*%/+%/,#3,$:,%1-#@-$;-%>

Posted by: Pidgeot | July 11, 2011 9:46 PM

Here's levels 19 to 27.

Level 19Find the expected number.

You have to continually increment First until it matches the target number. To check if you have the right number, move over a plate with a dot on it - if the value is correct, the robot stops and you complete the puzzle.

You'll have to use jumps to create the loop.

19(&&('!((')&-*$'*%!*',*($+$-+&,,$&,%!,&%

Level 20(NOTE: The description given is incorrect.)

Set First = Second / 3 and Second = Second modulo 3.

As long as Second is greater than or equal to 3, remove 3 from Second and add 1 to First.

20"%0#%<$%-%%-'!&'"/'#-'$0'%'(!%(";(#;($;(%>

Level 21If Second, Third and Fourth are all divisible by 3, set First to 1, otherwise set First to 0.

This is a bit like Level 20, except you're not actually storing the integer part of the division.

First always starts as 0.

For each cell, keep subtracting 3 as long as it's greater than 0. If you ever get a value smaller than 0, that cell was not divisible by 3.

21"%<#"&##;#%'$"%$#;$$;$%>%%1&%<'"&'#;'%'("%(#;($;(%>)%1*%<+"&+#;+%',"%,#;,$;,%>-%1.%-

Level 22Check if all values are 1 and store the result in First.

Any one of the values may be incorrect, but only a single one.

22"%<##C#$=#%>$#C$$=$%1%%<&"C&#=&$=&%>'"C'#='$='%1(%<)#C)$<)%>*#C*$<*%1

Level 23A random multiple of 5 will be picked. Find it.

This is almost exactly like Level 19, except the number is always a multiple of 5.

23%%&%''&'!''-('-)'-*'-+'-,'!-'%

Level 24Determine if the 4-digit number in Second is a palindrome. (Note: I've had 10000 come up during one run. The solution still works in this case.)

Use division and modulo to isolate the digits, then compare them. Start with the first and fourth digits.

24"!'""-"#="$0"%$#!-#"&##<#$'#%&#&C#':$!B$"7$$<$%0$&C%!B%"7%$C%%0%&C&!:&"7&$/&%@&&0&'0&(6'!:'"='$E'%3'&0''0'(6(!0("3(#'($<(%<)!=)"@)#')$0)%8*!=*"<*#/*$6*%=+!5+"8+#/+$0+%C,!<,"8,#6,$B,%<-!<-"8-$<-%7.!8."=.$<.%8/!7/"C/$0/%=0!<0"/0$60%/1!01"B1$/1%B2!&2"%2$&2%%

Level 25Go from 0 0 0 0 to 345 456 678 789.

There's a pattern: Second-First=Fourth-Third=111 and Third-Second=222.

Get 111 into one of these cells, and create one more cell.

25!&&!''"%-"&D"';#%-#&0#'=$%5$&0$'/%%5%&:%'/&%-&&:&'6'%-'&B''<(%<(&/('5)%B)&/)'=*%:*&D*'=+%D+&0+'6+(&,%:,&0,'=,(5-%0-&B-'0-(C.%0.&<.'0.(C/%-/&-/'6/(C0%-0&50'/0(01%-1&<1'/1(B2%&2&%2'&2(%

Level 26Calculate the integer part of the square root of Second and put it in First.

Count up Third and Fourth by one each iteration, until Third * Fourth > Second. When that becomes the case, copy Third to First and decrement.

26"%/#%/$%=%%'%&$&%-&&E'%:'&/(%D([email protected]('=((0()5(*.)%0*%&*&%

Level 27A random multiple of 11 will be picked. Find it.

Exactly like Level 23, but a different multiple and no addition plates.

27"%'"&-"'-"($#%!#(-$%-$(-%%-%(-&%-&(-'%&'&-''-'(%

Posted by: Pidgeot | July 12, 2011 7:39 AM

Now levels 28-36... They're getting trickier now.

Level 28Go from 0 0 0 0 to 128 432 360 375.

This one is really tricky. We need to find some sort of system here.

One way to solve this level is to use 8 as the main element of your computations.

54 = (8 * 8) - 8 - 2

45 = 54 - 8 - 1

360 = 45 * 8

375 = 360 + 8 + 8 - 1

432 = 54 * 8

128 = (8 * 8) + (8 * 8)

28"!'""5"#-"$-"%$#!5$!/%!5%"$&!7'!6'"7(!.("0)!.)"7*!<*"0+!<+"0,!B,".-!0-"5.!C."5/!;/"=0!D0"=1!01"52!&2"%

Level 29Set First to the greatest common divisor of Second and Third.

The Euclidean algorithm for calculating the GCD is fairly simple to implement: gcd(a, 0) = a, gcd(a, b) = gcd(b, a modulo b).

29"%/#%/$"B$#0$$4$%$%$=%%0&$0&%<'$B'%6($/(%/)$E)%6*$D*%<+$0+%6,$C,%/-$=-%5.$5.%C/$&/%%

Level 30A random multiple of 13 will be picked. Find it.

You should know the drill by now.

30(#&($-(%-(&-((')#%)$-)%-)&-)'$*#&*$-*%-*&-*'%*(!+#%+$-+%-+&-+'-+($

Level 31(NOTE: The description given is incorrect.)

Determine the Second'th Fibonacci number and store it in First.

Use Second as an iteration counter by counting down to 0. Use Third and Fourth to store the results. Keep them sorted so you know which one to copy to First.

If you decrement the counter

afterchecking it, initialize Third and Fourth to 0 and 1. If you decrementbeforechecking, initialize both to 1.31"%=$%=%%:&%='!5'"<'#<'$A'%$''<'($($;(%&(&<('C((%)$<)%**$5*%B+$<+%6,$5,%B-$0-%<.$=.%//$B/%*0$60%B1$&1%%

Level 32Calculate the logarithm of Second in base 2 and store it in First.

The base-b logarithm of n is defined as the value x which satisfies n = b^x.

Since we're after the integer logarithm, you're essentially being asked for the length of n written in base b, minus 1.

Keep dividing Second with your base until Second = 1. Count how many times you had to divide to get to this result.

32"%0#%-$%-%%0&%-'%<($A(%$)$=*$:+$/+%0,$<,%E-$&-%%

Level 33Calculate First=2^Second, with no arithmetic operations.

2^n = 2^(n-1) + 2^(n-1). Level 16 told you how to copy a value, and Level 13 told you how to add the two values back together.

33"%-#%=$%/%$4%%$%&$&$.'$/'&0($)%')&=)(:*!&*%&*&%*'.*($

Level 34Calculate the mean of the 4 random numbers and store it in all cells, without arithmetic operations. (In other words, distribute the cell contents evenly.)

Make three of the cells equal by moving stuff to the remaining cell. Move to or from this last cell depending on its value.

34"%<#!&#";##/#$'#%>#&'#'/#(-#)$$!%$"-$#0$$>$%3$&3$'.$(0$)%%$&%%'%&$&%<&&'&'-&(<&);&*$'!&'";'#/'$''%>'&/'*=(!%("-(#0($>(%3(&3('.((0()-(*%)$&)%')&$*!&*"-*#0*$'*%<+!/+$'+%>,!-,%3,&','0,(.,)/,*$-!<-*..!:.*</!=/*;0!;0*=1!%1";1#;1$>1&31':1(:1):1*%

Level 35A random multiple of 11 will be picked. Find it.

Level 27, but the level layout is different.

Since there's no penalty for guessing, you can just make a loop that checks every number...but try to come up with a design which only checks the possible numbers.

35&#''#!(#-)#-*#-+#-,"',#&,$,,%-,&-,'$-#,."&.#%

Level 36Sort 4 random numbers, with the lowest in First and the highest in Fourth.

You have arithmetic operations, so swapping numbers is easy enough. The simplest way is to use a Bubble sort as the basis for your code, but you'll have to write each iteration manually.

36"%<#"'##C#$5#%1$"&$#5$$+$%'%%<&%/[email protected]&'B&(6&)B&**'"''#C'$5'%1'&0("&(#5($+(%'(&=)%<)&%)'*)(B))$*%/*[email protected]*'B*(6*)%+"'+#C+$5+%1+&<,"&,#5,$+,%',&/-%0-&%-'+-(5-)$.%<[email protected]'5.(C.)%/%&/&%

Posted by: Pidgeot | July 12, 2011 11:25 AM