I've raised both from babies and of course still have my horses, (only because the pigs grew up and ran off to the wildlife preserve behind me to make more pigs) and I think they are both extremely intelligent animals.
It really depends on how much work, training, play, and attention you put into it and of course how much you let them develop of their own personalities. Gemini one of my horses thinks he is human, (I'm not kidding) If he would fit, he would be in the bedroom on the futon watching tv or trying to eat my paper and drink coffee. I put up a little pool for the dogs last week and he tried to get in it. He tries to hammer, paint, etc. When he gets mad like when I built a trellis for my muscadine grapes next morning plant was gone (he ate it) OK that's enough about him.
My pigs have been the same way, will roll over on command to get a belly rub, squeal for a treat, and do just about anything for attention.
I love them all so I guess for me I have to go with the horses only because they have been with me longer
Oh yeah, have you ever watched a cutting horse work a cow in the arena? Please don't think for a minute that is the cowboy doing all that "reasoned intelligence" it's the horse, (sorry couldn't help myself)