Learning Prediction and Abstraction in Partially Observable Models