## On the Subject of the Pigpen Maze CM

A machine that knows no bounds when it comes to ciphers.

This cipher uses 2 pages.

Concatenate the strings displayed on the screens on Page 1 in this order: 1A2B3C. Take off the first 25 letters of this string to form the Wall String. The rest of the letters will form the Movement String.

The Wall String will determine the walls of a 5×5 maze:

• Rearrange those letters into a 5×5 matrix.
• Use the Pigpen diagram below to convert each letter into a cell with walls.
• If the cell contains a dot, invert the placement of those walls.
• If you were to place a wall where a wall already exists, remove the placed wall.

The Movement String will determine how the letters A - Y will be placed:

• Start inside the space that is displayed on Page 1 Screen D in the maze, treating the letter as the column and the number as the row (Top to Bottom).
• Then place the letter A at that space.
• If you come to a fork (a space that is surrounded by at least 2 spaces that are not labeled with a letter), then take the 1st letter from the Movement String and convert it into a direction via the Pigpen Diagram. If the direction has a dot, then go to the other space that is NOT in that direction. Remove the 1st letter of the Movement String.
• Otherwise, if you come to a deadend (a space that is surrounded by spaces that are labeled with a letter and/or walls), then backtrack your way through the maze until you reach a space that is not a deadend.
• If there is only 1 space that is adjacent and hasn’t been labeled with a letter, go to that space.
• The space that you move to will be labeled with the next letter in the alphabet.
• Repeat this process until you labeled every space in the maze.

### Pigpen Diagram

#### Example

 E E J D H P D J M D B M N F H B E C I R E D C Q A

Movement String: VYTSUZX
Page 1 Screen D: B2

Take the 4 letter keyword from Page 1 Screen 4 and write numbers 1-4 under the word in such a way that the ascending numbers are going in alphabetical order. If there’s a tie between letters, then ascend in reading order.

Write these letters underneath the 4 number key: URDL. Then rearrange the columns of the key so that the numbers are in ascending order, left to right. The bottom letters will be referred to as the Movement Key.

If the Submit Button is white, follow the instructions under Encrypt Instructions. Otherwise follow the instructions under Decrypt Instructions.

#### Encrypt Instructions

• Do the following steps for each letter of the encrypted word:
• Start at the space labeled with the Nth letter of the keyword on Page 2 Screen 1 (wrap around if needed).
• Traverse the maze until the space you land on contains the Nth letter of the encrypted word using the rules below:
• If you come to a fork (a space that is surrounded by at least 2 spaces that have not been visited), use the first valid move from the Movement Priority.
• Otherwise, if you come to a deadend (a space that is surrounded by visited spaces and/or walls), then backtrack your way through the maze until you reach a space that is not a deadend.
• Otherwise, go to the space that hasn’t been visited yet.
• Turn the number of distinct spaces you visited into a letter (A1Y25). This letter becomes your Nth decrypted letter.
• Finally, if any of the letters on Page 2 Screen 2 match at the same position as any of the letters of your decrypted word, replace that letter with a Z. You should now have a decrypted word.

#### Decrypt Instructions

• Do the following steps for each letter of the encrypted word:
• Start at the space labeled with the Nth letter of the keyword on Page 2 Screen 1 (wrap around if needed).
• Traverse the maze until the number of distinct visited spaces is equal to the alphabetic position of the Nth letter of the encrypted word (A1Y25) using the rules below:
• If you come to a fork (a space that is surrounded by at least 2 spaces that have not been visited), use the first valid move from the Movement Priority.
• Otherwise, if you come to a deadend (a space that is surrounded by visited spaces and/or walls), then backtrack your way through the maze until you reach a space that is not a deadend.
• Otherwise, go to the space that hasn’t been visited yet.
• The letter that you end up on becomes your Nth decrypted letter.
• Finally, if any of the letters on Page 2 Screen 2 match at the same position as any of the letters of your decrypted word, replace that letter with a Z. You should now have a decrypted word.

#### Example 1: Encrypt Rules

Encrypted Word: XCIG
Page 1 Screen 4: EURO
Page 2 Screen 1: FRY
Page 2 Screen 2: KFQA

 E U R O E O R U 1 4 3 2 1 2 3 4 U R D L U L D R

8, 15, 12, 5 → HOLD
HOLD + KFQA → HOLD

#### Example 2: Decrypt Rules

Encrypted Word: MMVX
Page 1 Screen 4: RUBY
Page 2 Screen 1: RAGE
Page 2 Screen 2: WKDK

 R U B Y B R U Y 2 3 1 4 1 2 3 4 U R D L D U R L

CODY + WKDK → COZY