policies), while terminating or continuing the current option:

$$\begin{aligned}
        \mathbf{h_1} &= \tanh(\mathbf{W}_1 [\mathbf{x}^T \boldsymbol{\omega}^T]^T + \mathbf{b}_1), \\
        \mathbf{\hat{y}} &= \sigma(\mathbf{W}_2 \mathbf{h_1} + \mathbf{b}_2) \circ \mathbf{mask}, \\
        \mathbf{y} &= \frac{\mathbf{\hat{y}}}{\mathbf{1}^T \mathbf{\hat{y}}},
    \end{aligned}$$

with $W_i$ and $b_i$ the trainable weights and biases of layer $i$, $\sigma$ the sigmoid function, and $\circ$ the element-wise product of two vectors. The fraction ensures that a valid probability distribution is produced by the network. The initiation sets of options are implemented using the $\mathbf{mask}$ input of the neural network, a vector of $2 \times (|A| + |O|)$ integers, the same dimension as the $\mathbf{y}$ output. When executing the top-level policy ($\boldsymbol{\omega} = \mathbf{0}$), the mask forces the probability of primitive actions to zero, preserves option $\omega_i$ according to $I_{\omega_i}$, and prevents the top-level policy from terminating. When executing an option policy ($\boldsymbol{\omega} \ne \mathbf{0}$), the mask only allows primitive actions to be executed. For instance, if there are two options and three actions, $\mathbf{mask} = \begin{smallmatrix}end \\ cont\end{smallmatrix} (
        \begin{smallmatrix}
            0 & 0 & 1 & 1 & 1 \\
            0 & 0 & 1 & 1 & 1
        \end{smallmatrix}
    )$ when executing any of the options. When executing the top-level policy, $\mathbf{mask} = \begin{smallmatrix}end \\ 