Building DQN in PyTorch, then again by hand in numpy, and the two bugs that made it worse than random along the way.