Memory formation processes in weakly reinforced learning