Using A Machine Learning Framework To Understand Intelligent Behaviour In Humans And Non-Human Primates