Balancing Exploration and Exploitation: Sequential Decision Making in Humans and Machines