How a model learns — by minimizing its own surprise.