Hash Functions for Episodic Recognition and Retrieval