In this section, we show that the loss function used to tune the Agent is equivalent to optimizing the expected reward of the policy following the REINFORCE algorithm. Molecules are represented as a sequence of tokens given by the Simplified Molecular Input Line Entry System (SMILES) format and generated in an autoregressive manner. The generative process is Markovian (Equation ):