Gravar-mail: Learning and transfer of working memory gating policies