We encourage the model to generate regular expressions to maximize expected rewards instead of MLE.
concretely, we train the model parameters θ to maximize the following objective function: to compute the expected reward, we need to go over all possible regular expressions, and the number of all possible regular expressions is infinite.