Learning Representations and Agents for Information Retrieval