Experience replay is associated with efficient nonlocal learning