Learning to Act and Observe in Partially Observable Domains