Learning one episode at a time