Escape the bunker!

You wake up and found yourself in a room. There is a sign:

You are now in a bunker. There are thirty-six rooms in this bunker. There is a number in each room. For every room, you can go to another room if they are connected by a passageway(passageways are always two-way). Each passageway can only take you directly northwest, north, northeast, east, southeast, south, southwest or west of a room. There is a passcode in the final room, and you can figure the passcode out by using the numbers in the rooms of the shortest path from this room to the final room. If you enter the correct passcode, a door will open and you can exit the bunker. Good luck! Also, here is a compass.

After picking up the compass, you decided to walk around the room. You found out that the number in the room you’re at is 81 and there are passageways leading to northwest, north, east, southeast, and south of the room.

You always bring some paper and pen to record things, and you used them to make a sketch of the map of the bunker. Here it is:

Can you escape the bunker?

• +1, a nice way to make puzzles. Would have been more fun if you would have made a programming game out of this. – Anonymous Jan 26 at 6:56
• @Anon That would've definitely been closed as not self-contained, although I agree it would be fun. If I was on PC right now I would create a new user account named something along the lines of "Di[redacted]ra" and give it a shot :P – Lukas Rotter Jan 26 at 7:32
• Questions on PSE need to be self-contained; here the puzzle is (pretty much in its entirety) on an external site, and the "question" is more like an ad than a puzzle. – Bass Jan 26 at 7:59
• Actually a cool puzzle; shame it got locked. I solved it with a script editor and by looking at the source code. Funnily enough, going the shortest path isn't even needed to escape. – Nautilus Jan 28 at 15:33
• @Nautilus it's reopened now, if you want to post an answer :-) – Rand al'Thor Jan 30 at 14:55

I solved this puzzle when the post was closed.

I just noticed that the question is reopened, but also the correct answer is already posted (by @Nautilus and completed by @Braegh).

What I would like to add is that the original version is way cooler than the current "sketch" version. You can check the edit history to see the original rules and the link to a google form, which is an interactive maze game!

Since I completed the task in the original version, I post this answer here, as instructed in the end of the google form.

A few words about my approach:

it's just a standard path-finding algorithm, which can be done with pencil and paper.

We keep a queue of rooms, which is originally empty.

In the first step, we mark the starting room with distance $$0$$ and put it into the queue.

In every subsequent step, we take out the first room in the queue, called $$C$$, look at its distance $$d$$ and mark all its neighbors with distance $$d + 1$$, unless that neighbor has already been marked with a distance (necessarily $$\leq d + 1$$). Any newly marked room is then put into the end of the queue.

When the final room is marked with a distance, it is the shortest distance toward that room. We can then find the shortest path by going backwards according to the distances.

The final step is to notice that

each number is the ascii value of a printable character

"Question ID".

As stated above, for me the interesting part is the creative usage of google form as a maze game. The solving part is just-so-so.

• You don't have to give up on posting your own answer. As long as your method or reasoning is different enough from those of the existing answers, it's still a worthy answer. – Nautilus Jan 30 at 20:25
• @Nautilus I posted some explanation of my algorithm (quite standard, but can be done with pencil & paper). – WhatsUp Jan 30 at 22:04

First of all, I have to say that I solved it based on the first version, so if it didn't violate a rule by completely relying on a website, I couldn't have. Still, amazing concept and I'm gonna explain how I did:

I inspected the starting site from the context menu. From the second-to-last script on the site, I noticed that a particular title's site was shown like this:
...
,[1658039219,"24",null,8,null,573020733]
,[729417424,"Direction",null,2,[[394118466,[["E",null,905414939,null,0]
,["SE",null,1486106431,null,0]
,["S",null,402169435,null,0]]
,1,null,null,null,null,null,0]]]
...

The very first number is the code no for the room no, which is the second number (24), and the code nos matching the directions are also linked to the next room they lead to. That also means room 68 is the last room.

In light of this, I made a simple userscript that works on the very first page to help reach the target by listing all the directions:

setTimeout(function(){
let len = myData.length;
let roomMatches = [];
let roomCodes = [];
let roomNums = [];

for(var i=0; i<len; i++){
let firstNum = parseInt(myData[i][0]);
let secondNum = parseInt(myData[i][1]);

if(!isNaN(parseInt(firstNum)) && !isNaN(parseInt(secondNum))){
let curRoomMatch = [firstNum,secondNum];
roomCodes[roomCodes.length] = firstNum;
roomNums[roomNums.length] = secondNum;
roomMatches[roomMatches.length] = curRoomMatch;
}
}

for(var i=1; i<len/2; i++){
let directions = myData[i*2][4][0][1];

if(directions !== null){
let ln = directions.length;
let simpleDirections = [];

for(var j=0; j<ln; j++){
let nextRoomCode = myData[i*2][4][0][1][j][2];
let nextRoomNo = roomMatches[roomCodes.indexOf(nextRoomCode)][1];

let prevRoomCode = myData[i*2-1][0];
let prevRoomNo = parseInt(myData[i*2-1][1]);

simpleDirections[j] = [myData[i*2][4][0][1][j][0], nextRoomNo];

roomNums[roomCodes.indexOf(prevRoomCode)] = [prevRoomNo, simpleDirections];

}
}
}
console.log(roomNums+"");
},5000);


Then:

So I followed the 81-117-101-71-22-116-105-111-110-32-73-68 path. I believe it's the shortest path, but I couldn't find the unlocking code based on it, so I have slight doubts. But then I realized I could find the correct code without relying on a particular path - the section for room 68 includes the code:

...
[1101140078,"68","You entered the final room. Enter the correct passcode to open the door.",8],[1869671672,"Passcode",null,0,[[1791250858,null,1,null,[[4,301,["106892"],"Wrong passcode!"]
...

PS. Based on the 2nd version, it seems I was wrong about the shortest path:

Going backwards from 68, 4 rooms later we invariably reach 111. If we go around the right of the black wall in the middle, the blue path is already 6 rooms long and it takes at least 3 rooms to get from 111 to 99, so we need to go to its left if we are to shorten our path further. That means we then go to 105 and 116. After that, either we follow the orange path and arrive at 101, or if we don't want anything to do with the orange path, we decide on the longer purple one. Even if we later switch to the orange one, it's a waste of time compared to always sticking to the orange path. However, it still takes at least 2 steps to reach 81. It should be 81-117-101-115-116-105-111-110-32-73-68.

Expanding on (and re-checking) @Nautilus' answer above;

The correct path is 81 117 101 115 116 105 111 110 32 73 68

putting these numbers through

a decimal-to-text converter gives the phrase "Question ID" - this particular question's ID is 106892.

Edit: I had some extra numbers in there. No clue how they got there. They aren't even in the picture.