The reef sharks nose-bumped Roboshark and eventually rejected it as an alien object. But remora, the fish that attach themselves to sharks and help clean them of parasites, were totally fooled and swam happily alongside it.
Other shark species accepted Roboshark. A tiger shark was filmed close up in the Pacific crushing a turtle's shell like a china plate, with its bite of 2.5 tons per square centimetre.
Great whites were more wary, and Roboshark also got a rough ride from a bull shark off the Bahamas - and ended up battered and bent on the sea bed.
"Scientists have proved that certain sharks can learn 80 times faster than cats," says producer Mark Brownlow, "so they can't be quite as dumb as we have been led to believe."
Sir David added: "Sharks have social lives, communicate with body language and, like mammals, can learn and remember. But if they are shown to be more intelligent, will that defuse our fear - or is a smarter shark more terrifying than ever?"
Smart Shark: Swimming With Roboshark is on BBC1 on 27 July at 8pm