With the action space A defined as above, the transition model for the MDP is simply p(s |s, a) = 1 if applying the addition/deletion action a to the molecule s results in the molecule s , and p(s |s, a) = 0 otherwise. The fragment-based action space is powerful and suitable for policy learning as it ( ) is powered by the enormous distributional vocabulary learned by the fragment VQ-VAE, thus spans a diverse set of editing operations over molecular graphs; (2) exploits the meaningful latent representation of fragments since the representation of similar fragments are grouped together. These advantages greatly simplify the molecular search problem. We terminate an episode when the molecule fails to satisfy the desired property or when the episode exceeds ten steps.