You are playing a game on the following 5x5 grid. Each turn you can slide all the orange balls into one of four directions: left, up, right or down. A ball will continue sliding along a direction until it hits a wall (solid blue squares), boundary of the grid or another ball. All the balls move at once. Walls do not move. Can you get the balls to finish on the target (T) cells?

enter image description here

  • $\begingroup$ I will be quite impressed if anyone can solve this without the use of a computer. I will reward you if you do. $\endgroup$ Mar 16, 2022 at 1:20
  • 5
    $\begingroup$ Unless I've erred, it's doable even without pen and paper. $\endgroup$
    – noedne
    Mar 16, 2022 at 1:50
  • $\begingroup$ Guys are you getting sick of these puzzles? If not then I will make some more, harder ones. $\endgroup$ Mar 16, 2022 at 10:33

2 Answers 2


This is definitely a bit more difficult that the ones before, but despite OP's warnings in the comment section, there's no need for any kind of brute force. (There's an answer with a solution already, but it doesn't explain how to actually find the solution.)

Here's how to get there by retrograde analysis:

  • The T at r2c2 tells us the final move must be "up".
  • The T on row 1 tells us the move before cannot have been "right". Since having "up" or "down" before an "up" doesn't change anything, the penultimate move is "left".
  • This means the ball that ends up at r2c2 can only have come from r4c2, which means it was in the corridor at the bottom right before that
  • There's a T in that corridor, so there were two balls in there
  • To get a ball into the corridor on the bottom right, there must be another ball at r5c2.

With these in the forward order, we have the following goals:

  1. bring a ball to the lower left corner
  2. use that ball as a stepping stone to get the other balls to the corridor at the bottom right
  3. bring the stepping stone ball back to the upper right corner
  4. everything will now line up perfectly for the final "left-up".

But there's a problem: if we try to use one ball as the stepping stone, and bring the other balls one-by-one, we can't just "bring the third ball": either the stepping stone ball or the one ball already in the corridor will escape. So we need to do a sneaky juggle to bring all the balls to the bottom left, which finally solves all our problems. Like so:

enter image description here

I didn't notice any alternative paths along the way, so this is very likely the exact same answer @noedne posted. (After double checking, it indeed is.)

  • 1
    $\begingroup$ Yep, this is my exact thought process too! Not sure why OP thought a computer might be required. $\endgroup$
    – justhalf
    Mar 16, 2022 at 10:10
  • $\begingroup$ Thanks for the detailed explanation and the animation. For this I am making this the accepted answer. $\endgroup$ Mar 16, 2022 at 10:28
  • 2
    $\begingroup$ @justhalf as usual I underestimated the amazing problem skills of people on this site. I generated this puzzle with a computer and there is no way I would be able to solve it myself. $\endgroup$ Mar 16, 2022 at 10:30
  • 3
    $\begingroup$ You're underestimating yourself too, since you're also part of "people on this site" =D A puzzle maker isn't the best person to judge the difficulty of their own puzzle, be kind to yourself :) $\endgroup$
    – justhalf
    Mar 16, 2022 at 10:55
  • $\begingroup$ Nice retrograde! I started with the same thought process as well. Ultimately, while useful for confirming that it's possible, I'm not sure it was needed for finding the solution. It seems like the solution can be found by continuously doing the only thing that makes progress, instead of repeating a previous state. This may also be why it's not as hard as expected. $\endgroup$
    – noedne
    Mar 16, 2022 at 14:36


The complete solution can be found by continuously finding the only way to make progress, i.e., moving the balls into a previously unvisited state. Here is a detailed explanation of all of these progress steps:

LDRD: Move ball 1 to the bottom left.
LDRD: Move ball 2 to the bottom left.
RD: Move ball 2 to the bottom right.
LULD: Move ball 3 out while moving ball 2 back to the bottom left.
LDRD: Move ball 3 to the bottom left.
RDR: Move ball 3 to the bottom right.
U: Move ball 2 out.
LDRD: Move ball 2 to the bottom left.
R: Move ball 2 to the bottom right.
URU: Move ball 1 to the top right.
LU: Move ball 2 to the top left.

  • $\begingroup$ I think you've got it! I am very impressed. $\endgroup$ Mar 16, 2022 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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