2
$\begingroup$

This puzzle stems from these type of questions by Dimity Kamenetsky. Creating the hardest 7x7 maze Creating the hardest 6x6 maze

I wanted to know how the best possible solution would change, if I were to add in special squares with different effects. I have some more ideas I would like to try if people like this kind of puzzle.

There is an empty 7x7 grid. You are allowed to paint some of its cells as walls (black), while the remaining cells are either empty(white) or hold a special piece. A robot is programmed to start on the Start(green) square and visit all of the goal(purple) squares using the shortest path possible. The game is over once the robot touches the last goal, it does not have to go back to start. The robot automatically knows the shortest path (including the effects of the special squares) and its decisions cannot be influenced. The robot moves from one empty cell to an adjacent empty cell (Horizontally or vertically, but not diagonally). The special squares are 2 x slide squares(red, with an arrow) and 2 x slowing squares(blue). Special squares cannot be placed on starting squares or goal squares. Can you paint the walls and add the special squares in a way that forces the robot to take the most number of steps?

Map:

enter image description here

Slide Squares: The robot counts the slide as a part of moving onto the square. You may enter any direction except directly opposite of the arrow, and the spot directly opposite of the arrow must not be a wall. The robot will slide the direction the arrow is pointing. Once the slide has been used once, it disappears and you may go back across it in any direction. Here, it would take 3 moves to reach the goal, but 4 moves if it wanted to go from goal to start afterwards.

enter image description here

Slowing Squares: The robot counts this square as 2 moves. You may enter/exit from any direction and it has infinite uses. Here, It would take the robot 5 moves to reach the goal, and still 5 if it wanted to go from goal to start afterwards.

enter image description here

Create the longest solution that visits all goals using 2 x Slowing and 2 x Slide squares. Good Luck!

$\endgroup$
  • $\begingroup$ I'm not sure that this question is really going to be humanly solvable - it looks to me like the only way to figure out you've optimized it is brute-force computer search. $\endgroup$ – Deusovi Jul 2 at 16:40
  • $\begingroup$ @Deusovi Is it a requirement that a puzzle has an exact answer? I was looking for the best solutions we could find, just like the examples didnt know the exact answer, mine is 52. Also, why did you remove the logical-grid tag? Its still a logical grid puzzle, right? $\endgroup$ – Derager Jul 2 at 16:57
  • 2
    $\begingroup$ At least in my opinion, a good puzzle has an intentional path to its solution. If a question doesn't have that, it's not a puzzle with a solution but more along the lines of a research question. (I understand that a lot of people here feel differently, though.) As for the tag, [logic-grid] specifically refers to puzzles like Einstein's riddle, where you get clues like "The French person does not own the dog; the cat is in the red house; ..." and have to figure out the associations. $\endgroup$ – Deusovi Jul 2 at 17:00
  • $\begingroup$ Ah, I had the completely wrong idea of that tag then, my apologies. $\endgroup$ – Derager Jul 2 at 17:01
3
$\begingroup$

A different approach to the slides yields an improved solution:

enter image description here
The optimal solution has the goal sequence of BL-TR-BR and requires a total of 54 steps.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ This is great! Well done. $\endgroup$ – Daniel C Jul 5 at 1:22
  • $\begingroup$ Nice job! My 52 step solution this exact board, but I didn't think to place my sliders like that. $\endgroup$ – Derager Jul 6 at 13:15
3
$\begingroup$

My solution:

N = 52

Part 1

My solution for the standard 7x7 is 46, though a greater number may be possible.
enter image description here

Part 2

Adding in the special squares
enter image description here
The optimal solution requires the robot to visit the bottom two corners (in either order) and then the top right corner

The top right slide forces an undesired move, adding 1 step
The bottom left slide is unused, adding 0 steps
The bottom right slow is used twice, adding 2 steps
The bottom left slow is used three time, adding 3 steps

6 total steps are added, yielding N = 52

Additionally

It is worth noting that a standard solution of 46 was also the optimal found at this post

Thus, improvement should come from an additional use of a slow square (bringing both to 3, which I don't think is possible) or using the second slide square to force an additional step.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Could you improve the solution by placing the sliders around (but not on) the starting square, pointing towards the start. That would force the robot a step back. $\endgroup$ – P1storius Jul 3 at 8:05
  • 1
    $\begingroup$ The blue square near top right is only crossed once, so the maze in the image has a score of only 49. A better solution is to place a slow square on R5C2 where it will be crossed three times. Also, moving the slide near top right one square to the right, pointing to the left, forces the robot to take an extra step. $\endgroup$ – Daniel Mathias Jul 3 at 9:51
  • 2
    $\begingroup$ @P1storius: The slides cannot be entered from the square toward which they point. $\endgroup$ – Daniel Mathias Jul 3 at 9:53
  • $\begingroup$ Thank you @DanielMathias, I've incorporated your comments and adjusted the solution $\endgroup$ – Daniel C Jul 3 at 23:21
  • $\begingroup$ Nice job! Seems like there are a few ways to get up to 52 steps then, even without optimal use of special squares, you had such a good map layout that it made up for it. Im guessing there is a limit where you trade the optimal map layout for optimal special usage, and vice versa. $\endgroup$ – Derager Jul 6 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.