If it sometimes feels like your furry friend is the smartest thing on the planet, it may be because they are.