Foraging in an Uncertain Environment Using Predictive Hebbian Learning