No question: Border collie. They're the smartest dogs in the world.
Grew up with one on the farm. We got him as a pup. Our dairy cows gathered way over on the north side of the farm, nearly a half-mile from the barn, and being pure-bred Holsteins, they were just plain dumb. So dumb they wouldn't come to the barn at milking time. So I had to go get them every day after school. When the collie -- I named him Rex for no apparent reason -- was about four months old, he started following me out into the pasture one day.
He did that for a week. To me, he just seemed to be nosing around the pasture, smelling smells and watching cows, birds, whatever else there was to watch. One day he took off after a rabbit, but being small, he didn't catch him. I wondered what he would have done if he had.
The following Monday, I got off the bus, walked down the driveway toward the barn -- and saw all the cows in the barn lot, the dog sitting in front of the gate to the lot looking at me like "Hey! Look what I did!" I spent one week showing him the ropes in the early morning hours when it was dark, doing the same thing, and after that I never had to go to the pasture again to drive cattle. I went anyway. He was entertaining to watch.
One day he came across a cow with a new calf. He'd never seen one before. But he dutifully cut the cow and her calf out of the herd and left them in the pasture. Now how the heck did he know to do that?
Rex was an amazing gift from God. He was a friend, a coworker, and a playmate. It's been 44 years since he died. Sometimes I still miss him.