The self-stimulating rat performs foraging tasks mediated by simple co
mputations that use interreward intervals and subjective reward magnit
udes to determine stay durations. This is a simplified preparation in
which to study the neurobiology of the elementary computational operat
ions that make cognition possible, because the neural signal specifyin
g the value of a computationally relevant variable is produced by dire
ct electrical stimulation of a neural pathway. Newly developed measure
ment methods yield functions relating the subjective reward magnitude
to the parameters of the neural signal. These measurements also show t
hat the decision process that governs foraging behavior divides the su
bjective reward magnitude by the most recent interreward interval to d
etermine the preferability of an option (a foraging patch). The decisi
on process sets the parameters that determine stay durations (duration
s of visits to foraging patches) so that the ratios of the stay durati
ons match the ratios of the preferabilities.