Solution (source code)

= Solution

View the accessible rooms as the open cluster of <bond percolation> on a rooted ternary <tree>. Each accessible room has three forward corridors, independently open with probability $2/3$, so its number of accessible children has the <binomial distribution> $\operatorname{Bin}(3,2/3)$. The counts at successive levels form a <binomial branching process> with offspring <probability generating function>
$$
\boxed{\phi(t)=\left(\frac13+\frac23t\right)^3.}
$$
Let $q_N$ be the probability that the root has no open path to level $N$. Then $q_0=0$, and independence of the three descendant subtrees gives
$$
q_{N+1}=\left(\frac13+\frac23q_N\right)^3=\phi(q_N).
$$
The sequence increases to the smallest fixed point $q=\phi(q)$ in $[0,1]$, the <branching extinction probability>. Thus $q_N$ is close to that solution for large $N$.

Connectivity is the relevant escape event: if no window is reachable, escape is impossible; if one is reachable, ordinary random wandering reaches a window eventually with probability one. Before reaching level $N$ the guest moves within a finite connected graph, so an accessible exit cannot be avoided forever. This interpretation does not require the guest to move monotonically outward.