We return to the maze from the October 2021 challenge (described again in detail in the appendix below), with some differences: Now columns can be moved up/down and rows left/right, but we can no longer move the row/column where the robotic mouse is situated. One slide moves the row/column exactly one cell.
Before and after performing a slide, the mouse can be moved to any cell reachable from its current location; it can also stay in its current place.
To denote slides we now use the following format: "U", "D", "L", "R" represent "Up", "Down", "Left", and "Right", so "U3" means "slide column number 3 one cell up" and "L6" means "slide row number 6 one cell left".
An example of the format for the move list:
[(3,5), "D2", "L4", (6,3), "R0", (7,7)]
Move the mouse from (0,0) to (3,5).
Slide column 2 down.
Slide row 4 left.
Move the mouse from (3,5) to (6,3).
Slide row 0 right.
Move the mouse from (6,3) to (7,7).
This set of move consists of 3 slides.
[(3,5), "D2", "L3"]
is illegal, since the mouse is in row 3 when the "L3" command is reached.
Your goal: Given the 15x15 maze
Find a sequence of moves for the mouse and row/column slides such that the mouse reaches the exit in at most 50 slides.
A bonus "*" will be given for solving the 10x10 maze
In at most 20 moves *without moving the mouse* except in the last move.
Appendix - description of the maze and the problem:
We are guiding a robotic mouse in a two dimensional maze. The mouse is situated in the upper-left corner of the maze, and must reach the lower-right corner. Unfortunately, there is no direct path in the maze between those two corners. However, we can slide the rows and columns of the maze: by sliding a row we move all the cells in the row one cell-length to the right, re-inserting the rightmost cell from the left. By sliding a column we do the same, sliding cells down and re-inserting the bottom cell from the top. We can also slide rows left and columns up.
We represent a maze by a hexadecimal string in the following manner: First, each cell in the maze is represented by a 4-digit binary string representing which passages are blocked (0) and which are open (1) for the directions "up", "right", "down" and "left". Every such 4-digit string can be converted to a single hexadecimal digit; this correspondence can be seen in the following illustration:
An nxm maze can be represented by a hexadecimal string of length n\cdot m where the first m digits give the upper row, the next m digits give the second row and so forth. For example, the string
represents the following maze:
We denote cells in the maze by (a,b) where a is the row number and b is the column number, both starting from 0. For example, if the mouse is in the second row from the top and the third column from the left, its location is (1,2). The mouse starts from (0,0) and for a nxm maze needs to reach (n-1, m-1).
We will post the names of those who submit a correct, original solution! If you don't want your name posted then please include such a statement in your submission!
We invite visitors to our website to submit an elegant solution. Send your submission to the email@example.com.
If you have any problems you think we might enjoy, please send them in. All replies should be sent to:firstname.lastname@example.org
31/10/2021 @ 12:00 PM EST Solution:
04/12/2021 @ 12:00 PM EST List Updated:
15/11/2021 @ 12:00 PM EST