Assuming the following rules:
- The squares on the grid edges are the doors with a pass colour that you need to pass from one room to another. (E.g. You can travel west from Reception with your orange pass, but not south to Vetting.)
- The paired arrows in each cell represent exchanging your pass for a different colour. (So in the room west of Reception you can exchange a green pass for purple or vice-versa.)
- Multiple swaps can be performed in a room. (E.g. In Vetting, you can exchange purple for green and then green for blue.)
First, some observations:
- If a room has only one door of a particular colour, and no exchange-arrows with that colour, then that room represents a dead-end for that pass colour. (E.g. Entering the top-left (north-westernmost) room with a green, brown, purple or blue pass.)
- If a room has only one exchange arrow with a particular colour, and no doors of that colour, then that exchange-arrow can be ignored. (E.g. The top-left room has no orange door, so the yellow-orange exchange is unusable.)
- These rules can be applied iteratively, and a number of paths (and some entire rooms) can be marked as unusable dead-ends. (E.g. In the top-left room, with the yellow-orange exchange marked unusable, the single yellow door is also unusable, and the entire room is a dead-end. Then in the room immediately east, the yellow-green exchange is unusuable, and the remaining doors are all unique colours, so this room is also a dead-end.) In fact, this enables us to ignore over half the rooms when searching for a path through.
With all those options crossed out, we end up with the following map:
Now the unique path that I can find is:
Reception: Orange pass
Go W twice
Swap Orange for Red
Go W thrice
Swap Red for Green
Go S
Go E twice
Swap Green for Blue
Go E
Swap Blue for Brown
Go E
Phew, we made it to Clearance. On to Vetting, which is right next door, but we can't get there with our Brown pass...
So we retrace our steps for a few rooms..
Go W
Swap Brown for Blue
Go W
Swap Blue for Green
Go W twice
Go N (here we diverge)
Swap Green for Purple for Brown
Go W
Go N
Go E
Go N
Swap Brown for Blue for Yellow
Go E
Swap Yellow for Orange
Go S twice
Go E
Go S
Swap Orange for Purple
Go E
Swap Purple for Red for Orange
Go E
Swap Orange for Purple
Go E
Swap Purple for Green for Blue
We made it to Vetting. Not much further now.
Swap Blue for Green
Go N
We are back at Reception with our Green pass.
Map:
