Optimization using generative adversarial networks (GANs) is performed in the same manner. Some optimization methods are also based on reinforcement learning. One popular approach is to represent molecular generation as a Markov decision process in which the state is a molecule and the action is the addition of atoms (or fragments) to approximate the policy function with a machine learning model. This approach has the advantage of directly optimizing the evaluation function, compared to using an approximate model.