# Sliding balls on a 4x4 grid version 2

You are playing a game on the following 4x4 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?

• I do have a harder version, but I am worried that it's too hard ... Mar 15, 2022 at 10:06
• I wouldn't know about that, I'm pretty sure wizards frequent Puzzling. Post it! Mar 15, 2022 at 23:28
• Ok here it is: puzzling.stackexchange.com/questions/115314/… Mar 16, 2022 at 1:18

Is this a trick question? (New here)

"yes"?

Otherwise,

up left up right

up right up right

down right down left

up right down

The trick is to "disrupt" the alignment of two balls that the instinctive approach wants to line up against the right wall.

• Correct and well done! Mar 15, 2022 at 9:52
• Yay! Thanks @DmitryKamenetsky
– user
Mar 15, 2022 at 13:20

@user already posted a solution, mine differs slightly at the end:

ULU RURUR DR ULURD

(spaces inserted at the points where I was mentally switching to another task; the final 5 moves are where the solution differs from @user's)

This is what it looks like:

• Thank you for the animation. Mar 15, 2022 at 9:53

I have a completely different solution, the same length as the other two at time of posting - still 15 moves. I am wondering if there is a way to solve this in less than 15 moves.

URURD LUR DRD LURD

After the first five moves, the grid looks like this:

URURD (one of the orange balls has not moved as no left move has been made):

After the next three, it looks like this:

LUR:

After the next three:

DRD:

And the final four moves complete it:

LURD:

• As far as I can tell, the position shown in your second spoiler block is unavoidable, and there are two ways to reach it in 8 moves, and then two ways to reach the goal from there in 7. (The final 7 moves in @user's solution match yours.) So we may expect one more answer with a different path of 15 moves, using your beginning and my finish :-)
– Bass
Mar 15, 2022 at 18:12
• Nice work. I can confirm that 15 moves is optimal. Mar 16, 2022 at 0:05