For regularization, we used a proxy for Tanimoto similarity, called cosine similarity of a vector representation of each molecule (denoted cosim), during training to speed up training time. As mentioned above, each molecule was represented by a 166-dimensional feature vector -each index corresponding to one atom-type. The value at each index conveys what fraction of atoms in the molecule had that particular atom-type. For example, benzene would have values of 0.5 for "aromatic carbon" and and 0.5 for "aromatic-attached hydrogen" indices, and 0 elsewhere. We then applied a measure of variance as a regularization term to the final reward for the i th molecule when it was synthesizable. This changes the reward scheme as follows: