# Guide dots to land on any pair of matching portals at the same time

Try it out here!$^{\dagger}$

$\hskip2in$

Question:

First, I'll define the left blue dot as dot 1, and the right blue dot as dot 2. Left being <, right being >, up being ^, and down being v, what set of these moves can guide the two dots to land on any matching pair of portals at the same time?

$\hskip2in$

Rules:

(0) The two side-by-side dots and the gray ones they point to are the portals.

(1) You are the yellow dot (bottom left of entire grid).

(2) You can move (one cell) in all directions except diagonally.

(3) When you move, dot1 moves (one cell) in the opposite direction.

(3) When you move, dot2 moves (one cell) in the same direction as you.

(4) Both dots move when you move (in their respective directions).

(5) If dot1 and dot2 are facing each other, and you move, they stay in the same spot, and you keep your move.

(6) If dot1 and dot2 try to move onto the same spot, they stay in the same spot, and you keep your move.

(7) If you and dot1 try to move onto the same spot, you die, and the game resets.

(8) No one can move off the grid or on the empty cell.

(9) If you and dot2 are next to each other, and you want to move on the spot dot2 is on, dot2 will move off it in that direction and you will land on it.

(10) If (9) happens with dot2 facing the edge of the grid or the empty cell, then no one moves.

(11) If dot1 or dot2 would move off the grid or onto the empty cell because of your move, they remain in place and you (and not necessarily the other dot) keep your move.

(12) If you try to move off the grid or onto the empty cell, no one moves.

(13) If you or a dot lands on an orange portal you go to a gray portal and vice versa.

(14) White-ringed portals go to white-ringed portals and black-ringed portals go to black-ringed portals.

(15) A matching portal is "both orange" or "both gray."

(16) If two entities hit linked portals simultaneously they swap.

(17) If a just-teleported non-yellow dot hits a wall on the next move, it still teleports back.

$^{\dagger}$Credits: boboquack and uwnojpjm

• You've got arrows from the orange dots. Do you mean them to be dot1 and dot2 instead of the blue dots? Commented Aug 12, 2017 at 1:45
• The black arrows in the diagram indicate a portal transfer from an orange portal to a gray portal. Gray to orange portal transfers work too.
– user39732
Commented Aug 12, 2017 at 1:47
• Have you used Puzzlescript before? It might be useful to make an interactive version of this puzzle. Commented Aug 12, 2017 at 1:51
• @boboquack, this is great. Is it embeddable to SE?
– user39732
Commented Aug 12, 2017 at 2:16
• Unfortunately not, but you can get a link to the puzzle you produce and/or copy the code here for others. Commented Aug 12, 2017 at 2:41

Here:

You can win!

I used:

Trial and error, and the PuzzleScript utility here

Key for explanations and note:

There might be quite a bit of repetition, I certainly haven't golfed it. Teleports are located at line-breaks: W = White and B = Black

New version - 36 moves

→↑↑↑←↑ (W)
↑←→↓ (W)
↓→↑← (W)
←←←↓↑→→↑→↓ (W)
↓→↓←→↓←↑↑→↑↓

Old version - 115 moves

→↑↑↑←↑ (W)
↑→↓ (B)
→→↓←↑→↑↓↑↑ (B)
←↑↑↑→→↓ (W)
→↓↓↓↓←↑↑↑→↓←↑↓↓→↑↑→↑→↓ (W)
↓↓→↑→←→←→↑←↓↓↓↑↓←↑↑→↑↓↓←↑→↓↓→ (B)
↓←→↓←→↑↑ (B)
←←↑→←↑↑ (W)
↓→↓←→↓←↑↑→↓↑↓↓←↑↑↓→←↑↓↑

Note:

I realise this isn't much of an answer, but that's all I could do for trial and error.

• @uwnojpjm Nope, pure keyboard mashing, luck and intuition. That being said, the portals are pretty counter-intuitive as it is Commented Aug 12, 2017 at 5:46