This post derives the Q learning algorithm and shows how it produced the Deep Q Network, the first AI agents to play video games successfully from images. It introduces Q functions as action-value functions that predict.