Foraging

fixed issues with reward and encoder IO.