# SwapTiles World Challenge

My world record for this level is 17 can you beat or equal my record?

The aim is to switch the positions of the two asterisk tiles in the least amount of moves possible, you do this by swapping adjacent tiles (no diagonals). The tiles must be of the same colour or symbol.

x, y DIR

Where x and y are the coordinates of a tile and DIR is which way it was moved (either N for north or E for east). Coordinates start from the bottom left at 1, 1.

eg. 2, 1 N would swap the red lamda and the red phi.

PS: Shameless promotion This level is from my new (free) game "SwapTiles" on Google Play and the Amazon app store. Feel free to solve the puzzle by hand, but if you solve it within the app, you can go to settings and enable "Clipboard moves" which will automatically save your moves to the clipboard after victory. You can also submit your world record onto the leaderboard if you are able to beat my score! This game is number 1 on medium difficulty.

Interesting and challenging puzzle! I've done it in 17 moves like so:

2, 3 E
2, 3 N
1, 3 E
3, 3 N
2, 3 E
2, 2 N
2, 1 N
1, 1 E
1, 2 E
2, 1 N
2, 2 E
2, 2 N
1, 3 E
2, 3 E
2, 4 E
3, 2 N
3, 3 N

I've also found this alternative solution, still 17 moves

2, 3 E
2, 3 N
2, 2 E
1, 1 N
1, 2 E
2, 2 N
2, 3 N
2, 4 E
2, 3 E
2, 3 N
1, 3 E
2, 2 N
2, 2 E
1, 2 E
1, 1 E
1, 2 N
1, 1 N

• Good job! I'm gonna hold out on accepting this, see if anyone can get 16! Commented May 5, 2018 at 18:10
• I've run a program to confirm that there are no solutions that are 16 moves or fewer. It also found a 17 move solution. Commented May 5, 2018 at 21:54
• @phenomist Would you mind sharing your code? I would be interested in it. Commented May 6, 2018 at 2:05
• It's not very efficient (actually horribly so memory-wise)... (pastebin.com/SUXaR4TY) - run at your own risk, it took about 5GB of RAM to find a solution. Commented May 6, 2018 at 2:08