Performing a forward pass in Q-learning