to predict the outcome and determines the agent’s reward. The agent learns to select features that will allow accurate prediction.[]{data-label="fig:1"}](approach.png){width="100.00000%"}

### The MDP {#sec:mdp}

Our MDP is defined as follows:

-   State space: $\mathcal{S} = \mathbb{R}^{2d}$, where the first $d$ entries correspond to the patient’s answers to the $d$ interview questions , and for $i=1,\ldots, d$, the $d+ i$ entry is set to 1 if question $i$ was chosen and 0 otherwise.

-   Action space: $\mathcal{A} = \{1, 2,\ldots, d+1 \}$, where actions $1,\ldots,d$ refer to choosing the corresponding question and action $d+1$ refers to making a guess about the outcome variable. To prevent the agent from selecting the same feature more than once, we apply masking, as will be explained in Section \[sec:add\].

-   State transition rules: At the beginning of an episode, the initial state is simply a zero vector of length $2d$. At each time step throughout the episode, if the action refers to asking a new question ($1 \le a \le d$), state $s'$ is obtained from state $s$ by unmasking the $a$’th entry of $s$ (i.e., setting $s'_a = x_a$) and marking that question $a$ was asked (i.e., setting $s'_{a+d} = 1$). if the agent 