YaK:: G4G11 Puzzle -- Strick's Mu [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
[mega_changes]
[photos]

G4G11 Puzzle -- Strick's Mu

This box contains everything you need to know to solve the puzzle:

Goal: Turn MI into MU.

Use short clicks. Hold 2 seconds to reset.

Note: This puzzle is solvable. You too can MU!

To turn the puzzle off, don't press the pushbutton for 3 minutes.

Anything not stated there is for you to figure out.

After you solve it, here is more information:





Description of the Puzzle

The puzzle is a circuit board with one pushbutton and 3 LEDs, labeled "M", "I", and "U".

When you push the button once to turn it on, it will flash 3 "rabbits" quickly from left to right, to let you know that it is reset and ready to go.

Then it will initialize the puzzle, putting you in the state "M I". That is, it blinks "M", then "I", pauses, and repeats.

Your goal is to get to the state "M U", so it blinks "M" and then "U", pauses, and repeats.

The only input is the single pushbutton. The hint "Use short clicks" is printed on the puzzle, as is "Hold 2 seconds to reset."

Regardless of other MU Puzzles, this puzzle is definitely solvable. You can achieve the MU state. More than one person has solved it in trials.

Online Puzzle

This is sort of a spoiler, so solve the physical puzzle first!

Sterling "scubed" Stein wrote a Javascript version of the essence of the puzzle: http://wiki.yak.net/1044/source_scubed_mu.html

Hacking your puzzle

The puzzle uses an ATtiny45 microcontroller from Amtel; it's the black 8-pin chip in the center.

The schematic diagram, printed circuit board layout, and source code are available:

LICENSE: You may use the four files above for any purpose whatsoever. Good luck!

That source code used the Arduino Software and the MIT instructions, which unfortunately are now offline :( but are at the Internet Archive's Wayback Machine:

See here for alternatives: https://code.google.com/p/arduino-tiny/

There is a 2x3 grid of 6 holes for a standard In-Circuit Serial Programming Header for reprogramming the Flash ROM in the microcontroller. You must disconnect the battery while reprogramming!

If the battery runs out, any DC supply from 2.7 to 5.5 volts can be used. Just unsolder or cut off the battery, and replace it with something else. The pads are marked GND and +3V.

Easter Egg: A Turing-Complete Brainf Interpreter.

If you hold the pushbutton for 2 seconds, until all 3 LEDs turn off, you reset the MU puzzle...

But if you hold it for 5 seconds, until all 3 LEDs turn on, you're in a new mode that we'll call "Brainf", which you can find documented on Wikipedia.

Opcodes:

The Brainf machine model has a tape of bytes and a pointer to one byte on the tape. The pointer can be moved left and right, and the pointed ("chosen") byte can be incremented, decremented, or printed. The only other instruction is a while-not-zero loop. (We did not implement one other standard instruction which inputs a byte.) Our tape contains 80 bytes (for backwards compatibility with Hollerith Cards). The pointer begins at the left end of the tape, and will not move off the ends of the tape.

\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n
Octal Binary Morse Standard Rough Equivalent English
Opcode LEDs Pushbutton Mnemonic (in C) Explanation
7 111 ‒ ‒ ‒ . printf("%o", *p); Print chosen byte in base 8.
1 001 · · ‒ > p++; Move pointer to the right.
4 100 ‒ · · < p--; Move pointer to the left.
2 010 · ‒ · + (*p)++; Increment chosen byte.
5 101 ‒ · ‒ - (*p)--; Decrement chosen byte.
6 110 ‒ ‒ · [ while (*p) { Loop while chosen byte is nonzero.
3 011 · ‒ ‒ ] } End while loop.

Opcode 7 (".") will print (flash) the number 3 bits at a time, most significant bits first, like the standard octal representation of the number. For instance, decimal 33 will print as first "100" then "001", meaning 41 octal. (Note that octal zeros are hard to see, since no LEDs are on.)

Commands:

Click the pushbutton 1 to 5 times to issue these commands:

\n\n \n\n \n\n \n\n \n\n
· Run the program (If it terminates, also display the space-time product required to execute it.). Then flash rabbits right-to-left and repeat.
· · List the the program, one opcode at a time. Then pause and repeat.
· · · Append the opcode (in morse) to the program. At least one of these will actually be long clicks (hold down over 1/3 second); see the Morse column in the chart above. Then display the newly entered opcode.
· · · · Backspace: Delete the last opcode in the program. Then display the new last opcode in the program, or nothing (all LEDs off) if the program is empty.
· · · · · Clear: Delete the entire program. Display nothing (all LEDs off), since the program is empty.

When you run a program, the opcodes flash quickly, but numbers printed in octal by the print opcode ( ‒ ‒ ‒ ) are displayed more slowly. (Note that octal zeros are hard to see, since no LEDs are on.)

Running Slowly: To run the program more slowly (so you have a chance of seeing the opcodes flash), first list the program ( · · ) and then run it ( · ). The first run after a list command runs more slowly.

Accounting: After running a program, the space-time product is printed 3 bits at a time, most significant bits first, like the standard octal representation of the number. The space-time product is found my multiplying the length of the program (how many opcodes) times the number of runtime steps the program takes before it finishes. (But don't take too many steps, because the machine shuts down in 3 minutes.) You can think of this as accounting for your use of resources (like mainframes used to print accounting information at the end of a job run). We only charge you for program space; the use of the tape is free.

The initial program

When you first enter Brainf mode, you will see 3 quick rabbits going right-to-left. There are also right-to-left rabbits after running a program, before it restarts.

This program is initialized for you:

+[>+.<]

That is an infinite loop that counts upwards, starting with 1, but eventually overflowing the byte counter from 255 back to 0.

Bonus Puzzle: Print MU with Brainf.

If you print the number 33 decimal, which is 41 octal, it lights up first the "M" LED, and then the "U" LED. That's printing MU.

Challenge: Compose and run a Brainf puzzle that prints MU with the smallest space-time product possible. To help you measure this, the machine prints the space-time product (in octal) at the end of running a program.

Here's a starter program, but you can do much better:

+++++++++++++++++++++++++++++++++.

That's 33 "+"s and one "." opcode. It takes 34 cells of program space, and runs in 34 steps, so it has a space-time product of 1156 decimal, or 2204 octal.

So the program should flash binary "010" quickly 33 times, as it executes the "+"s, then flash "111" quickly as it executes the ".", then display more slowly first the "M" LED as "100" (octal 4) and then the "U" LED as "001" (octal 1) for octal 41 or decimal 33, which is Printing "MU". Then it should print "2" "2" "0" "4", for the accounting.

(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
(last modified 2014-03-25)       [Login]
(No back references.)