The agent in the greedy decoding framework<cite> (Gu et al., 2017)</cite> was trained using reinforcement learning with the policy gradient algorithm (Williams, 1992) , which observes the current state of the ENVIRONMENT at time step t as o t where o t = [c t ; s t ; w m ].