Shared mechanisms mediate the explore-exploit tradeoff in macaques and humans